@riotprompt/riotdoc 1.0.1-dev.0 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.playwright-mcp/riotplan-cli-step.png +0 -0
- package/.playwright-mcp/riotplan-core-concepts.png +0 -0
- package/.playwright-mcp/riotplan-homepage.png +0 -0
- package/.playwright-mcp/riotplan-mcp-overview.png +0 -0
- package/.playwright-mcp/riotplan-mcp-tools.png +0 -0
- package/README.md +111 -8
- package/dist/__vite-browser-external-2Ng8QIWW.js +5 -0
- package/dist/__vite-browser-external-2Ng8QIWW.js.map +1 -0
- package/dist/cli.js +4 -116
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +152 -57
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/loader-Cvfo7vBn.js +153 -0
- package/dist/loader-Cvfo7vBn.js.map +1 -0
- package/dist/loader-DJHV70rz.js +389 -0
- package/dist/loader-DJHV70rz.js.map +1 -0
- package/dist/mcp-server.d.ts +19 -0
- package/dist/mcp-server.js +1109 -0
- package/dist/mcp-server.js.map +1 -0
- package/package.json +18 -11
- package/templates/blog-post-template.md +367 -0
- package/templates/blog-post-validation.md +278 -0
- package/templates/email-template.md +353 -0
- package/templates/podcast-script-template.md +496 -0
- package/templates/project-plan-template.md +513 -0
- package/templates/research-paper-template.md +497 -0
- package/dist/__vite-browser-external-l0sNRNKZ.js +0 -2
- package/dist/__vite-browser-external-l0sNRNKZ.js.map +0 -1
- package/dist/loader-B7ZeTPQg.js +0 -6358
- package/dist/loader-B7ZeTPQg.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-server.js","sources":["../src/mcp/tools/shared.ts","../src/mcp/tools/create.ts","../src/mcp/tools/history.ts","../src/mcp/tools/outline.ts","../src/mcp/tools/draft.ts","../src/mcp/tools/status.ts","../src/mcp/tools/spellcheck.ts","../src/mcp/tools/cleanup.ts","../src/mcp/tools/export.ts","../src/mcp/tools/revise.ts","../src/mcp/tools/index.ts","../src/mcp/uri.ts","../src/mcp/resources/config.ts","../src/mcp/resources/status.ts","../src/mcp/resources/document.ts","../src/mcp/resources/outline.ts","../src/mcp/resources/objectives.ts","../src/mcp/resources/voice.ts","../src/mcp/resources/style-report.ts","../src/mcp/resources/index.ts","../src/mcp/prompts/index.ts","../src/mcp/server.ts"],"sourcesContent":["/**\n * Shared utilities for MCP tools\n */\n\n \nimport type { ToolExecutionContext, ToolResult } from '../types.js';\n \n\n/**\n * Format current timestamp as ISO 8601 string\n */\nexport function formatTimestamp(): string {\n return new Date().toISOString();\n}\n\n/**\n * Format current date as YYYY-MM-DD\n */\nexport function formatDate(): string {\n return new Date().toISOString().split('T')[0];\n}\n\n/**\n * Helper to create a basic config object from MCP args\n */\nexport function createConfig(args: any, _context: ToolExecutionContext): any {\n return {\n dryRun: args.dry_run || false,\n verbose: false,\n debug: false,\n };\n}\n\n/**\n * Generic command executor - wraps command execution with common patterns\n * Handles directory changes, error formatting, and result building\n */\nexport async function executeCommand<T>(\n args: any,\n context: ToolExecutionContext,\n commandFn: () => Promise<T>,\n resultBuilder?: (result: T, args: any, originalCwd: string) => any\n): Promise<ToolResult> {\n const originalCwd = process.cwd();\n const logs: string[] = [];\n\n try {\n // Change to target directory if specified\n if (args.path) {\n process.chdir(args.path);\n logs.push(`Changed to directory: ${args.path}`);\n }\n\n // Execute the command\n const result = await commandFn();\n\n // Restore original directory\n if (args.path) {\n process.chdir(originalCwd);\n }\n\n // Build the result\n const data = resultBuilder \n ? resultBuilder(result, args, originalCwd) \n : { result, path: args.path || originalCwd };\n\n return {\n success: true,\n data,\n message: args.dry_run ? 'Dry run completed' : 'Command completed successfully',\n logs: logs.length > 0 ? logs : undefined,\n };\n } catch (error: any) {\n // Restore directory on error\n if (args.path && process.cwd() !== originalCwd) {\n try {\n process.chdir(originalCwd);\n } catch {\n // Ignore errors restoring directory\n }\n }\n\n return {\n success: false,\n error: error.message || 'Command failed',\n context: {\n path: args.path || originalCwd,\n command: error.command,\n },\n logs: logs.length > 0 ? logs : undefined,\n };\n }\n}\n\n/**\n * Helper to format error messages for MCP\n */\nexport function formatError(error: any): { message: string; context?: Record<string, any> } {\n const message = error.message || 'Unknown error';\n const context: Record<string, any> = {};\n\n if (error.code) {\n context.code = error.code;\n }\n if (error.path) {\n context.path = error.path;\n }\n if (error.command) {\n context.command = error.command;\n }\n\n return {\n message,\n context: Object.keys(context).length > 0 ? context : undefined,\n };\n}\n","/**\n * Create Tool\n */\n\n \nimport type { McpTool, ToolResult, ToolExecutionContext } from '../types.js';\nimport { createWorkspace } from '../../workspace/creator.js';\nimport { executeCommand } from './shared.js';\n \n\nexport const createTool: McpTool = {\n name: 'riotdoc_create',\n description:\n 'Create a new document workspace with structured directories and configuration. ' +\n 'Sets up the complete workspace structure including voice, objectives, evidence, and drafts directories.',\n inputSchema: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n description: 'Document workspace name (will be used as directory name)',\n },\n title: {\n type: 'string',\n description: 'Document title (defaults to formatted name)',\n },\n type: {\n type: 'string',\n enum: ['blog-post', 'podcast-script', 'technical-doc', 'newsletter', 'custom'],\n description: 'Document type',\n },\n base_path: {\n type: 'string',\n description: 'Base path for workspace creation (defaults to current directory)',\n },\n primary_goal: {\n type: 'string',\n description: 'Primary goal of the document',\n },\n audience: {\n type: 'string',\n description: 'Target audience description',\n },\n },\n required: ['name', 'type'],\n },\n};\n\nexport async function executeCreate(args: any, context: ToolExecutionContext): Promise<ToolResult> {\n return executeCommand(\n args,\n context,\n async () => {\n const { join, resolve } = await import('node:path');\n const basePath = args.base_path || process.cwd();\n const workspacePath = resolve(join(basePath, args.name));\n \n // Generate title if not provided\n const title = args.title || args.name\n .split('-')\n .map((w: string) => w.charAt(0).toUpperCase() + w.slice(1))\n .join(' ');\n \n await createWorkspace({\n path: workspacePath,\n id: args.name,\n title,\n type: args.type,\n objectives: {\n primaryGoal: args.primary_goal || '',\n secondaryGoals: [],\n keyTakeaways: [],\n },\n });\n \n return {\n workspacePath,\n name: args.name,\n title,\n type: args.type,\n };\n },\n (result) => ({\n workspace: result.workspacePath,\n name: result.name,\n title: result.title,\n type: result.type,\n nextSteps: [\n 'Edit voice/tone.md to define your writing voice',\n 'Edit OBJECTIVES.md to refine your goals',\n 'Run: riotdoc_outline to generate outline',\n 'Run: riotdoc_draft to create first draft',\n ],\n })\n );\n}\n","/**\n * MCP tools for document history and checkpointing\n * \n * Copied and adapted from RiotPlan (src/mcp/tools/history.ts)\n * Original source: /Users/tobrien/gitw/kjerneverk/riotplan/src/mcp/tools/history.ts\n * Adapted for RiotDoc document workflows\n */\n\nimport { z } from \"zod\";\nimport { join } from \"node:path\";\nimport { readFile, writeFile, mkdir, appendFile, readdir } from \"node:fs/promises\";\nimport { formatTimestamp } from \"./shared.js\";\nimport type { ToolResult, ToolExecutionContext } from '../types.js';\nimport type { TimelineEvent, CheckpointMetadata } from '../../types.js';\n\n// Re-export for backward compatibility\nexport type HistoryEvent = TimelineEvent;\nexport type { CheckpointMetadata };\n\n// Tool schemas\nexport const CheckpointCreateSchema = z.object({\n path: z.string().optional().describe(\"Path to document directory\"),\n name: z.string().describe(\"Checkpoint name (kebab-case)\"),\n message: z.string().describe(\"Description of why checkpoint created\"),\n capturePrompt: z.boolean().optional().default(true).describe(\"Capture conversation context\"),\n});\n\nexport const CheckpointListSchema = z.object({\n path: z.string().optional().describe(\"Path to document directory\"),\n});\n\nexport const CheckpointShowSchema = z.object({\n path: z.string().optional().describe(\"Path to document directory\"),\n checkpoint: z.string().describe(\"Checkpoint name\"),\n});\n\nexport const CheckpointRestoreSchema = z.object({\n path: z.string().optional().describe(\"Path to document directory\"),\n checkpoint: z.string().describe(\"Checkpoint name\"),\n});\n\nexport const HistoryShowSchema = z.object({\n path: z.string().optional().describe(\"Path to document directory\"),\n since: z.string().optional().describe(\"Show events since this ISO timestamp\"),\n eventType: z.string().optional().describe(\"Filter by event type\"),\n limit: z.number().optional().describe(\"Maximum number of events to show\"),\n});\n\n// Core history functions\n\n/**\n * Log an event to the timeline\n */\nexport async function logEvent(docPath: string, event: TimelineEvent): Promise<void> {\n const historyDir = join(docPath, '.history');\n await mkdir(historyDir, { recursive: true });\n \n const timelinePath = join(historyDir, 'timeline.jsonl');\n const line = JSON.stringify(event) + '\\n';\n \n await appendFile(timelinePath, line);\n}\n\n/**\n * Read timeline events\n */\nexport async function readTimeline(docPath: string): Promise<TimelineEvent[]> {\n const timelinePath = join(docPath, '.history', 'timeline.jsonl');\n \n try {\n const content = await readFile(timelinePath, 'utf-8');\n return content\n .split('\\n')\n .filter(line => line.trim())\n .map(line => JSON.parse(line));\n } catch (error: any) {\n if (error.code === 'ENOENT') {\n return [];\n }\n throw error;\n }\n}\n\n/**\n * Capture current state snapshot\n */\nasync function captureCurrentState(docPath: string): Promise<{\n timestamp: string;\n status: string;\n config?: { exists: boolean; content?: string };\n outline?: { exists: boolean; content?: string };\n currentDraft?: { exists: boolean; content?: string };\n}> {\n const snapshot = {\n timestamp: formatTimestamp(),\n status: 'unknown',\n config: undefined as { exists: boolean; content?: string } | undefined,\n outline: undefined as { exists: boolean; content?: string } | undefined,\n currentDraft: undefined as { exists: boolean; content?: string } | undefined,\n };\n \n // Try to read config.json\n try {\n const configContent = await readFile(join(docPath, 'config.json'), 'utf-8');\n snapshot.config = {\n content: configContent,\n exists: true,\n };\n \n // Extract status from config\n const config = JSON.parse(configContent);\n snapshot.status = config.status || 'unknown';\n } catch {\n snapshot.config = { exists: false };\n }\n \n // Try to read outline.md\n try {\n const outlineContent = await readFile(join(docPath, 'outline.md'), 'utf-8');\n snapshot.outline = {\n content: outlineContent,\n exists: true,\n };\n } catch {\n snapshot.outline = { exists: false };\n }\n \n // Try to read current draft (find latest draft file)\n try {\n const draftsDir = join(docPath, 'drafts');\n const draftFiles = await readdir(draftsDir);\n const mdDrafts = draftFiles.filter(f => f.endsWith('.md')).sort().reverse();\n \n if (mdDrafts.length > 0) {\n const latestDraft = mdDrafts[0];\n const draftContent = await readFile(join(draftsDir, latestDraft), 'utf-8');\n snapshot.currentDraft = {\n content: draftContent,\n exists: true,\n };\n } else {\n snapshot.currentDraft = { exists: false };\n }\n } catch {\n snapshot.currentDraft = { exists: false };\n }\n \n return snapshot;\n}\n\n/**\n * Count events since last checkpoint\n */\nasync function countEventsSinceLastCheckpoint(docPath: string): Promise<number> {\n const events = await readTimeline(docPath);\n \n // Find last checkpoint\n let lastCheckpointIndex = -1;\n for (let i = events.length - 1; i >= 0; i--) {\n if (events[i].type === 'checkpoint_created') {\n lastCheckpointIndex = i;\n break;\n }\n }\n \n if (lastCheckpointIndex === -1) {\n return events.length;\n }\n \n return events.length - lastCheckpointIndex - 1;\n}\n\n/**\n * Get list of files in document directory\n */\nasync function getChangedFiles(docPath: string): Promise<string[]> {\n try {\n const files = await readdir(docPath);\n return files.filter(f => f.endsWith('.md') || f.endsWith('.json'));\n } catch {\n return [];\n }\n}\n\n/**\n * Format recent events for prompt capture\n */\nasync function formatRecentEvents(docPath: string, limit: number): Promise<string> {\n const events = await readTimeline(docPath);\n const recent = events.slice(-limit);\n \n return recent.map(event => {\n const time = new Date(event.timestamp).toLocaleString();\n return `- ${time}: ${event.type} - ${JSON.stringify(event.data)}`;\n }).join('\\n');\n}\n\n/**\n * Format snapshot for prompt capture\n */\nfunction formatSnapshot(snapshot: any): string {\n let output = '';\n \n if (snapshot.status) {\n output += `**Current Status**: ${snapshot.status}\\n\\n`;\n }\n \n if (snapshot.config?.exists) {\n output += `### config.json\\n\\n\\`\\`\\`json\\n${snapshot.config.content}\\n\\`\\`\\`\\n\\n`;\n }\n \n if (snapshot.outline?.exists) {\n output += `### outline.md\\n\\n${snapshot.outline.content}\\n\\n`;\n }\n \n if (snapshot.currentDraft?.exists) {\n const preview = snapshot.currentDraft.content.substring(0, 500);\n output += `### Current Draft (preview)\\n\\n${preview}...\\n\\n`;\n }\n \n return output;\n}\n\n/**\n * Capture prompt context at checkpoint\n */\nasync function capturePromptContext(\n docPath: string,\n checkpointName: string,\n snapshot: any,\n message: string\n): Promise<void> {\n const promptDir = join(docPath, '.history', 'prompts');\n await mkdir(promptDir, { recursive: true });\n \n const prompt = `# Checkpoint: ${checkpointName}\n\n**Timestamp**: ${snapshot.timestamp}\n**Status**: ${snapshot.status || 'unknown'}\n**Message**: ${message}\n\n## Current State\n\n${formatSnapshot(snapshot)}\n\n## Files at This Point\n\n${(await getChangedFiles(docPath)).map(f => `- ${f}`).join('\\n')}\n\n## Recent Timeline\n\n${await formatRecentEvents(docPath, 10)}\n\n---\n\nThis checkpoint captures the state of the document at this moment in time.\nYou can restore to this checkpoint using: \\`riotdoc_checkpoint_restore({ checkpoint: \"${checkpointName}\" })\\`\n`;\n \n await writeFile(\n join(promptDir, `${checkpointName}.md`),\n prompt\n );\n}\n\n// Tool implementations\n\nexport async function checkpointCreate(args: z.infer<typeof CheckpointCreateSchema>): Promise<string> {\n const docPath = args.path || process.cwd();\n const { name, message, capturePrompt } = args;\n \n // 1. Create checkpoint directory\n const checkpointDir = join(docPath, '.history', 'checkpoints');\n await mkdir(checkpointDir, { recursive: true });\n \n // 2. Snapshot current state\n const snapshot = await captureCurrentState(docPath);\n \n // 3. Save checkpoint metadata\n const checkpoint: CheckpointMetadata = {\n name,\n timestamp: snapshot.timestamp,\n message,\n status: snapshot.status,\n snapshot: {\n timestamp: snapshot.timestamp,\n config: snapshot.config,\n outline: snapshot.outline,\n currentDraft: snapshot.currentDraft,\n },\n context: {\n filesChanged: await getChangedFiles(docPath),\n eventsSinceLastCheckpoint: await countEventsSinceLastCheckpoint(docPath),\n },\n };\n \n await writeFile(\n join(checkpointDir, `${name}.json`),\n JSON.stringify(checkpoint, null, 2)\n );\n \n // 4. Capture prompt if requested\n if (capturePrompt) {\n await capturePromptContext(docPath, name, snapshot, message);\n }\n \n // 5. Log checkpoint event\n const checkpointEvent: TimelineEvent = {\n timestamp: snapshot.timestamp,\n type: 'checkpoint_created',\n data: { \n name, \n message,\n snapshotPath: `.history/checkpoints/${name}.json`,\n promptPath: `.history/prompts/${name}.md`,\n },\n };\n await logEvent(docPath, checkpointEvent);\n \n return `✅ Checkpoint created: ${name}\\n\\nLocation: ${docPath}/.history/checkpoints/${name}.json\\nPrompt: ${docPath}/.history/prompts/${name}.md\\n\\nYou can restore this checkpoint later with:\\n riotdoc_checkpoint_restore({ checkpoint: \"${name}\" })`;\n}\n\nexport async function checkpointList(args: z.infer<typeof CheckpointListSchema>): Promise<string> {\n const docPath = args.path || process.cwd();\n const checkpointDir = join(docPath, '.history', 'checkpoints');\n \n try {\n const files = await readdir(checkpointDir);\n const checkpoints = files.filter(f => f.endsWith('.json'));\n \n if (checkpoints.length === 0) {\n return 'No checkpoints found.';\n }\n \n let output = `Found ${checkpoints.length} checkpoint(s):\\n\\n`;\n \n for (const file of checkpoints) {\n const content = await readFile(join(checkpointDir, file), 'utf-8');\n const checkpoint: CheckpointMetadata = JSON.parse(content);\n const time = new Date(checkpoint.timestamp).toLocaleString();\n output += `- **${checkpoint.name}** (${time})\\n`;\n output += ` Status: ${checkpoint.status}\\n`;\n output += ` Message: ${checkpoint.message}\\n`;\n output += ` Events since last: ${checkpoint.context.eventsSinceLastCheckpoint}\\n\\n`;\n }\n \n return output;\n } catch (error: any) {\n if (error.code === 'ENOENT') {\n return 'No checkpoints found.';\n }\n throw error;\n }\n}\n\nexport async function checkpointShow(args: z.infer<typeof CheckpointShowSchema>): Promise<string> {\n const docPath = args.path || process.cwd();\n const checkpointPath = join(docPath, '.history', 'checkpoints', `${args.checkpoint}.json`);\n \n const content = await readFile(checkpointPath, 'utf-8');\n const checkpoint: CheckpointMetadata = JSON.parse(content);\n \n const time = new Date(checkpoint.timestamp).toLocaleString();\n \n let output = `# Checkpoint: ${checkpoint.name}\\n\\n`;\n output += `**Created**: ${time}\\n`;\n output += `**Status**: ${checkpoint.status}\\n`;\n output += `**Message**: ${checkpoint.message}\\n\\n`;\n output += `## Context\\n\\n`;\n output += `- Files changed: ${checkpoint.context.filesChanged.join(', ')}\\n`;\n output += `- Events since last checkpoint: ${checkpoint.context.eventsSinceLastCheckpoint}\\n\\n`;\n output += `## Snapshot\\n\\n`;\n output += `${formatSnapshot(checkpoint.snapshot)}\\n`;\n output += `\\n---\\n\\n`;\n output += `View full prompt context: ${docPath}/.history/prompts/${args.checkpoint}.md\\n`;\n output += `Restore: riotdoc_checkpoint_restore({ checkpoint: \"${args.checkpoint}\" })`;\n \n return output;\n}\n\nexport async function checkpointRestore(args: z.infer<typeof CheckpointRestoreSchema>): Promise<string> {\n const docPath = args.path || process.cwd();\n const checkpointPath = join(docPath, '.history', 'checkpoints', `${args.checkpoint}.json`);\n \n const content = await readFile(checkpointPath, 'utf-8');\n const checkpoint: CheckpointMetadata = JSON.parse(content);\n \n // Restore files from snapshot\n if (checkpoint.snapshot.config?.exists && checkpoint.snapshot.config.content) {\n await writeFile(join(docPath, 'config.json'), checkpoint.snapshot.config.content);\n }\n \n if (checkpoint.snapshot.outline?.exists && checkpoint.snapshot.outline.content) {\n await writeFile(join(docPath, 'outline.md'), checkpoint.snapshot.outline.content);\n }\n \n if (checkpoint.snapshot.currentDraft?.exists && checkpoint.snapshot.currentDraft.content) {\n // Restore to drafts directory with checkpoint name\n const draftsDir = join(docPath, 'drafts');\n await mkdir(draftsDir, { recursive: true });\n await writeFile(\n join(draftsDir, `restored-from-${args.checkpoint}.md`),\n checkpoint.snapshot.currentDraft.content\n );\n }\n \n // Log restoration event\n const restoreEvent: TimelineEvent = {\n timestamp: formatTimestamp(),\n type: 'checkpoint_restored',\n data: { \n checkpoint: args.checkpoint,\n restoredFrom: checkpoint.timestamp,\n },\n };\n await logEvent(docPath, restoreEvent);\n \n return `✅ Restored to checkpoint: ${args.checkpoint}\\n\\nRestored from: ${checkpoint.timestamp}\\nStatus: ${checkpoint.status}\\n\\nFiles restored:\\n${checkpoint.context.filesChanged.map((f: string) => ` - ${f}`).join('\\n')}`;\n}\n\nexport async function historyShow(args: z.infer<typeof HistoryShowSchema>): Promise<string> {\n const docPath = args.path || process.cwd();\n let events = await readTimeline(docPath);\n \n if (events.length === 0) {\n return 'No history events found.';\n }\n \n // Filter by timestamp if provided\n if (args.since) {\n const sinceTime = new Date(args.since).getTime();\n events = events.filter(e => new Date(e.timestamp).getTime() >= sinceTime);\n }\n \n // Filter by event type if provided\n if (args.eventType) {\n events = events.filter(e => e.type === args.eventType);\n }\n \n // Limit if provided\n if (args.limit) {\n events = events.slice(-args.limit);\n }\n \n let output = `# Document History\\n\\n`;\n output += `Total events: ${events.length}\\n\\n`;\n \n for (const event of events) {\n const time = new Date(event.timestamp).toLocaleString();\n output += `## ${time} - ${event.type}\\n\\n`;\n output += `\\`\\`\\`json\\n${JSON.stringify(event.data, null, 2)}\\n\\`\\`\\`\\n\\n`;\n }\n \n return output;\n}\n\n// Tool executors for MCP\n\nexport async function executeCheckpointCreate(args: any, _context: ToolExecutionContext): Promise<ToolResult> {\n try {\n const validated = CheckpointCreateSchema.parse(args);\n const result = await checkpointCreate(validated);\n return { success: true, data: { message: result } };\n } catch (error: any) {\n return { success: false, error: error.message };\n }\n}\n\nexport async function executeCheckpointList(args: any, _context: ToolExecutionContext): Promise<ToolResult> {\n try {\n const validated = CheckpointListSchema.parse(args);\n const result = await checkpointList(validated);\n return { success: true, data: { message: result } };\n } catch (error: any) {\n return { success: false, error: error.message };\n }\n}\n\nexport async function executeCheckpointShow(args: any, _context: ToolExecutionContext): Promise<ToolResult> {\n try {\n const validated = CheckpointShowSchema.parse(args);\n const result = await checkpointShow(validated);\n return { success: true, data: { message: result } };\n } catch (error: any) {\n return { success: false, error: error.message };\n }\n}\n\nexport async function executeCheckpointRestore(args: any, _context: ToolExecutionContext): Promise<ToolResult> {\n try {\n const validated = CheckpointRestoreSchema.parse(args);\n const result = await checkpointRestore(validated);\n return { success: true, data: { message: result } };\n } catch (error: any) {\n return { success: false, error: error.message };\n }\n}\n\nexport async function executeHistoryShow(args: any, _context: ToolExecutionContext): Promise<ToolResult> {\n try {\n const validated = HistoryShowSchema.parse(args);\n const result = await historyShow(validated);\n return { success: true, data: { message: result } };\n } catch (error: any) {\n return { success: false, error: error.message };\n }\n}\n\n// Tool definitions for MCP\nimport type { McpTool } from '../types.js';\n\nexport const checkpointCreateTool: McpTool = {\n name: \"riotdoc_checkpoint_create\",\n description: \"Create a named checkpoint of current document state with prompt capture. Use this at key decision points to save your progress.\",\n inputSchema: CheckpointCreateSchema.shape as any,\n};\n\nexport const checkpointListTool: McpTool = {\n name: \"riotdoc_checkpoint_list\",\n description: \"List all checkpoints for a document with timestamps and messages.\",\n inputSchema: CheckpointListSchema.shape as any,\n};\n\nexport const checkpointShowTool: McpTool = {\n name: \"riotdoc_checkpoint_show\",\n description: \"Show detailed information about a specific checkpoint including full snapshot.\",\n inputSchema: CheckpointShowSchema.shape as any,\n};\n\nexport const checkpointRestoreTool: McpTool = {\n name: \"riotdoc_checkpoint_restore\",\n description: \"Restore document to a previous checkpoint state. This will overwrite current files with checkpoint snapshot.\",\n inputSchema: CheckpointRestoreSchema.shape as any,\n};\n\nexport const historyShowTool: McpTool = {\n name: \"riotdoc_history_show\",\n description: \"Show document history timeline with all events. Can filter by time, event type, or limit results.\",\n inputSchema: HistoryShowSchema.shape as any,\n};\n","/**\n * MCP tools for outline manipulation\n * \n * Provides programmatic tools for editing document outlines.\n * Primary method is still direct editing - these tools are for\n * conversational/programmatic manipulation.\n */\n\nimport { z } from \"zod\";\nimport { join } from \"node:path\";\nimport { readFile, writeFile } from \"node:fs/promises\";\nimport { formatTimestamp } from \"./shared.js\";\nimport { logEvent } from \"./history.js\";\nimport type { ToolResult, ToolExecutionContext } from '../types.js';\n\n// Tool schemas\nexport const InsertSectionSchema = z.object({\n path: z.string().optional().describe(\"Path to document directory\"),\n title: z.string().describe(\"Section title\"),\n position: z.number().optional().describe(\"Position to insert (1-based, optional)\"),\n after: z.string().optional().describe(\"Insert after this section title (optional)\"),\n});\n\nexport const RenameSectionSchema = z.object({\n path: z.string().optional().describe(\"Path to document directory\"),\n oldTitle: z.string().describe(\"Current section title\"),\n newTitle: z.string().describe(\"New section title\"),\n});\n\nexport const DeleteSectionSchema = z.object({\n path: z.string().optional().describe(\"Path to document directory\"),\n title: z.string().describe(\"Section title to delete\"),\n});\n\nexport const MoveSectionSchema = z.object({\n path: z.string().optional().describe(\"Path to document directory\"),\n title: z.string().describe(\"Section title to move\"),\n position: z.number().describe(\"New position (1-based)\"),\n});\n\n/**\n * Parse outline markdown into sections\n */\nfunction parseOutline(content: string): string[] {\n const lines = content.split('\\n');\n const sections: string[] = [];\n \n for (const line of lines) {\n // Match markdown headings (## Section Title)\n if (line.match(/^##\\s+/)) {\n sections.push(line);\n }\n }\n \n return sections;\n}\n\n/**\n * Find section index by title\n */\nfunction findSectionIndex(sections: string[], title: string): number {\n return sections.findIndex(section => \n section.toLowerCase().includes(title.toLowerCase())\n );\n}\n\n/**\n * Insert section into outline\n */\nexport async function insertSection(args: z.infer<typeof InsertSectionSchema>): Promise<string> {\n const docPath = args.path || process.cwd();\n const outlinePath = join(docPath, 'outline.md');\n \n // Read current outline\n const content = await readFile(outlinePath, 'utf-8');\n const lines = content.split('\\n');\n \n // Determine insertion position\n let insertIndex: number;\n \n if (args.after) {\n // Find the section to insert after\n const afterIndex = lines.findIndex(line => \n line.toLowerCase().includes(args.after!.toLowerCase())\n );\n \n if (afterIndex === -1) {\n throw new Error(`Section not found: ${args.after}`);\n }\n \n insertIndex = afterIndex + 1;\n } else if (args.position) {\n // Count existing sections to validate position\n const sections = parseOutline(content);\n if (args.position < 1 || args.position > sections.length + 1) {\n throw new Error(`Invalid position: ${args.position}. Must be between 1 and ${sections.length + 1}`);\n }\n \n // Find the line index for this section position\n let sectionCount = 0;\n insertIndex = 0;\n \n for (let i = 0; i < lines.length; i++) {\n if (lines[i].match(/^##\\s+/)) {\n sectionCount++;\n if (sectionCount === args.position) {\n insertIndex = i;\n break;\n }\n }\n }\n \n if (insertIndex === 0) {\n insertIndex = lines.length;\n }\n } else {\n // Append to end\n insertIndex = lines.length;\n }\n \n // Insert new section\n const newSection = `## ${args.title}`;\n lines.splice(insertIndex, 0, newSection, '');\n \n // Write updated outline\n await writeFile(outlinePath, lines.join('\\n'));\n \n // Log to timeline\n await logEvent(docPath, {\n timestamp: formatTimestamp(),\n type: 'outline_created',\n data: {\n action: 'insert',\n title: args.title,\n position: insertIndex,\n },\n });\n \n return `✅ Section inserted: \"${args.title}\" at position ${insertIndex}`;\n}\n\n/**\n * Rename section in outline\n */\nexport async function renameSection(args: z.infer<typeof RenameSectionSchema>): Promise<string> {\n const docPath = args.path || process.cwd();\n const outlinePath = join(docPath, 'outline.md');\n \n // Read current outline\n const content = await readFile(outlinePath, 'utf-8');\n const lines = content.split('\\n');\n \n // Find and rename section\n let found = false;\n for (let i = 0; i < lines.length; i++) {\n if (lines[i].match(/^##\\s+/) && \n lines[i].toLowerCase().includes(args.oldTitle.toLowerCase())) {\n lines[i] = `## ${args.newTitle}`;\n found = true;\n break;\n }\n }\n \n if (!found) {\n throw new Error(`Section not found: ${args.oldTitle}`);\n }\n \n // Write updated outline\n await writeFile(outlinePath, lines.join('\\n'));\n \n // Log to timeline\n await logEvent(docPath, {\n timestamp: formatTimestamp(),\n type: 'outline_created',\n data: {\n action: 'rename',\n oldTitle: args.oldTitle,\n newTitle: args.newTitle,\n },\n });\n \n return `✅ Section renamed: \"${args.oldTitle}\" → \"${args.newTitle}\"`;\n}\n\n/**\n * Delete section from outline\n */\nexport async function deleteSection(args: z.infer<typeof DeleteSectionSchema>): Promise<string> {\n const docPath = args.path || process.cwd();\n const outlinePath = join(docPath, 'outline.md');\n \n // Read current outline\n const content = await readFile(outlinePath, 'utf-8');\n const lines = content.split('\\n');\n \n // Find and delete section\n let found = false;\n let deleteIndex = -1;\n \n for (let i = 0; i < lines.length; i++) {\n if (lines[i].match(/^##\\s+/) && \n lines[i].toLowerCase().includes(args.title.toLowerCase())) {\n deleteIndex = i;\n found = true;\n break;\n }\n }\n \n if (!found) {\n throw new Error(`Section not found: ${args.title}`);\n }\n \n // Remove section line (and empty line after if present)\n lines.splice(deleteIndex, lines[deleteIndex + 1] === '' ? 2 : 1);\n \n // Write updated outline\n await writeFile(outlinePath, lines.join('\\n'));\n \n // Log to timeline\n await logEvent(docPath, {\n timestamp: formatTimestamp(),\n type: 'outline_created',\n data: {\n action: 'delete',\n title: args.title,\n },\n });\n \n return `✅ Section deleted: \"${args.title}\"`;\n}\n\n/**\n * Move section to new position\n */\nexport async function moveSection(args: z.infer<typeof MoveSectionSchema>): Promise<string> {\n const docPath = args.path || process.cwd();\n const outlinePath = join(docPath, 'outline.md');\n \n // Read current outline\n const content = await readFile(outlinePath, 'utf-8');\n const lines = content.split('\\n');\n \n // Find section to move\n let sectionIndex = -1;\n let sectionLine = '';\n \n for (let i = 0; i < lines.length; i++) {\n if (lines[i].match(/^##\\s+/) && \n lines[i].toLowerCase().includes(args.title.toLowerCase())) {\n sectionIndex = i;\n sectionLine = lines[i];\n break;\n }\n }\n \n if (sectionIndex === -1) {\n throw new Error(`Section not found: ${args.title}`);\n }\n \n // Remove section from current position\n lines.splice(sectionIndex, 1);\n \n // Calculate new position (adjust if moving down)\n const sections = parseOutline(lines.join('\\n'));\n if (args.position < 1 || args.position > sections.length + 1) {\n throw new Error(`Invalid position: ${args.position}. Must be between 1 and ${sections.length + 1}`);\n }\n \n // Find insertion point\n let insertIndex = 0;\n let sectionCount = 0;\n \n for (let i = 0; i < lines.length; i++) {\n if (lines[i].match(/^##\\s+/)) {\n sectionCount++;\n if (sectionCount === args.position) {\n insertIndex = i;\n break;\n }\n }\n }\n \n if (insertIndex === 0 && args.position > sections.length) {\n insertIndex = lines.length;\n }\n \n // Insert at new position\n lines.splice(insertIndex, 0, sectionLine);\n \n // Write updated outline\n await writeFile(outlinePath, lines.join('\\n'));\n \n // Log to timeline\n await logEvent(docPath, {\n timestamp: formatTimestamp(),\n type: 'outline_created',\n data: {\n action: 'move',\n title: args.title,\n newPosition: args.position,\n },\n });\n \n return `✅ Section moved: \"${args.title}\" to position ${args.position}`;\n}\n\n// Tool executors for MCP\n\nexport async function executeInsertSection(args: any, _context: ToolExecutionContext): Promise<ToolResult> {\n try {\n const validated = InsertSectionSchema.parse(args);\n const result = await insertSection(validated);\n return { success: true, data: { message: result } };\n } catch (error: any) {\n return { success: false, error: error.message };\n }\n}\n\nexport async function executeRenameSection(args: any, _context: ToolExecutionContext): Promise<ToolResult> {\n try {\n const validated = RenameSectionSchema.parse(args);\n const result = await renameSection(validated);\n return { success: true, data: { message: result } };\n } catch (error: any) {\n return { success: false, error: error.message };\n }\n}\n\nexport async function executeDeleteSection(args: any, _context: ToolExecutionContext): Promise<ToolResult> {\n try {\n const validated = DeleteSectionSchema.parse(args);\n const result = await deleteSection(validated);\n return { success: true, data: { message: result } };\n } catch (error: any) {\n return { success: false, error: error.message };\n }\n}\n\nexport async function executeMoveSection(args: any, _context: ToolExecutionContext): Promise<ToolResult> {\n try {\n const validated = MoveSectionSchema.parse(args);\n const result = await moveSection(validated);\n return { success: true, data: { message: result } };\n } catch (error: any) {\n return { success: false, error: error.message };\n }\n}\n\n// Tool definitions for MCP\nimport type { McpTool } from '../types.js';\n\nexport const insertSectionTool: McpTool = {\n name: \"riotdoc_outline_insert_section\",\n description: \"Insert a new section into the document outline. Can specify position or insert after a specific section.\",\n inputSchema: InsertSectionSchema.shape as any,\n};\n\nexport const renameSectionTool: McpTool = {\n name: \"riotdoc_outline_rename_section\",\n description: \"Rename an existing section in the document outline.\",\n inputSchema: RenameSectionSchema.shape as any,\n};\n\nexport const deleteSectionTool: McpTool = {\n name: \"riotdoc_outline_delete_section\",\n description: \"Delete a section from the document outline.\",\n inputSchema: DeleteSectionSchema.shape as any,\n};\n\nexport const moveSectionTool: McpTool = {\n name: \"riotdoc_outline_move_section\",\n description: \"Move a section to a new position in the document outline.\",\n inputSchema: MoveSectionSchema.shape as any,\n};\n","/**\n * Draft Tool\n */\n\nimport type { McpTool, ToolResult, ToolExecutionContext } from '../types.js';\n\nexport const draftTool: McpTool = {\n name: 'riotdoc_draft',\n description:\n 'Create a new draft or retrieve existing drafts. ' +\n 'Drafts are numbered sequentially and stored in the drafts/ directory. ' +\n 'Each draft includes metadata about creation time, word count, and assistance level.',\n inputSchema: {\n type: 'object',\n properties: {\n path: {\n type: 'string',\n description: 'Path to document workspace (defaults to current directory)',\n },\n assistance_level: {\n type: 'string',\n enum: ['generate', 'expand', 'revise', 'cleanup', 'spellcheck'],\n description: 'Level of AI assistance for draft creation',\n },\n draft_number: {\n type: 'number',\n description: 'Specific draft number to retrieve (omit to list all)',\n },\n },\n },\n};\n\nexport async function executeDraft(args: any, _context: ToolExecutionContext): Promise<ToolResult> {\n const workspacePath = args.path || process.cwd();\n \n return {\n success: true,\n data: {\n action: 'pending',\n path: workspacePath,\n note: 'Draft creation implementation pending - requires AI integration',\n assistanceLevel: args.assistance_level,\n },\n message: 'Draft command - implementation pending',\n };\n}\n","/**\n * Status Tool\n */\n\n \nimport type { McpTool, ToolResult, ToolExecutionContext } from '../types.js';\nimport { loadDocument } from '../../workspace/loader.js';\nimport { executeCommand } from './shared.js';\n \n\nexport const statusTool: McpTool = {\n name: 'riotdoc_status',\n description:\n 'Get document status and metadata. ' +\n 'Returns information about the document including title, type, status, dates, and word count target.',\n inputSchema: {\n type: 'object',\n properties: {\n path: {\n type: 'string',\n description: 'Path to document workspace (defaults to current directory)',\n },\n },\n },\n};\n\nexport async function executeStatus(args: any, context: ToolExecutionContext): Promise<ToolResult> {\n return executeCommand(\n args,\n context,\n async () => {\n const workspacePath = args.path || process.cwd();\n const doc = await loadDocument(workspacePath);\n \n if (!doc) {\n throw new Error('Not a RiotDoc workspace');\n }\n \n return {\n path: workspacePath,\n title: doc.config.title,\n type: doc.config.type,\n status: doc.config.status,\n createdAt: doc.config.createdAt.toISOString(),\n updatedAt: doc.config.updatedAt.toISOString(),\n targetWordCount: doc.config.targetWordCount,\n audience: doc.config.audience,\n draftCount: doc.drafts.length,\n evidenceCount: doc.evidence.length,\n };\n }\n );\n}\n","/**\n * Spellcheck Tool\n */\n\n \nimport type { McpTool, ToolResult, ToolExecutionContext } from '../types.js';\n \n\nexport const spellcheckTool: McpTool = {\n name: 'riotdoc_spellcheck',\n description:\n 'Run spell checking on document content. ' +\n 'Checks drafts and other markdown files for spelling errors.',\n inputSchema: {\n type: 'object',\n properties: {\n path: {\n type: 'string',\n description: 'Path to document workspace (defaults to current directory)',\n },\n file: {\n type: 'string',\n description: 'Specific file to check (omit to check all drafts)',\n },\n },\n },\n};\n\nexport async function executeSpellcheck(args: any, _context: ToolExecutionContext): Promise<ToolResult> {\n const workspacePath = args.path || process.cwd();\n \n return {\n success: true,\n data: {\n action: 'pending',\n path: workspacePath,\n file: args.file,\n note: 'Spellcheck implementation pending',\n },\n message: 'Spellcheck command - implementation pending',\n };\n}\n","/**\n * Cleanup Tool\n */\n\n \nimport type { McpTool, ToolResult, ToolExecutionContext } from '../types.js';\n \n\nexport const cleanupTool: McpTool = {\n name: 'riotdoc_cleanup',\n description:\n 'Clean up document workspace by removing temporary files and old drafts. ' +\n 'Helps maintain a tidy workspace structure.',\n inputSchema: {\n type: 'object',\n properties: {\n path: {\n type: 'string',\n description: 'Path to document workspace (defaults to current directory)',\n },\n keep_drafts: {\n type: 'number',\n description: 'Number of recent drafts to keep (default: 5)',\n },\n dry_run: {\n type: 'boolean',\n description: 'Show what would be cleaned without actually deleting',\n },\n },\n },\n};\n\nexport async function executeCleanup(args: any, _context: ToolExecutionContext): Promise<ToolResult> {\n const workspacePath = args.path || process.cwd();\n \n return {\n success: true,\n data: {\n action: 'pending',\n path: workspacePath,\n keepDrafts: args.keep_drafts || 5,\n dryRun: args.dry_run || false,\n note: 'Cleanup implementation pending',\n },\n message: 'Cleanup command - implementation pending',\n };\n}\n","/**\n * Export Tool\n */\n\n \nimport type { McpTool, ToolResult, ToolExecutionContext } from '../types.js';\n \n\nexport const exportTool: McpTool = {\n name: 'riotdoc_export',\n description:\n 'Export document to various formats (HTML, PDF, DOCX, etc.). ' +\n 'Converts the final draft to the desired output format.',\n inputSchema: {\n type: 'object',\n properties: {\n path: {\n type: 'string',\n description: 'Path to document workspace (defaults to current directory)',\n },\n format: {\n type: 'string',\n enum: ['html', 'pdf', 'docx', 'markdown'],\n description: 'Export format',\n },\n draft: {\n type: 'number',\n description: 'Draft number to export (defaults to latest)',\n },\n output: {\n type: 'string',\n description: 'Output file path (defaults to export/ directory)',\n },\n },\n required: ['format'],\n },\n};\n\nexport async function executeExport(args: any, _context: ToolExecutionContext): Promise<ToolResult> {\n const workspacePath = args.path || process.cwd();\n \n return {\n success: true,\n data: {\n action: 'pending',\n path: workspacePath,\n format: args.format,\n draft: args.draft,\n output: args.output,\n note: 'Export implementation pending',\n },\n message: 'Export command - implementation pending',\n };\n}\n","/**\n * Revise Tool\n */\n\n \nimport type { McpTool, ToolResult, ToolExecutionContext } from '../types.js';\n \n\nexport const reviseTool: McpTool = {\n name: 'riotdoc_revise',\n description:\n 'Add revision feedback to a draft. ' +\n 'Captures feedback and suggestions for improving a specific draft.',\n inputSchema: {\n type: 'object',\n properties: {\n path: {\n type: 'string',\n description: 'Path to document workspace (defaults to current directory)',\n },\n draft: {\n type: 'number',\n description: 'Target draft number for revision',\n },\n feedback: {\n type: 'string',\n description: 'Revision feedback and suggestions',\n },\n },\n required: ['feedback'],\n },\n};\n\nexport async function executeRevise(args: any, _context: ToolExecutionContext): Promise<ToolResult> {\n const workspacePath = args.path || process.cwd();\n \n return {\n success: true,\n data: {\n action: 'pending',\n path: workspacePath,\n draft: args.draft,\n feedback: args.feedback,\n note: 'Revise implementation pending',\n },\n message: 'Revise command - implementation pending',\n };\n}\n","/**\n * MCP Tool Definitions and Executors\n *\n * Provides MCP tool interfaces for riotdoc commands\n */\n\n \nimport type { McpTool, ToolResult, ToolExecutionContext } from '../types.js';\n\n// Tool imports\nimport { createTool, executeCreate } from './create.js';\nimport { \n insertSectionTool, \n renameSectionTool, \n deleteSectionTool, \n moveSectionTool,\n executeInsertSection,\n executeRenameSection,\n executeDeleteSection,\n executeMoveSection\n} from './outline.js';\nimport { draftTool, executeDraft } from './draft.js';\nimport { statusTool, executeStatus } from './status.js';\nimport { spellcheckTool, executeSpellcheck } from './spellcheck.js';\nimport { cleanupTool, executeCleanup } from './cleanup.js';\nimport { exportTool, executeExport } from './export.js';\nimport { reviseTool, executeRevise } from './revise.js';\n \n\n/**\n * Base tool executor - wraps command logic\n */\nexport async function executeTool(\n toolName: string,\n args: Record<string, any>,\n context: ToolExecutionContext\n): Promise<ToolResult> {\n try {\n // Route to specific tool handler\n switch (toolName) {\n case 'riotdoc_create':\n return await executeCreate(args, context);\n case 'riotdoc_outline_insert_section':\n return await executeInsertSection(args, context);\n case 'riotdoc_outline_rename_section':\n return await executeRenameSection(args, context);\n case 'riotdoc_outline_delete_section':\n return await executeDeleteSection(args, context);\n case 'riotdoc_outline_move_section':\n return await executeMoveSection(args, context);\n case 'riotdoc_draft':\n return await executeDraft(args, context);\n case 'riotdoc_status':\n return await executeStatus(args, context);\n case 'riotdoc_spellcheck':\n return await executeSpellcheck(args, context);\n case 'riotdoc_cleanup':\n return await executeCleanup(args, context);\n case 'riotdoc_export':\n return await executeExport(args, context);\n case 'riotdoc_revise':\n return await executeRevise(args, context);\n default:\n return {\n success: false,\n error: `Unknown tool: ${toolName}`,\n };\n }\n } catch (error: any) {\n return {\n success: false,\n error: error.message || 'Tool execution failed',\n context: {\n tool: toolName,\n args,\n },\n };\n }\n}\n\n/**\n * Tool definitions array\n */\nexport const tools: McpTool[] = [\n createTool,\n insertSectionTool,\n renameSectionTool,\n deleteSectionTool,\n moveSectionTool,\n draftTool,\n statusTool,\n spellcheckTool,\n cleanupTool,\n exportTool,\n reviseTool,\n];\n","/**\n * URI Parser for RiotDoc MCP Resources\n *\n * Parses riotdoc:// URIs into structured components\n */\n\n \nimport type { RiotdocUri } from './types.js';\n \n\n/**\n * Parse a riotdoc:// URI\n *\n * Format: riotdoc://type[/path][?query]\n *\n * Examples:\n * - riotdoc://config\n * - riotdoc://config/path/to/workspace\n * - riotdoc://document/path/to/workspace\n * - riotdoc://outline/path/to/workspace\n * - riotdoc://status/path/to/workspace\n */\nexport function parseRiotdocUri(uri: string): RiotdocUri {\n if (!uri.startsWith('riotdoc://')) {\n throw new Error(`Invalid riotdoc URI: ${uri}`);\n }\n\n const withoutScheme = uri.slice('riotdoc://'.length);\n const [pathPart, queryPart] = withoutScheme.split('?');\n const segments = pathPart.split('/').filter(Boolean);\n\n if (segments.length === 0) {\n throw new Error(`Invalid riotdoc URI: missing resource type`);\n }\n\n const type = segments[0] as RiotdocUri['type'];\n const path = segments.slice(1).join('/') || undefined;\n\n // Parse query string if present\n const query: Record<string, string> = {};\n if (queryPart) {\n const params = new URLSearchParams(queryPart);\n for (const [key, value] of params) {\n query[key] = value;\n }\n }\n\n return {\n scheme: 'riotdoc',\n type,\n path,\n query: Object.keys(query).length > 0 ? query : undefined,\n };\n}\n\n/**\n * Build a riotdoc:// URI from components\n */\nexport function buildRiotdocUri(\n type: RiotdocUri['type'],\n path?: string,\n query?: Record<string, string>\n): string {\n let uri = `riotdoc://${type}`;\n \n if (path) {\n uri += `/${path}`;\n }\n \n if (query && Object.keys(query).length > 0) {\n const params = new URLSearchParams(query);\n uri += `?${params.toString()}`;\n }\n \n return uri;\n}\n","/**\n * Config Resource Handler\n *\n * Provides access to riotdoc configuration via MCP resources\n */\n\n \nimport type { RiotdocUri, ConfigResource } from '../types.js';\nimport { readFile } from 'node:fs/promises';\nimport { join } from 'node:path';\nimport { parse } from 'yaml';\n \n\n/**\n * Read configuration resource\n */\nexport async function readConfigResource(uri: RiotdocUri): Promise<ConfigResource> {\n const directory = uri.path || process.cwd();\n const configPath = join(directory, 'riotdoc.yaml');\n\n try {\n const content = await readFile(configPath, 'utf-8');\n const config = parse(content);\n\n return {\n path: directory,\n exists: true,\n config,\n };\n } catch {\n return {\n path: directory,\n exists: false,\n config: undefined,\n };\n }\n}\n","/**\n * Status Resource Handler\n *\n * Provides document status via MCP resources\n */\n\n \nimport type { RiotdocUri, DocumentStatusResource } from '../types.js';\nimport { loadDocument } from '../../workspace/loader.js';\n \n\n/**\n * Read status resource\n */\nexport async function readStatusResource(uri: RiotdocUri): Promise<DocumentStatusResource> {\n const directory = uri.path || process.cwd();\n\n const doc = await loadDocument(directory);\n if (!doc) {\n throw new Error('Not a RiotDoc workspace');\n }\n\n return {\n path: directory,\n title: doc.config.title,\n type: doc.config.type,\n status: doc.config.status,\n createdAt: doc.config.createdAt.toISOString(),\n updatedAt: doc.config.updatedAt.toISOString(),\n targetWordCount: doc.config.targetWordCount,\n audience: doc.config.audience,\n };\n}\n","/**\n * Document Resource Handler\n *\n * Provides complete document state via MCP resources\n */\n\n \nimport type { RiotdocUri, DocumentResource } from '../types.js';\nimport { loadDocument } from '../../workspace/loader.js';\n \n\n/**\n * Read document resource\n */\nexport async function readDocumentResource(uri: RiotdocUri): Promise<DocumentResource> {\n const directory = uri.path || process.cwd();\n\n const doc = await loadDocument(directory);\n if (!doc) {\n throw new Error('Not a RiotDoc workspace');\n }\n\n return {\n path: directory,\n config: {\n id: doc.config.id,\n title: doc.config.title,\n type: doc.config.type,\n status: doc.config.status,\n createdAt: doc.config.createdAt.toISOString(),\n updatedAt: doc.config.updatedAt.toISOString(),\n targetWordCount: doc.config.targetWordCount,\n audience: doc.config.audience,\n },\n voice: doc.voice,\n objectives: doc.objectives,\n outline: undefined, // Loaded separately if needed\n drafts: doc.drafts.map(d => ({\n number: d.number,\n path: d.path,\n createdAt: d.createdAt.toISOString(),\n wordCount: d.wordCount,\n })),\n evidence: doc.evidence.map(e => ({\n id: e.id,\n path: e.path,\n description: e.description,\n type: e.type,\n })),\n };\n}\n","/**\n * Outline Resource Handler\n *\n * Provides document outline via MCP resources\n */\n\n \nimport type { RiotdocUri, OutlineResource } from '../types.js';\nimport { loadOutline } from '../../outline/generator.js';\n \n\n/**\n * Read outline resource\n */\nexport async function readOutlineResource(uri: RiotdocUri): Promise<OutlineResource> {\n const directory = uri.path || process.cwd();\n\n try {\n const content = await loadOutline(directory);\n return {\n path: directory,\n content,\n exists: true,\n };\n } catch {\n return {\n path: directory,\n content: '',\n exists: false,\n };\n }\n}\n","/**\n * Objectives Resource Handler\n *\n * Provides document objectives via MCP resources\n */\n\n \nimport type { RiotdocUri, ObjectivesResource } from '../types.js';\nimport { loadObjectives } from '../../objectives/loader.js';\n \n\n/**\n * Read objectives resource\n */\nexport async function readObjectivesResource(uri: RiotdocUri): Promise<ObjectivesResource> {\n const directory = uri.path || process.cwd();\n\n const objectives = await loadObjectives(directory);\n\n return {\n path: directory,\n primaryGoal: objectives.primaryGoal,\n secondaryGoals: objectives.secondaryGoals,\n keyTakeaways: objectives.keyTakeaways,\n callToAction: objectives.callToAction,\n emotionalArc: objectives.emotionalArc,\n };\n}\n","/**\n * Voice Resource Handler\n *\n * Provides voice configuration via MCP resources\n */\n\n \nimport type { RiotdocUri, VoiceResource } from '../types.js';\nimport { loadVoice } from '../../voice/loader.js';\n \n\n/**\n * Read voice resource\n */\nexport async function readVoiceResource(uri: RiotdocUri): Promise<VoiceResource> {\n const directory = uri.path || process.cwd();\n\n const voice = await loadVoice(directory);\n\n return {\n path: directory,\n tone: voice.tone,\n pointOfView: voice.pointOfView,\n styleNotes: voice.styleNotes,\n avoid: voice.avoid,\n examplePhrases: voice.examplePhrases,\n };\n}\n","/**\n * Style Report Resource Handler\n *\n * Provides style validation results via MCP resources\n */\n\n \nimport type { RiotdocUri, StyleReportResource } from '../types.js';\n \n\n/**\n * Read style report resource\n */\nexport async function readStyleReportResource(uri: RiotdocUri): Promise<StyleReportResource> {\n const directory = uri.path || process.cwd();\n\n // TODO: Implement style validation\n // For now, return empty report\n return {\n path: directory,\n issues: [],\n summary: {\n errors: 0,\n warnings: 0,\n info: 0,\n },\n };\n}\n","/**\n * MCP Resource Handlers\n *\n * Provides read-only access to riotdoc data via MCP resources\n */\n\n \nimport type { McpResource } from '../types.js';\nimport { parseRiotdocUri } from '../uri.js';\nimport { readConfigResource } from './config.js';\nimport { readStatusResource } from './status.js';\nimport { readDocumentResource } from './document.js';\nimport { readOutlineResource } from './outline.js';\nimport { readObjectivesResource } from './objectives.js';\nimport { readVoiceResource } from './voice.js';\nimport { readStyleReportResource } from './style-report.js';\n \n\n/**\n * Get all available resources\n */\nexport function getResources(): McpResource[] {\n return [\n {\n uri: 'riotdoc://config',\n name: 'Configuration',\n description: 'Loads riotdoc configuration from riotdoc.yaml. ' +\n 'URI format: riotdoc://config[/path/to/workspace]. ' +\n 'If no path is provided, uses current working directory. ' +\n 'Returns: { path: string, exists: boolean, config: object }. ' +\n 'The config object includes document metadata, type, status, and settings.',\n mimeType: 'application/json',\n },\n {\n uri: 'riotdoc://status',\n name: 'Document Status',\n description: 'Gets the current document status including title, type, dates, and progress. ' +\n 'URI format: riotdoc://status[/path/to/workspace]. ' +\n 'Returns: { path, title, type, status, createdAt, updatedAt, targetWordCount, audience }. ' +\n 'Use this to check the state of a document before operations.',\n mimeType: 'application/json',\n },\n {\n uri: 'riotdoc://document',\n name: 'Complete Document',\n description: 'Loads complete document state including config, voice, objectives, drafts, and evidence. ' +\n 'URI format: riotdoc://document[/path/to/workspace]. ' +\n 'Returns comprehensive document information. ' +\n 'Use this to get a full snapshot of the document workspace.',\n mimeType: 'application/json',\n },\n {\n uri: 'riotdoc://outline',\n name: 'Document Outline',\n description: 'Retrieves the document outline from OUTLINE.md. ' +\n 'URI format: riotdoc://outline[/path/to/workspace]. ' +\n 'Returns: { path, content, exists }. ' +\n 'The outline provides the structural framework for the document.',\n mimeType: 'application/json',\n },\n {\n uri: 'riotdoc://objectives',\n name: 'Document Objectives',\n description: 'Loads document objectives from OBJECTIVES.md. ' +\n 'URI format: riotdoc://objectives[/path/to/workspace]. ' +\n 'Returns: { path, primaryGoal, secondaryGoals, keyTakeaways, callToAction, emotionalArc }. ' +\n 'Objectives define what the document aims to achieve.',\n mimeType: 'application/json',\n },\n {\n uri: 'riotdoc://voice',\n name: 'Voice Configuration',\n description: 'Retrieves voice and tone configuration from voice/tone.md. ' +\n 'URI format: riotdoc://voice[/path/to/workspace]. ' +\n 'Returns: { path, tone, pointOfView, styleNotes, avoid, examplePhrases }. ' +\n 'Voice configuration defines the writing style and tone.',\n mimeType: 'application/json',\n },\n {\n uri: 'riotdoc://style-report',\n name: 'Style Validation Report',\n description: 'Gets style validation results for the document. ' +\n 'URI format: riotdoc://style-report[/path/to/workspace]. ' +\n 'Returns: { path, issues: Array<{line, column, severity, message, rule}>, summary }. ' +\n 'Use this to check for style violations and writing quality issues.',\n mimeType: 'application/json',\n },\n ];\n}\n\n/**\n * Read a resource by URI\n */\nexport async function readResource(uri: string): Promise<any> {\n const parsed = parseRiotdocUri(uri);\n\n switch (parsed.type) {\n case 'config':\n return readConfigResource(parsed);\n case 'status':\n return readStatusResource(parsed);\n case 'document':\n return readDocumentResource(parsed);\n case 'outline':\n return readOutlineResource(parsed);\n case 'objectives':\n return readObjectivesResource(parsed);\n case 'voice':\n return readVoiceResource(parsed);\n case 'style-report':\n return readStyleReportResource(parsed);\n default:\n throw new Error(`Unknown resource type: ${parsed.type}`);\n }\n}\n\n// Re-export individual handlers for testing\nexport {\n readConfigResource,\n readStatusResource,\n readDocumentResource,\n readOutlineResource,\n readObjectivesResource,\n readVoiceResource,\n readStyleReportResource,\n};\n","/**\n * MCP Prompt Handlers\n *\n * Provides workflow templates via MCP prompts.\n * Prompts are loaded from external markdown files in this directory.\n */\n\nimport { readFileSync } from 'node:fs';\nimport { resolve, dirname } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n \nimport type { McpPrompt, McpPromptMessage } from '../types.js';\n \n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n/**\n * Helper to resolve the prompts directory path\n * When bundled, the MCP server is at dist/mcp-server.js and prompts are at dist/mcp/prompts/\n * When running from source, prompts are at src/mcp/prompts/\n */\nfunction getPromptsDir(): string {\n // Check if we're running from a bundled file\n const isBundled = __dirname.includes('/dist') || __dirname.endsWith('dist') ||\n __filename.includes('dist/mcp-server.js') || __filename.includes('dist\\\\mcp-server.js');\n\n if (isBundled) {\n // When bundled, prompts are at dist/mcp/prompts/\n const promptsDir = resolve(__dirname, 'mcp/prompts');\n return promptsDir;\n }\n // When running from source, prompts are in the same directory as this file\n return __dirname;\n}\n\n/**\n * Helper to load a prompt template from a markdown file\n */\nfunction loadTemplate(name: string): string {\n const promptsDir = getPromptsDir();\n const path = resolve(promptsDir, `${name}.md`);\n try {\n return readFileSync(path, 'utf-8').trim();\n } catch (error) {\n throw new Error(`Failed to load prompt template \"${name}\" from ${path}: ${error}`);\n }\n}\n\n/**\n * Helper to replace placeholders in a template\n */\nfunction fillTemplate(template: string, args: Record<string, string>): string {\n return template.replace(/\\${(\\w+)}/g, (_, key) => {\n return args[key] || `[${key}]`;\n });\n}\n\n/**\n * Get all available prompts\n */\nexport function getPrompts(): McpPrompt[] {\n return [\n {\n name: 'create_document',\n description: 'Guided workflow for creating a new document workspace',\n arguments: [\n {\n name: 'name',\n description: 'Document workspace name',\n required: true,\n },\n {\n name: 'type',\n description: 'Document type (blog-post, podcast-script, technical-doc, newsletter, custom)',\n required: true,\n },\n {\n name: 'title',\n description: 'Document title',\n required: false,\n },\n {\n name: 'goal',\n description: 'Primary goal',\n required: false,\n },\n {\n name: 'audience',\n description: 'Target audience',\n required: false,\n },\n {\n name: 'base_path',\n description: 'Base path for workspace',\n required: false,\n },\n ],\n },\n {\n name: 'outline_document',\n description: 'Guided workflow for generating or refining document outline',\n arguments: [\n {\n name: 'path',\n description: 'Document workspace path',\n required: false,\n },\n ],\n },\n {\n name: 'draft_document',\n description: 'Guided workflow for creating document drafts with AI assistance',\n arguments: [\n {\n name: 'path',\n description: 'Document workspace path',\n required: false,\n },\n {\n name: 'level',\n description: 'Assistance level (generate, expand, revise, cleanup, spellcheck)',\n required: false,\n },\n ],\n },\n {\n name: 'review_document',\n description: 'Guided workflow for reviewing and providing feedback on drafts',\n arguments: [\n {\n name: 'path',\n description: 'Document workspace path',\n required: false,\n },\n {\n name: 'draft_number',\n description: 'Draft number to review',\n required: false,\n },\n ],\n },\n ];\n}\n\n/**\n * Get a prompt by name\n */\nexport async function getPrompt(\n name: string,\n args: Record<string, string>\n): Promise<McpPromptMessage[]> {\n // Validate prompt exists\n const prompts = getPrompts();\n if (!prompts.find(p => p.name === name)) {\n throw new Error(`Unknown prompt: ${name}`);\n }\n\n // Load and fill template\n const template = loadTemplate(name);\n\n // Set default values for common arguments if missing\n const filledArgs = { ...args };\n if (!filledArgs.path) filledArgs.path = 'current directory';\n if (!filledArgs.base_path) filledArgs.base_path = 'current directory';\n\n const content = fillTemplate(template, filledArgs);\n\n return [\n {\n role: 'user',\n content: {\n type: 'text',\n text: content,\n },\n },\n ];\n}\n","#!/usr/bin/env node\n/**\n * RiotDoc MCP Server\n *\n * Exposes riotdoc commands, resources, and prompts via MCP.\n *\n * This server provides:\n * - Tools: Document creation and management commands\n * - Resources: Document state, configuration, and content\n * - Prompts: Workflow templates for document operations\n *\n * Uses McpServer high-level API for better progress notification support\n */\n\n \nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { z } from 'zod';\nimport { executeTool } from './tools.js';\nimport { getResources, readResource } from './resources/index.js';\nimport { getPrompts, getPrompt } from './prompts/index.js';\n \n\n/**\n * Recursively remove undefined values from an object to prevent JSON serialization issues\n * Preserves null values as they are valid in JSON\n */\nexport function removeUndefinedValues(obj: any): any {\n if (obj === undefined) {\n return undefined;\n }\n if (obj === null) {\n return null;\n }\n if (Array.isArray(obj)) {\n return obj.map(removeUndefinedValues).filter(item => item !== undefined);\n }\n if (typeof obj === 'object') {\n const cleaned: Record<string, any> = {};\n for (const [key, value] of Object.entries(obj)) {\n const cleanedValue = removeUndefinedValues(value);\n if (cleanedValue !== undefined) {\n cleaned[key] = cleanedValue;\n }\n }\n return cleaned;\n }\n return obj;\n}\n\nasync function main() {\n // Initialize MCP server with high-level API\n const server = new McpServer(\n {\n name: 'riotdoc',\n version: '1.0.0',\n },\n {\n capabilities: {\n tools: {},\n resources: {\n subscribe: false,\n listChanged: false,\n },\n prompts: {\n listChanged: false,\n },\n },\n }\n );\n\n // ========================================================================\n // Tools Handlers\n // ========================================================================\n\n /**\n * Helper to register a tool with progress notification support\n */\n function registerTool(\n name: string,\n description: string,\n inputSchema: z.ZodRawShape\n ) {\n server.tool(\n name,\n description,\n inputSchema,\n async (args, { sendNotification, _meta }) => {\n const context = {\n workingDirectory: process.cwd(),\n config: undefined,\n logger: undefined,\n sendNotification: async (notification: {\n method: string;\n params: {\n progressToken?: string | number;\n progress: number;\n total?: number;\n message?: string;\n };\n }) => {\n if (notification.method === 'notifications/progress' && _meta?.progressToken) {\n const params: Record<string, any> = {\n progressToken: _meta.progressToken,\n progress: notification.params.progress,\n };\n if (notification.params.total !== undefined) {\n params.total = notification.params.total;\n }\n if (notification.params.message !== undefined) {\n params.message = notification.params.message;\n }\n await sendNotification({\n method: 'notifications/progress',\n params: removeUndefinedValues(params) as any,\n });\n }\n },\n progressToken: _meta?.progressToken,\n };\n\n const result = await executeTool(name, args, context);\n\n if (result.success) {\n const content: Array<{ type: 'text'; text: string }> = [];\n\n if (result.logs && result.logs.length > 0) {\n content.push({\n type: 'text' as const,\n text: '=== Command Output ===\\n' + result.logs.join('\\n') + '\\n\\n=== Result ===',\n });\n }\n\n const cleanData = removeUndefinedValues(result.data);\n content.push({\n type: 'text' as const,\n text: JSON.stringify(cleanData, null, 2),\n });\n\n return { content };\n } else {\n const errorParts: string[] = [];\n\n if (result.logs && result.logs.length > 0) {\n errorParts.push('=== Command Output ===');\n errorParts.push(result.logs.join('\\n'));\n errorParts.push('\\n=== Error ===');\n }\n\n errorParts.push(result.error || 'Unknown error');\n\n if (result.context && typeof result.context === 'object') {\n errorParts.push('\\n=== Context ===');\n for (const [key, value] of Object.entries(result.context)) {\n if (value !== undefined && value !== null) {\n errorParts.push(`${key}: ${String(value)}`);\n }\n }\n }\n\n if (result.recovery && result.recovery.length > 0) {\n errorParts.push('\\n=== Recovery Steps ===');\n errorParts.push(...result.recovery.map((step, i) => `${i + 1}. ${step}`));\n }\n\n return {\n content: [{\n type: 'text' as const,\n text: errorParts.join('\\n'),\n }],\n isError: true,\n };\n }\n }\n );\n }\n\n // Register all tools\n registerTool(\n 'riotdoc_create',\n 'Create a new document workspace with structured directories and configuration',\n {\n name: z.string(),\n title: z.string().optional(),\n type: z.enum(['blog-post', 'podcast-script', 'technical-doc', 'newsletter', 'custom']),\n base_path: z.string().optional(),\n primary_goal: z.string().optional(),\n audience: z.string().optional(),\n }\n );\n\n registerTool(\n 'riotdoc_outline',\n 'Generate or retrieve document outline',\n {\n path: z.string().optional(),\n generate: z.boolean().optional(),\n }\n );\n\n registerTool(\n 'riotdoc_draft',\n 'Create a new draft or retrieve existing drafts',\n {\n path: z.string().optional(),\n assistance_level: z.enum(['generate', 'expand', 'revise', 'cleanup', 'spellcheck']).optional(),\n draft_number: z.number().optional(),\n }\n );\n\n registerTool(\n 'riotdoc_status',\n 'Get document status and metadata',\n {\n path: z.string().optional(),\n }\n );\n\n registerTool(\n 'riotdoc_spellcheck',\n 'Run spell checking on document content',\n {\n path: z.string().optional(),\n file: z.string().optional(),\n }\n );\n\n registerTool(\n 'riotdoc_cleanup',\n 'Clean up document workspace by removing temporary files and old drafts',\n {\n path: z.string().optional(),\n keep_drafts: z.number().optional(),\n dry_run: z.boolean().optional(),\n }\n );\n\n registerTool(\n 'riotdoc_export',\n 'Export document to various formats',\n {\n path: z.string().optional(),\n format: z.enum(['html', 'pdf', 'docx', 'markdown']),\n draft: z.number().optional(),\n output: z.string().optional(),\n }\n );\n\n registerTool(\n 'riotdoc_revise',\n 'Add revision feedback to a draft',\n {\n path: z.string().optional(),\n draft: z.number().optional(),\n feedback: z.string(),\n }\n );\n\n // ========================================================================\n // Resources Handlers\n // ========================================================================\n\n const resources = getResources();\n for (const resource of resources) {\n server.resource(\n resource.name,\n resource.uri,\n {\n description: resource.description || '',\n },\n async () => {\n const data = await readResource(resource.uri);\n return {\n contents: [{\n uri: resource.uri,\n mimeType: resource.mimeType || 'application/json',\n text: JSON.stringify(data, null, 2),\n }],\n };\n }\n );\n }\n\n // ========================================================================\n // Prompts Handlers\n // ========================================================================\n\n const prompts = getPrompts();\n for (const prompt of prompts) {\n const promptArgs: Record<string, z.ZodTypeAny> = {};\n if (prompt.arguments) {\n for (const arg of prompt.arguments) {\n promptArgs[arg.name] = arg.required ? z.string() : z.string().optional();\n }\n }\n server.prompt(\n prompt.name,\n prompt.description,\n promptArgs,\n async (args, _extra) => {\n const argsRecord: Record<string, string> = {};\n for (const [key, value] of Object.entries(args)) {\n if (typeof value === 'string') {\n argsRecord[key] = value;\n }\n }\n const messages = await getPrompt(prompt.name, argsRecord);\n return {\n messages: messages.map(msg => {\n if (msg.content.type === 'text') {\n return {\n role: msg.role,\n content: {\n type: 'text' as const,\n text: msg.content.text || '',\n },\n };\n }\n return msg as any;\n }),\n };\n }\n );\n }\n\n // ========================================================================\n // Start Server\n // ========================================================================\n\n const transport = new StdioServerTransport();\n await server.connect(transport);\n}\n\n// Handle errors\nmain().catch((error) => {\n // eslint-disable-next-line no-console\n console.error('MCP Server error:', error);\n process.exit(1);\n});\n"],"names":["join","resolve","__filename","__dirname"],"mappings":";;;;;;;;;;;AAWO,SAAS,kBAA0B;AACtC,UAAO,oBAAI,KAAA,GAAO,YAAA;AACtB;AAwBA,eAAsB,eAClB,MACA,SACA,WACA,eACmB;AACnB,QAAM,cAAc,QAAQ,IAAA;AAC5B,QAAM,OAAiB,CAAA;AAEvB,MAAI;AAEA,QAAI,KAAK,MAAM;AACX,cAAQ,MAAM,KAAK,IAAI;AACvB,WAAK,KAAK,yBAAyB,KAAK,IAAI,EAAE;AAAA,IAClD;AAGA,UAAM,SAAS,MAAM,UAAA;AAGrB,QAAI,KAAK,MAAM;AACX,cAAQ,MAAM,WAAW;AAAA,IAC7B;AAGA,UAAM,OAAO,gBACP,cAAc,Q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
|
4
4
|
"description": "Structured document creation with AI assistance",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"bin": {
|
|
9
|
-
"riotdoc": "./dist/bin.js"
|
|
9
|
+
"riotdoc": "./dist/bin.js",
|
|
10
|
+
"riotdoc-mcp": "./dist/mcp-server.js"
|
|
10
11
|
},
|
|
11
12
|
"exports": {
|
|
12
13
|
".": {
|
|
@@ -24,7 +25,12 @@
|
|
|
24
25
|
"test:coverage": "vitest run --coverage",
|
|
25
26
|
"lint": "eslint src",
|
|
26
27
|
"precommit": "npm run build && npm run lint && npm run test",
|
|
27
|
-
"prepublishOnly": "npm run clean && npm run build"
|
|
28
|
+
"prepublishOnly": "npm run clean && npm run build",
|
|
29
|
+
"docs:dev": "cd docs && cp ../README.md public/ && npm install && npm run dev",
|
|
30
|
+
"docs:build": "cd docs && cp ../README.md public/ && npm install && npm run build",
|
|
31
|
+
"docs:preview": "cd docs && npm run preview",
|
|
32
|
+
"docs:test": "cd docs && npm run test",
|
|
33
|
+
"docs:coverage": "cd docs && npm run coverage"
|
|
28
34
|
},
|
|
29
35
|
"keywords": [
|
|
30
36
|
"document",
|
|
@@ -42,7 +48,8 @@
|
|
|
42
48
|
"url": "https://github.com/kjerneverk/riotdoc"
|
|
43
49
|
},
|
|
44
50
|
"dependencies": {
|
|
45
|
-
"@
|
|
51
|
+
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
52
|
+
"@utilarium/cardigantime": "^0.0.24",
|
|
46
53
|
"@types/inquirer": "^9.0.9",
|
|
47
54
|
"chalk": "^5.4.1",
|
|
48
55
|
"commander": "^14.0.2",
|
|
@@ -50,12 +57,12 @@
|
|
|
50
57
|
"js-yaml": "^4.1.1",
|
|
51
58
|
"marked": "^16.0.0",
|
|
52
59
|
"yaml": "^2.8.2",
|
|
53
|
-
"zod": "^3.
|
|
60
|
+
"zod": "^4.3.6"
|
|
54
61
|
},
|
|
55
62
|
"peerDependencies": {
|
|
56
|
-
"@riotprompt/agentic": "^1.0.
|
|
63
|
+
"@riotprompt/agentic": "^1.0.4",
|
|
57
64
|
"@riotprompt/execution": "^1.0.1",
|
|
58
|
-
"@riotprompt/riotprompt": "^1.0.
|
|
65
|
+
"@riotprompt/riotprompt": "^1.0.5"
|
|
59
66
|
},
|
|
60
67
|
"peerDependenciesMeta": {
|
|
61
68
|
"@riotprompt/agentic": {
|
|
@@ -72,17 +79,17 @@
|
|
|
72
79
|
"@eslint/eslintrc": "^3.3.1",
|
|
73
80
|
"@eslint/js": "^9.28.0",
|
|
74
81
|
"@types/js-yaml": "^4.0.9",
|
|
75
|
-
"@types/node": "^
|
|
82
|
+
"@types/node": "^24.10.9",
|
|
76
83
|
"@typescript-eslint/eslint-plugin": "^8.34.0",
|
|
77
84
|
"@typescript-eslint/parser": "^8.34.0",
|
|
78
|
-
"@vitest/coverage-v8": "^
|
|
85
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
79
86
|
"ajv": "^8.17.1",
|
|
80
87
|
"eslint": "^9.28.0",
|
|
81
88
|
"eslint-plugin-import": "^2.31.0",
|
|
82
|
-
"globals": "^
|
|
89
|
+
"globals": "^17.2.0",
|
|
83
90
|
"typescript": "^5.8.3",
|
|
84
91
|
"vite": "^7.0.4",
|
|
85
92
|
"vite-plugin-dts": "^4.5.4",
|
|
86
|
-
"vitest": "^
|
|
93
|
+
"vitest": "^4.0.18"
|
|
87
94
|
}
|
|
88
95
|
}
|