rails-ai-context 0.5.1 → 0.5.2
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/CHANGELOG.md +4 -2
- data/README.md +1 -1
- data/demo.gif +0 -0
- data/demo_script.sh +1 -1
- data/lib/rails_ai_context/tools/get_config.rb +1 -0
- data/lib/rails_ai_context/tools/get_controllers.rb +1 -0
- data/lib/rails_ai_context/tools/get_conventions.rb +2 -1
- data/lib/rails_ai_context/tools/get_gems.rb +1 -0
- data/lib/rails_ai_context/tools/get_model_details.rb +2 -1
- data/lib/rails_ai_context/tools/get_routes.rb +1 -0
- data/lib/rails_ai_context/tools/get_schema.rb +1 -0
- data/lib/rails_ai_context/tools/get_test_info.rb +1 -0
- data/lib/rails_ai_context/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8378145ec19882ed7d2eb8c088da05bca9df2cdea61f566d4690310f50d3825a
|
|
4
|
+
data.tar.gz: 53e3377b30f932baa6ed0d42e3b91dc2b20a5e5b05f459a6315716dbe48a7161
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 629a78fe135ff955a71ceb870baf6a49c3d178e7358254ac9b88143cad6212e7b3190745835754b3b726148f0469080fd1a71d12c6c1eb1ab9b31a7bd095e3e8
|
|
7
|
+
data.tar.gz: aeb99f7ca9638fd00066b1f4a21758ad4cbcd1f447dae77c26245b55eb9f9954165a06f1114cf0cc2091a60925e9dc42ad747d9155c2e08bb070ca5b4247f47d
|
data/CHANGELOG.md
CHANGED
|
@@ -5,11 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [0.5.
|
|
8
|
+
## [0.5.2] - 2026-03-18
|
|
9
9
|
|
|
10
10
|
### Fixed
|
|
11
11
|
|
|
12
|
-
- **
|
|
12
|
+
- **MCP tool nil crash** — All 9 MCP tools now handle missing introspector data gracefully instead of crashing with `NoMethodError` when the introspector is not in the active preset (e.g. `rails_get_config` with `:standard` preset)
|
|
13
|
+
- **Zeitwerk dependency** — Changed from open-ended `>= 2.6` to pessimistic `~> 2.6` per RubyGems best practices
|
|
14
|
+
- **Documentation** — Updated CONTRIBUTING.md, CHANGELOG.md, and CLAUDE.md to reflect Zeitwerk autoloading, introspector presets, and `.mcp.json` auto-discovery changes
|
|
13
15
|
|
|
14
16
|
## [0.5.0] - 2026-03-18
|
|
15
17
|
|
data/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://github.com/crisnahine/rails-ai-context/actions)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
|
-

|
|
8
|
+

|
|
9
9
|
|
|
10
10
|
`rails-ai-context` automatically introspects your Rails application and exposes your models, routes, schema, controllers, views, jobs, gems, auth, API, tests, config, and conventions to AI assistants through the [Model Context Protocol (MCP)](https://modelcontextprotocol.io).
|
|
11
11
|
|
data/demo.gif
CHANGED
|
Binary file
|
data/demo_script.sh
CHANGED
|
@@ -12,6 +12,7 @@ module RailsAiContext
|
|
|
12
12
|
|
|
13
13
|
def self.call(server_context: nil)
|
|
14
14
|
data = cached_context[:config]
|
|
15
|
+
return text_response("Config introspection not available. Add :config to introspectors or use `config.preset = :full`.") unless data
|
|
15
16
|
return text_response("Config introspection failed: #{data[:error]}") if data[:error]
|
|
16
17
|
|
|
17
18
|
lines = [ "# Application Configuration", "" ]
|
|
@@ -19,6 +19,7 @@ module RailsAiContext
|
|
|
19
19
|
|
|
20
20
|
def self.call(controller: nil, server_context: nil)
|
|
21
21
|
data = cached_context[:controllers]
|
|
22
|
+
return text_response("Controller introspection not available. Add :controllers to introspectors.") unless data
|
|
22
23
|
return text_response("Controller introspection failed: #{data[:error]}") if data[:error]
|
|
23
24
|
|
|
24
25
|
controllers = data[:controllers] || {}
|
|
@@ -12,7 +12,8 @@ module RailsAiContext
|
|
|
12
12
|
|
|
13
13
|
def self.call(server_context: nil)
|
|
14
14
|
conventions = cached_context[:conventions]
|
|
15
|
-
return text_response("Convention detection
|
|
15
|
+
return text_response("Convention detection not available. Add :conventions to introspectors.") unless conventions
|
|
16
|
+
return text_response("Convention detection failed: #{conventions[:error]}") if conventions[:error]
|
|
16
17
|
|
|
17
18
|
lines = [ "# App Conventions & Architecture", "" ]
|
|
18
19
|
|
|
@@ -20,6 +20,7 @@ module RailsAiContext
|
|
|
20
20
|
|
|
21
21
|
def self.call(category: "all", server_context: nil)
|
|
22
22
|
gems = cached_context[:gems]
|
|
23
|
+
return text_response("Gem introspection not available. Add :gems to introspectors.") unless gems
|
|
23
24
|
return text_response("Gem introspection failed: #{gems[:error]}") if gems[:error]
|
|
24
25
|
|
|
25
26
|
notable = gems[:notable_gems] || []
|
|
@@ -19,7 +19,8 @@ module RailsAiContext
|
|
|
19
19
|
|
|
20
20
|
def self.call(model: nil, server_context: nil)
|
|
21
21
|
models = cached_context[:models]
|
|
22
|
-
return text_response("Model introspection
|
|
22
|
+
return text_response("Model introspection not available. Add :models to introspectors.") unless models
|
|
23
|
+
return text_response("Model introspection failed: #{models[:error]}") if models[:error]
|
|
23
24
|
|
|
24
25
|
unless model
|
|
25
26
|
model_list = models.keys.sort.map { |m| "- #{m}" }.join("\n")
|
|
@@ -19,6 +19,7 @@ module RailsAiContext
|
|
|
19
19
|
|
|
20
20
|
def self.call(controller: nil, server_context: nil)
|
|
21
21
|
routes = cached_context[:routes]
|
|
22
|
+
return text_response("Route introspection not available. Add :routes to introspectors.") unless routes
|
|
22
23
|
return text_response("Route introspection failed: #{routes[:error]}") if routes[:error]
|
|
23
24
|
|
|
24
25
|
by_controller = routes[:by_controller] || {}
|
|
@@ -29,6 +29,7 @@ module RailsAiContext
|
|
|
29
29
|
|
|
30
30
|
def self.call(table: nil, format: "markdown", server_context: nil)
|
|
31
31
|
schema = cached_context[:schema]
|
|
32
|
+
return text_response("Schema introspection not available. Add :schema to introspectors.") unless schema
|
|
32
33
|
return text_response("Schema introspection not available: #{schema[:error]}") if schema[:error]
|
|
33
34
|
|
|
34
35
|
tables = schema[:tables] || {}
|
|
@@ -12,6 +12,7 @@ module RailsAiContext
|
|
|
12
12
|
|
|
13
13
|
def self.call(server_context: nil)
|
|
14
14
|
data = cached_context[:tests]
|
|
15
|
+
return text_response("Test introspection not available. Add :tests to introspectors.") unless data
|
|
15
16
|
return text_response("Test introspection failed: #{data[:error]}") if data[:error]
|
|
16
17
|
|
|
17
18
|
lines = [ "# Test Infrastructure", "" ]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails-ai-context
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- crisnahine
|
|
@@ -67,14 +67,14 @@ dependencies:
|
|
|
67
67
|
name: zeitwerk
|
|
68
68
|
requirement: !ruby/object:Gem::Requirement
|
|
69
69
|
requirements:
|
|
70
|
-
- - "
|
|
70
|
+
- - "~>"
|
|
71
71
|
- !ruby/object:Gem::Version
|
|
72
72
|
version: '2.6'
|
|
73
73
|
type: :runtime
|
|
74
74
|
prerelease: false
|
|
75
75
|
version_requirements: !ruby/object:Gem::Requirement
|
|
76
76
|
requirements:
|
|
77
|
-
- - "
|
|
77
|
+
- - "~>"
|
|
78
78
|
- !ruby/object:Gem::Version
|
|
79
79
|
version: '2.6'
|
|
80
80
|
- !ruby/object:Gem::Dependency
|