review.preprocess
Normalizes Re:VIEW manuscript input and adds metadata to prepare files for validation and correction processes.
Instructions
JS preprocessor only - normalizes input and adds metadata
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | ||
| output | No | ||
| pattern | No | ||
| stats | No |
Implementation Reference
- src/commands/hybrid-pipeline.ts:27-44 (handler)The primary handler function executing the tool logic for 'review.preprocess'. Currently a stub that skips processing.export async function preprocessCommand(options: PreprocessOptions) { const { pattern = "articles/**/*.re", output = ".out", stats = true, cwd } = options; // Skip preprocessing for now since review-macro-shims is not available // In production, this would call the actual preprocessor console.log("[preprocess] Skipping JS preprocessing (using standard Re:VIEW)"); return { success: true, output: "Preprocessing skipped - using standard Re:VIEW", stats: stats ? { filesProcessed: 0, macrosExpanded: 0, warnings: [] } : null }; }
- src/index.ts:315-327 (schema)Tool registration entry defining the name, description, and input schema.name: "review.preprocess", description: "JS preprocessor only - normalizes input and adds metadata", inputSchema: { type: "object", properties: { cwd: { type: "string" }, pattern: { type: "string" }, output: { type: "string" }, stats: { type: "boolean" } }, required: ["cwd"] } },
- src/index.ts:543-555 (registration)MCP CallToolRequestSchema handler case that invokes the preprocess function.case "review.preprocess": { const result = await hybridCommands.preprocess({ cwd: args.cwd as string, pattern: args.pattern as string | undefined, output: args.output as string | undefined, stats: args.stats as boolean | undefined }); return { content: [ { type: "text", text: JSON.stringify(result) } ] }; }
- src/commands/hybrid-pipeline.ts:9-14 (schema)Type definition matching the tool's inputSchema.export interface PreprocessOptions { pattern?: string; output?: string; stats?: boolean; cwd: string; }
- Object exporting the preprocess function for use in index.ts.export const hybridCommands = { preprocess: preprocessCommand, buildPdfHybrid: buildPdfHybridCommand, checkRubyExtensions: checkRubyExtensionsCommand, testMapfile: testMapfileCommand };