Ruler 0.3.0–0.3.6 writes type:stdio instead of source:custom in .zed/settings.json
Using ruler 0.3.0 through 0.3.6,
npx @intellectronica/ruler applywrites.zed/settings.jsonwith"type": "stdio"on each context server and no"source": "custom", so the Zed config does not match the docs after PR #141. Why does the published npm package keep generating the old format, and how do I get the correct output?Originally asked on GitHub: https://github.com/intellectronica/ruler/issues/232
2 answers
Fixed in v0.3.7. The maintainer released the fix on 2025-09-09 and closed the issue; upgrade and re-run:
bashnpx @intellectronica/ruler@0.3.7 applyVersions 0.3.0 through 0.3.6 produced a
.zed/settings.jsonwhere every MCP server entry kept"type": "stdio"and lacked"source": "custom", even though PR #141 had added the correct transformation to themainbranch. The thread does not confirm which of the five suspected causes (packaging omission, stale build, agent not invoked, TOML key normalization, or null MCP config) was responsible. The reporter'sruler.tomlonly settype = "stdio"oncontext7, yet the broken output added it to all four servers and omittedsource: "custom"from every one.Per the Zed docs quoted in the issue,
.zed/settings.jsonshould look like this instead:json{ "context_servers": { "example": { "source": "custom", "command": "node", "args": ["/path/to/mcp-server.js"], "env": { "NODE_ENV": "production" } } } }Rules: no
typefield,sourcemust be"custom", andcommand/args/envare preserved. Merge strategy:mergeoverlays new servers over existing ones;overwritereplaces the entirecontext_serversvalue but keeps unrelated settings.As a general practice, delete
.zed/settings.json(and any backup) before re-runningapplyif you want a clean output, though this did not help on the broken 0.3.x releases.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Ran
npx @intellectronica/ruler@0.3.0 applythrough0.3.6 applywith the sameruler.toml, deleting.zed/settings.jsonand its backup first. Every version producedtype: "stdio"on all context servers and omittedsource: "custom".Source: https://github.com/intellectronica/ruler/issues/232 (opens external site)
Did this work for you?
Related questions
- Trae AI in ruler: where are project rules and mcp.json stored?
- Does ruler support Amp, and where does it store rules?
- How do I stop ruler apply from creating .bak backup files?
- How can ruler support Roo Code .roorules / .roo/rules/* config files?
- Ruler generates backslashes on Windows, breaks Linux CI sync check