plasma-mcp 0.0.1 → 0.0.2.pre.5
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/LICENSE +2 -2
- data/README.md +1 -1
- data/lib/plasma/application.rb +3 -3
- data/lib/plasma/class_loader.rb +30 -0
- data/lib/plasma/templates/app/variables/{example_variable.erb → example_variable.rb.erb} +1 -1
- data/lib/plasma/tool.rb +5 -2
- data/lib/plasma/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d510ec669900b8ef06104fa771522b3085c073fb8d93ab5e2c332c55a715fed
|
4
|
+
data.tar.gz: 3458491c2f91ef548e4c0b53d0434fd08c9473b48e5d9bb6780cb44ef45d44d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cc0e2e70ca82a53e5c0b0711eab0221e1d2e391fa828e80abea0a8223e233370a88ff3ecfc53833eba1ed157e5760877410b4d59ad8c5a6b7f603be288151b3
|
7
|
+
data.tar.gz: fda3e9bb53034d788381940e0bb0d090724376dff49e510b2c5862fe8cf7254040e1dd6975d4cd795c7b55a4528f7c6b513e00a76c914baa915be1a421b89720
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
MIT License
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2025 Jacob Foster Heimark
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Plasma is a Ruby-based SDK that provides a Rails-inspired, convention-over-confi
|
|
12
12
|
|
13
13
|
> [🚀 Getting Started](#getting-started) • [📖 Usage Guide](#usage-guide) • [⚙️ Development](#development)
|
14
14
|
|
15
|
-
> ⚠️ **Warning**: Plasma is currently in pre-alpha development (0.0.
|
15
|
+
> ⚠️ **Warning**: Plasma is currently in pre-alpha development (0.0.x-pre). Until version 0.1.0 is released, all versions (including patch updates) may contain breaking changes. This allows us to rapidly iterate and improve the API based on early feedback. See our [roadmap](docs/ROADMAP.md) for more details.
|
16
16
|
|
17
17
|
## Features
|
18
18
|
|
data/lib/plasma/application.rb
CHANGED
@@ -77,17 +77,17 @@ module Plasma
|
|
77
77
|
|
78
78
|
# Find all prompt classes
|
79
79
|
def prompts
|
80
|
-
|
80
|
+
Prompt.descendants
|
81
81
|
end
|
82
82
|
|
83
83
|
# Find all resource classes
|
84
84
|
def resources
|
85
|
-
|
85
|
+
Resource.descendants
|
86
86
|
end
|
87
87
|
|
88
88
|
# Find all tool classes
|
89
89
|
def tools
|
90
|
-
|
90
|
+
Tool.descendants
|
91
91
|
end
|
92
92
|
|
93
93
|
private
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Plasma
|
4
|
+
# Handles class loading and path resolution for PLASMA classes
|
5
|
+
class ClassLoader
|
6
|
+
class << self
|
7
|
+
def find_loader(module_name, class_name)
|
8
|
+
Zeitwerk::Registry.loaders.find do |l|
|
9
|
+
inceptions = l.instance_variable_get(:@inceptions)
|
10
|
+
next unless inceptions
|
11
|
+
|
12
|
+
map = inceptions.instance_variable_get(:@map)
|
13
|
+
next unless map
|
14
|
+
|
15
|
+
map[module_name]&.key?(class_name)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def get_path_from_loader(loader, module_name, class_name)
|
20
|
+
inceptions = loader.instance_variable_get(:@inceptions)
|
21
|
+
return nil unless inceptions
|
22
|
+
|
23
|
+
map = inceptions.instance_variable_get(:@map)
|
24
|
+
return nil unless map
|
25
|
+
|
26
|
+
map.dig(module_name, class_name)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/plasma/tool.rb
CHANGED
@@ -45,10 +45,13 @@ module Plasma
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def file_path
|
48
|
-
loader = Zeitwerk::Registry.loaders.first
|
49
48
|
module_name = to_s.split("::")[0..-2].join("::").constantize
|
50
49
|
class_name = to_s.split("::").last.to_sym
|
51
|
-
|
50
|
+
|
51
|
+
loader = ClassLoader.find_loader(module_name, class_name)
|
52
|
+
return nil unless loader
|
53
|
+
|
54
|
+
path = ClassLoader.get_path_from_loader(loader, module_name, class_name)
|
52
55
|
return nil unless path
|
53
56
|
|
54
57
|
File.expand_path(path)
|
data/lib/plasma/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plasma-mcp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2.pre.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacob Foster Heimark
|
@@ -99,14 +99,14 @@ dependencies:
|
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 6.
|
102
|
+
version: 6.6.0
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 6.
|
109
|
+
version: 6.6.0
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: rack
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,6 +198,7 @@ files:
|
|
198
198
|
- lib/plasma/application.rb
|
199
199
|
- lib/plasma/auth.rb
|
200
200
|
- lib/plasma/auth_server.rb
|
201
|
+
- lib/plasma/class_loader.rb
|
201
202
|
- lib/plasma/cli.rb
|
202
203
|
- lib/plasma/component_generator.rb
|
203
204
|
- lib/plasma/generator.rb
|
@@ -220,7 +221,7 @@ files:
|
|
220
221
|
- lib/plasma/templates/app/prompts/example_prompt.rb.erb
|
221
222
|
- lib/plasma/templates/app/resources/example_resource.rb.erb
|
222
223
|
- lib/plasma/templates/app/tools/example_tool.rb.erb
|
223
|
-
- lib/plasma/templates/app/variables/example_variable.erb
|
224
|
+
- lib/plasma/templates/app/variables/example_variable.rb.erb
|
224
225
|
- lib/plasma/templates/config/application.rb.erb
|
225
226
|
- lib/plasma/templates/config/boot.rb.erb
|
226
227
|
- lib/plasma/templates/config/initializers/example.rb.erb
|
@@ -251,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
251
252
|
- !ruby/object:Gem::Version
|
252
253
|
version: '0'
|
253
254
|
requirements: []
|
254
|
-
rubygems_version: 3.6.
|
255
|
+
rubygems_version: 3.6.8
|
255
256
|
specification_version: 4
|
256
257
|
summary: Rails-inspired framework for building Model Context Protocol (MCP) servers
|
257
258
|
test_files: []
|