UNPKG

@intellectronica/ruler

Version:

Ruler — apply the same rules to all coding agents

38 lines (37 loc) 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CursorAgent = void 0; const AgentsMdAgent_1 = require("./AgentsMdAgent"); /** * Cursor agent adapter. * Leverages the standardized AGENTS.md approach supported natively by Cursor. * See: https://docs.cursor.com/en/cli/using */ class CursorAgent extends AgentsMdAgent_1.AgentsMdAgent { getIdentifier() { return 'cursor'; } getName() { return 'Cursor'; } async applyRulerConfig(concatenatedRules, projectRoot, _rulerMcpJson, agentConfig, backup = true) { // Write AGENTS.md via base class // Cursor natively reads AGENTS.md from the project root await super.applyRulerConfig(concatenatedRules, projectRoot, null, { outputPath: agentConfig?.outputPath, }, backup); } getMcpServerKey() { return 'mcpServers'; } supportsMcpStdio() { return true; } supportsMcpRemote() { return true; } supportsNativeSkills() { return true; } } exports.CursorAgent = CursorAgent;