rails-informant 0.6.0 → 0.6.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 69a62b35d2fcbee6378fff16208c4f1091f87c44ffd41baa638f59a42d4caefd
|
|
4
|
+
data.tar.gz: 97ecbe4eb82e39be5b42c42b6bb50d257d157eb507201bde373bca8e477222d2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe94a07f7029f360b1517c2ce8f3b0b2a27872ce08ba5d6a5c9a631030e53865ad58fd1a289b67d61db66ad650c22c21b5863b8628103c568c92a5f5a0730a4e
|
|
7
|
+
data.tar.gz: f5356e08df971271b046a8f5a7387a3219b53fe64b3090ab63a9a89f3f1c7b1c2246f5dcd1b62ff107a25c3ca4b47fbf09a3feb4c4964e56b25a9994f17af0d4
|
data/README.md
CHANGED
|
@@ -199,6 +199,12 @@ The bundled `informant-mcp` executable connects Claude Code to your error data v
|
|
|
199
199
|
|
|
200
200
|
The `rails_informant:skill` generator creates `.mcp.json` automatically. Set `INFORMANT_PRODUCTION_URL` and `INFORMANT_PRODUCTION_TOKEN` as environment variables (e.g., via `.envrc` + direnv).
|
|
201
201
|
|
|
202
|
+
`informant-mcp` reads these variables when it starts, so a Claude Code session started without them loaded crashes the server on boot. To load `.envrc` on every start, launch the server through direnv. The generator and `informant:doctor` both accept this entry:
|
|
203
|
+
|
|
204
|
+
```json
|
|
205
|
+
"informant": { "command": "direnv", "args": ["exec", ".", "informant-mcp"] }
|
|
206
|
+
```
|
|
207
|
+
|
|
202
208
|
For multi-environment setups, add env vars for each environment:
|
|
203
209
|
|
|
204
210
|
```bash
|
|
@@ -25,7 +25,9 @@ module RailsInformant
|
|
|
25
25
|
if File.exist?(mcp_path)
|
|
26
26
|
existing = JSON.parse(File.read(mcp_path))
|
|
27
27
|
existing["mcpServers"] ||= {}
|
|
28
|
-
existing["mcpServers"]["informant"]
|
|
28
|
+
unless Content.accepted_mcp_entries.include?(existing["mcpServers"]["informant"])
|
|
29
|
+
existing["mcpServers"]["informant"] = Content.mcp_entry
|
|
30
|
+
end
|
|
29
31
|
create_file ".mcp.json", JSON.pretty_generate(existing) + "\n", force: true
|
|
30
32
|
else
|
|
31
33
|
create_file ".mcp.json", JSON.pretty_generate(
|
|
@@ -65,6 +65,13 @@ module RailsInformant
|
|
|
65
65
|
{ "command" => "informant-mcp" }
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
+
# Entries an app may keep in place of mcp_entry. The direnv form loads the
|
|
69
|
+
# app's .envrc first: informant-mcp reads its URL and token at startup, so a
|
|
70
|
+
# session started without the .envrc loaded crashes it on boot.
|
|
71
|
+
def accepted_mcp_entries
|
|
72
|
+
[ mcp_entry, { "command" => "direnv", "args" => [ "exec", ".", "informant-mcp" ] } ]
|
|
73
|
+
end
|
|
74
|
+
|
|
68
75
|
# A single UserPromptSubmit hook registration for settings.json.
|
|
69
76
|
def hook_registration
|
|
70
77
|
{
|
|
@@ -126,7 +126,7 @@ module RailsInformant
|
|
|
126
126
|
"hook" => normalize_text(read_or_empty(hook_path)),
|
|
127
127
|
"skill" => @hyperdrive_managed ? "" : normalize_text(read_or_empty(skill_path)),
|
|
128
128
|
"settings" => canonical_json(live_settings_registrations || {}),
|
|
129
|
-
"mcp" => canonical_json(live_mcp_entry || {})
|
|
129
|
+
"mcp" => canonical_json(Content.accepted_mcp_entries.include?(live_mcp_entry) ? Content.mcp_entry : live_mcp_entry || {})
|
|
130
130
|
)
|
|
131
131
|
end
|
|
132
132
|
|