rails-ai-context 0.7.1 → 0.8.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7aa2c43d22465356700ded7ac615f4d38ba24e1bee512658dc1ec43196935e9c
4
- data.tar.gz: f718d8e2c3b790294e212c557216cd2babd99459fea3a5f1245f9ad09329e52d
3
+ metadata.gz: 04212baad7453e8371662a226fa50dfa4b65e4b611e94af22c50ab09e314d888
4
+ data.tar.gz: 43140d9b9f6151a4f5e72427efd8fcba0ed4a8256ed3f3c56f6a1c1ff53fd436
5
5
  SHA512:
6
- metadata.gz: c4c9d908941193ffd7cda89bc8a5da67a9531ffd09e723382eebc39c7ac77a06faa3958bf4048f550d0d3a5883edf9f8a67a2b62c65130847589db53d954fe5d
7
- data.tar.gz: 38a1f37c770eff7680ed3b0acb43627a5ba36b8168eafbf087907d8e5445103ec4cc06b4cb08103e48baf772c710d6333278759789f3bcc44e7b745787cc9b11
6
+ metadata.gz: 373de7c5e83e959cc64c96ab3937e9160da315c9dde34e12f2fe506f5ee6b815cbe71a49af3e6015fe0b75b89316810ff067deb0fa839a5dd4cff6836cb33f07
7
+ data.tar.gz: 8c9b16584f464c0603cb04f92ab8d7daf0f8dfe04f15a78e21a6089c344bcd0aedf9a6a59e748e9a90d24a356ad27f0b69cde8512aa3fd7db1995a84641e7a22
data/CHANGELOG.md CHANGED
@@ -5,11 +5,30 @@ 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.8.1] - 2026-03-19
9
+
10
+ ### Added
11
+
12
+ - **OpenCode support** — generates `AGENTS.md` (native OpenCode context file) plus per-directory `app/models/AGENTS.md` and `app/controllers/AGENTS.md` that OpenCode auto-loads when reading files in those directories. Falls back to `CLAUDE.md` when no `AGENTS.md` exists. New command: `rails ai:context:opencode`.
13
+
14
+ ### Fixed
15
+
16
+ - **Live reload LoadError in HTTP mode** — when `live_reload = true` and the `listen` gem was missing, the `start_http` method's rescue block (for rackup fallback) swallowed the live reload error, producing a confusing rack error instead of the correct "listen gem required" message. The rescue is now scoped to the rackup require only.
17
+ - **Dangling @live_reload reference** — `@live_reload` was assigned before `start` was called. If `start` raised LoadError, the instance variable pointed to a non-functional object. Now only assigned after successful start.
18
+
19
+ ## [0.8.0] - 2026-03-19
20
+
21
+ ### Added
22
+
23
+ - **MCP Live Reload** — when running `rails ai:serve`, file changes automatically invalidate tool caches and send MCP notifications (`notifications/resources/list_changed`) to connected AI clients. The AI's context stays fresh without manual re-querying. Requires the `listen` gem (enabled by default when available). Configurable via `config.live_reload` (`:auto`, `true`, `false`) and `config.live_reload_debounce` (default: 1.5s).
24
+ - **Live reload doctor check** — `rails ai:doctor` now warns when the `listen` gem is not installed.
25
+
8
26
  ## [0.7.1] - 2026-03-19
9
27
 
10
28
  ### Added
11
29
 
12
30
  - **Full MCP tool reference in all context files** — every generated file (CLAUDE.md, .cursorrules, .windsurfrules, copilot-instructions.md) now includes complete tool documentation with parameters, detail levels, pagination examples, and usage workflow. Dedicated `rails-mcp-tools` split rule files added for Claude, Cursor, Windsurf, and Copilot.
31
+ - **MCP Registry listing** — published to the [official MCP Registry](https://registry.modelcontextprotocol.io) as `io.github.crisnahine/rails-ai-context` via mcpb package type.
13
32
 
14
33
  ### Fixed
15
34
 
data/CLAUDE.md CHANGED
@@ -10,12 +10,13 @@ structure to AI assistants via the Model Context Protocol (MCP).
10
10
  - `lib/rails_ai_context/introspector.rb` — Orchestrates sub-introspectors
11
11
  - `lib/rails_ai_context/introspectors/` — 27 introspectors (schema, models, routes, jobs, gems, conventions, stimulus, database_stats, controllers, views, turbo, i18n, config, active_storage, action_text, auth, api, tests, rake_tasks, assets, devops, action_mailbox, migrations, seeds, middleware, engines, multi_database)
12
12
  - `lib/rails_ai_context/tools/` — 9 MCP tools using the official mcp SDK
13
- - `lib/rails_ai_context/serializers/` — Output formatters (claude, claude_rules, cursor_rules, windsurf, windsurf_rules, copilot, copilot_instructions, rules, markdown, JSON)
13
+ - `lib/rails_ai_context/serializers/` — Output formatters (claude, claude_rules, opencode, cursor_rules, windsurf, windsurf_rules, copilot, copilot_instructions, rules, markdown, JSON)
14
14
  - `lib/rails_ai_context/resources.rb` — MCP resources (static data AI clients read directly)
15
15
  - `lib/rails_ai_context/server.rb` — MCP server configuration (stdio + HTTP transports)
16
16
  - `lib/rails_ai_context/middleware.rb` — Rack middleware for auto-mounting MCP HTTP endpoint
17
17
  - `lib/rails_ai_context/fingerprinter.rb` — SHA256 file fingerprinting for cache invalidation
18
18
  - `lib/rails_ai_context/doctor.rb` — Diagnostic checks and AI readiness scoring
19
+ - `lib/rails_ai_context/live_reload.rb` — MCP live reload: watches files, invalidates caches, notifies AI clients
19
20
  - `lib/rails_ai_context/watcher.rb` — File watcher for auto-regenerating context files
20
21
  - `lib/rails_ai_context/engine.rb` — Rails Engine for auto-integration
21
22
  - `lib/generators/rails_ai_context/install/` — Install generator (creates .mcp.json, initializer, context files)
@@ -38,7 +39,7 @@ structure to AI assistants via the Model Context Protocol (MCP).
38
39
  ## Testing
39
40
 
40
41
  ```bash
41
- bundle exec rspec # Run specs (348 examples)
42
+ bundle exec rspec # Run specs (373 examples)
42
43
  bundle exec rubocop # Lint
43
44
  ```
44
45
 
data/CONTRIBUTING.md CHANGED
@@ -20,8 +20,9 @@ The test suite uses [Combustion](https://github.com/pat/combustion) to boot a mi
20
20
  lib/rails_ai_context/
21
21
  ├── introspectors/ # 27 introspectors (schema, models, routes, etc.)
22
22
  ├── tools/ # 9 MCP tools with detail levels and pagination
23
- ├── serializers/ # Per-assistant formatters (claude, cursor, windsurf, copilot, JSON)
23
+ ├── serializers/ # Per-assistant formatters (claude, opencode, cursor, windsurf, copilot, JSON)
24
24
  ├── server.rb # MCP server setup (stdio + HTTP)
25
+ ├── live_reload.rb # MCP live reload (file watcher + cache invalidation)
25
26
  ├── engine.rb # Rails Engine for auto-integration
26
27
  └── configuration.rb # User-facing config (presets, context_mode, limits)
27
28
  ```