routie dev init since i didn't adhere to any proper guidance up until now
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.validateMcp = validateMcp;
|
||||
/**
|
||||
* Validate the structure of the Ruler MCP JSON config.
|
||||
* Minimal validation: ensure 'mcpServers' property exists and is an object.
|
||||
* @param data Parsed JSON object from .ruler/mcp.json.
|
||||
* @throws Error if validation fails.
|
||||
*/
|
||||
function validateMcp(data) {
|
||||
if (!data ||
|
||||
typeof data !== 'object' ||
|
||||
!('mcpServers' in data) ||
|
||||
typeof data.mcpServers !== 'object') {
|
||||
throw new Error('[ruler] Invalid MCP config: must contain an object property "mcpServers" (Ruler style)');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user