review.check-ruby-extensions
Verify Ruby extensions load correctly in Re:VIEW manuscripts to ensure proper rendering and prevent formatting errors during writing.
Instructions
Verify Ruby extensions (ReviewExtention) are loaded correctly
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes |
Implementation Reference
- src/commands/hybrid-pipeline.ts:103-130 (handler)Core handler function: runs Ruby to require review-ext.rb and inspects $LOADED_FEATURES for loaded review extensions.export async function checkRubyExtensionsCommand(options: { cwd: string }) { const { cwd } = options; try { const result = await runCommand("ruby", [ "-r", "./review-ext.rb", "-e", "puts 'Extensions loaded: ' + $LOADED_FEATURES.grep(/review/).join(', ')" ], { cwd, env: { ...process.env, DEBUG: "1" } }); const extensionsLoaded = result.stdout.includes("Extensions loaded"); const loadedFiles = result.stdout.match(/Extensions loaded: (.+)/)?.[1] || ""; return { success: extensionsLoaded, loadedExtensions: loadedFiles.split(", ").filter(Boolean), output: result.stdout }; } catch (error: any) { return { success: false, error: error.message, stderr: error.stderr }; } }
- src/index.ts:343-351 (schema)Tool schema: defines name, description, and input schema (cwd).{ name: "review.check-ruby-extensions", description: "Verify Ruby extensions (ReviewExtention) are loaded correctly", inputSchema: { type: "object", properties: { cwd: { type: "string" } }, required: ["cwd"] } },
- src/index.ts:570-579 (registration)Registration in CallToolRequestSchema handler: dispatches to hybridCommands.checkRubyExtensions.case "review.check-ruby-extensions": { const result = await hybridCommands.checkRubyExtensions({ cwd: args.cwd as string }); return { content: [ { type: "text", text: JSON.stringify(result) } ] }; }