feat: integrate excalidraw MCP into bootstrap and runtime setup
- install.sh: run mosaic-ensure-excalidraw post-install (non-fatal) - runtime-setup.ts: configure excalidraw MCP during wizard setup - bin/mosaic-ensure-excalidraw: install deps + register MCP with Claude - runtime/mcp/EXCALIDRAW.json: MCP server config template - tools/excalidraw/: headless .excalidraw → SVG export server Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { existsSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { homedir } from 'node:os';
|
||||
import type { WizardPrompter } from '../prompter/interface.js';
|
||||
import type { WizardState, RuntimeName } from '../types.js';
|
||||
import { detectRuntime, type RuntimeInfo } from '../runtime/detector.js';
|
||||
@@ -66,5 +70,20 @@ export async function runtimeSetupStage(
|
||||
`MCP setup failed: ${err instanceof Error ? err.message : String(err)}. Run 'mosaic seq fix' later.`,
|
||||
);
|
||||
}
|
||||
|
||||
// Configure excalidraw MCP (non-fatal — optional tool)
|
||||
const mosaicHome = process.env['MOSAIC_HOME'] ?? join(homedir(), '.config', 'mosaic');
|
||||
const ensureExcalidraw = join(mosaicHome, 'bin', 'mosaic-ensure-excalidraw');
|
||||
if (existsSync(ensureExcalidraw)) {
|
||||
const spin3 = p.spinner();
|
||||
spin3.update('Configuring excalidraw MCP...');
|
||||
const res = spawnSync(ensureExcalidraw, [], { encoding: 'utf8' });
|
||||
if (res.status === 0) {
|
||||
spin3.stop('excalidraw MCP configured');
|
||||
} else {
|
||||
spin3.stop('excalidraw MCP setup failed (non-fatal)');
|
||||
p.warn("Run 'mosaic-ensure-excalidraw' manually if needed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user