mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
feat: 增加对 Windows CLI 工具的支持,允许使用 cmd 作为首选 shell,并改进错误处理
This commit is contained in:
@@ -4,4 +4,19 @@
|
||||
* Entry point for running CCW tools as an MCP server
|
||||
*/
|
||||
|
||||
import '../dist/mcp-server/index.js';
|
||||
// IMPORTANT:
|
||||
// MCP stdio servers must not write arbitrary text to stdout.
|
||||
// stdout is reserved for JSON-RPC protocol messages.
|
||||
// Redirect common console output to stderr to avoid breaking handshake.
|
||||
const toStderr = (...args) => console.error(...args);
|
||||
console.log = toStderr;
|
||||
console.info = toStderr;
|
||||
console.debug = toStderr;
|
||||
console.dir = toStderr;
|
||||
|
||||
try {
|
||||
await import('../dist/mcp-server/index.js');
|
||||
} catch (err) {
|
||||
console.error('[ccw-mcp] Failed to start MCP server:', err);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user