rails-ai-bridge 3.5.2 → 3.6.0
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 +17 -0
- data/README.md +1 -1
- data/UPGRADING.md +17 -0
- data/lib/rails_ai_bridge/path_resolver.rb +21 -0
- data/lib/rails_ai_bridge/serializers/context_summary.rb +1 -1
- data/lib/rails_ai_bridge/version.rb +1 -1
- data/rails-ai-bridge.gemspec +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b375ce08baa45d08d3c20625d27280862175bb022677e1f5c5ae90d1eb7a1493
|
|
4
|
+
data.tar.gz: 7d8de9d9b1642b447c03cc3b36820d2008dee648a475ebffaac038a9f081a178
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6ced1f26479b6614723aaba77812ec4efe9ff35c107a40e4e8865ec88553eace62aa5bd990371c0eb1b2ae4bfd13d7983c1d101bb3403ef7b8e8922022150106
|
|
7
|
+
data.tar.gz: 39b6117bb858aa1dca13e65d05244aeccece63fb6afde51ee5ff1c0d3986512aabd3bd74e0ae00ee5ad0bda3382025573caebe7aa273155ff5a3fd85db03e812
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,23 @@ 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
|
+
## [3.6.0]
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **`mcp` minimum version raised to 0.25** (#92) — the gemspec lower bound is now `>= 0.25` (was `>= 0.10`), matching the minimum version the codebase actually requires. The upper bound remains `< 1.0`.
|
|
13
|
+
- **`rubydex` constraint tightened to `~> 0.2.9`** (#92) — was `~> 0.2.4`. This is a **minor breaking change** for users pinned to rubydex 0.2.4–0.2.8; update your lockfile with `bundle update rubydex`.
|
|
14
|
+
- **`simplecov` bumped to 1.0** (#92) — development dependency only; does not affect gem consumers. The test suite filter was migrated from `add_filter '/spec/'` to `skip 'spec'` per the simplecov 1.0 migration guide (`SourceFile#project_filename` no longer includes a leading separator).
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **`Style/ArrayIntersect` lint offense** (#91/#92) — pre-existing rubocop offense in `context_summary.rb` autocorrected to use `Array#intersect?`. No behavior change.
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- **PathResolver architectural documentation** (#90/#91) — class-level docblock documents PathResolver's intentional role as a shared utility (11 introspector callers, high betweenness centrality). Prevents false "god class" flags from future graph analyses.
|
|
23
|
+
- **PathResolver edge-case tests** (#90/#91) — 6 new specs covering the private `SafeRelativePath` (backslash normalization, Windows path rejection, empty path rejection) and `SafeJoin` (valid joins, traversal escape prevention) helper classes.
|
|
24
|
+
|
|
8
25
|
## [3.5.2]
|
|
9
26
|
|
|
10
27
|
### Security
|
data/README.md
CHANGED
|
@@ -780,7 +780,7 @@ Bug reports and pull requests: [github.com/igmarin/rails-ai-bridge/issues](https
|
|
|
780
780
|
|
|
781
781
|
## Acknowledgments & Origins
|
|
782
782
|
|
|
783
|
-
This gem ships as **rails-ai-bridge** (Ruby **`RailsAiBridge`**, version **3.
|
|
783
|
+
This gem ships as **rails-ai-bridge** (Ruby **`RailsAiBridge`**, version **3.6.0**). Earlier iterations of the same codebase were distributed as `rails-ai-context`.
|
|
784
784
|
|
|
785
785
|
RailsMCP evolved from
|
|
786
786
|
[crisnahine/rails-ai-context](https://github.com/crisnahine/rails-ai-context),
|
data/UPGRADING.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Upgrading rails-ai-bridge
|
|
2
2
|
|
|
3
|
+
## Upgrading from 3.5.x to 3.6.0
|
|
4
|
+
|
|
5
|
+
**One action required if you are pinned to an older `rubydex`:**
|
|
6
|
+
|
|
7
|
+
The `rubydex` gem constraint was tightened from `~> 0.2.4` to `~> 0.2.9`. If your
|
|
8
|
+
lockfile resolves to rubydex 0.2.4–0.2.8, update it after upgrading:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
bundle update rubydex
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
No other configuration or code changes are required. The `mcp` lower bound also
|
|
15
|
+
moved from `>= 0.10` to `>= 0.25`, but if you were already on a recent version
|
|
16
|
+
(no earlier than 0.25) this is a no-op.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
3
20
|
## Upgrading from 1.x to 2.x
|
|
4
21
|
|
|
5
22
|
**No configuration changes required.** Every `config.*` attribute from 1.x is still available — `Configuration` now delegates to focused sub-objects but exposes the same flat DSL. See `CHANGELOG.md` for the full list of internal changes.
|
|
@@ -3,6 +3,27 @@
|
|
|
3
3
|
module RailsAiBridge
|
|
4
4
|
# Resolves configured Rails logical paths to filesystem paths without leaking
|
|
5
5
|
# machine-specific absolute paths into generated assistant context.
|
|
6
|
+
#
|
|
7
|
+
# == Architectural role: intentional shared utility
|
|
8
|
+
#
|
|
9
|
+
# PathResolver is deliberately used by every introspector that needs to
|
|
10
|
+
# locate files on disk (controller, model, view, stimulus, turbo, auth,
|
|
11
|
+
# api, config, action_text, activeStorage, nonArModels — 11 callers as of
|
|
12
|
+
# v3.6.0). It is NOT a god class despite high betweenness centrality in
|
|
13
|
+
# graph analyses: a foundational path-resolution utility is expected to
|
|
14
|
+
# sit at the centre of the introspector graph. Splitting it would spread
|
|
15
|
+
# path-safety logic (traversal guards, safe joins) across multiple files
|
|
16
|
+
# and weaken the single responsibility it currently holds.
|
|
17
|
+
#
|
|
18
|
+
# The three private helper classes — SafeRelativePath, SafeJoin, and
|
|
19
|
+
# ConfiguredPathsError — are kept nested and private_constant so they
|
|
20
|
+
# cannot leak into the public API or be referenced by callers. This
|
|
21
|
+
# keeps the safety surface area small and auditable in one file.
|
|
22
|
+
#
|
|
23
|
+
# If a future graph analysis flags this class again, check the
|
|
24
|
+
# betweenness centrality against the caller count before proposing a
|
|
25
|
+
# split: a utility with many callers and a single responsibility is
|
|
26
|
+
# healthy, not smelly.
|
|
6
27
|
class PathResolver
|
|
7
28
|
# Validates user-provided relative paths before filesystem operations.
|
|
8
29
|
class SafeRelativePath
|
|
@@ -459,7 +459,7 @@ module RailsAiBridge
|
|
|
459
459
|
private_class_method :sensitive_config_basename?
|
|
460
460
|
|
|
461
461
|
def sensitive_config_path_segment?(path)
|
|
462
|
-
path.split('/').
|
|
462
|
+
path.split('/').intersect?(SENSITIVE_CONFIG_SEGMENTS)
|
|
463
463
|
end
|
|
464
464
|
module_function :sensitive_config_path_segment?
|
|
465
465
|
private_class_method :sensitive_config_path_segment?
|
data/rails-ai-bridge.gemspec
CHANGED
|
@@ -50,11 +50,11 @@ Gem::Specification.new do |spec|
|
|
|
50
50
|
spec.require_paths = ['lib']
|
|
51
51
|
|
|
52
52
|
# Core dependencies
|
|
53
|
-
spec.add_dependency 'mcp', '>= 0.
|
|
53
|
+
spec.add_dependency 'mcp', '>= 0.25', '< 1.0' # Official MCP Ruby SDK
|
|
54
54
|
spec.add_dependency 'railties', '>= 7.1', '< 10.0'
|
|
55
55
|
spec.add_dependency 'thor', '>= 1.0', '< 3.0'
|
|
56
56
|
spec.add_dependency 'zeitwerk', '~> 2.6' # Autoloading
|
|
57
57
|
|
|
58
58
|
# Semantic code analysis via Shopify's rubydex
|
|
59
|
-
spec.add_dependency 'rubydex', '~> 0.2.
|
|
59
|
+
spec.add_dependency 'rubydex', '~> 0.2.9'
|
|
60
60
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails-ai-bridge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ismael Marin
|
|
@@ -15,7 +15,7 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '0.
|
|
18
|
+
version: '0.25'
|
|
19
19
|
- - "<"
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
21
|
version: '1.0'
|
|
@@ -25,7 +25,7 @@ dependencies:
|
|
|
25
25
|
requirements:
|
|
26
26
|
- - ">="
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
|
-
version: '0.
|
|
28
|
+
version: '0.25'
|
|
29
29
|
- - "<"
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
31
|
version: '1.0'
|
|
@@ -89,14 +89,14 @@ dependencies:
|
|
|
89
89
|
requirements:
|
|
90
90
|
- - "~>"
|
|
91
91
|
- !ruby/object:Gem::Version
|
|
92
|
-
version: 0.2.
|
|
92
|
+
version: 0.2.9
|
|
93
93
|
type: :runtime
|
|
94
94
|
prerelease: false
|
|
95
95
|
version_requirements: !ruby/object:Gem::Requirement
|
|
96
96
|
requirements:
|
|
97
97
|
- - "~>"
|
|
98
98
|
- !ruby/object:Gem::Version
|
|
99
|
-
version: 0.2.
|
|
99
|
+
version: 0.2.9
|
|
100
100
|
description: Rails-AI-Bridge introspects your Rails application and exposes structure
|
|
101
101
|
to AI assistants via static context files and a live Model Context Protocol (MCP)
|
|
102
102
|
server. It classifies Active Record models semantically (Core, Join, Supporting),
|