Compare commits
4 Commits
extension@
...
docs/auto-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d76d72adc | ||
|
|
d67b81d25d | ||
|
|
66c05053c0 | ||
|
|
d7ab4609aa |
13
.changeset/mcp-timeout-configuration.md
Normal file
13
.changeset/mcp-timeout-configuration.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
"task-master-ai": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Enhanced Roo Code profile with MCP timeout configuration for improved reliability during long-running AI operations. The Roo profile now automatically configures a 300-second timeout for MCP server operations, preventing timeouts during complex tasks like `parse-prd`, `expand-all`, `analyze-complexity`, and `research` operations. This change also replaces static MCP configuration files with programmatic generation for better maintainability.
|
||||||
|
|
||||||
|
**What's New:**
|
||||||
|
- 300-second timeout for MCP operations (up from default 60 seconds)
|
||||||
|
- Programmatic MCP configuration generation (replaces static asset files)
|
||||||
|
- Enhanced reliability for AI-powered operations
|
||||||
|
- Consistent with other AI coding assistant profiles
|
||||||
|
|
||||||
|
**Migration:** No user action required - existing Roo Code installations will automatically receive the enhanced MCP configuration on next initialization.
|
||||||
@@ -9,10 +9,7 @@
|
|||||||
"exports": {
|
"exports": {
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": ["dist", "README.md"],
|
||||||
"dist",
|
|
||||||
"README.md"
|
|
||||||
],
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"typecheck": "tsc --noEmit",
|
"typecheck": "tsc --noEmit",
|
||||||
"lint": "biome check src",
|
"lint": "biome check src",
|
||||||
@@ -45,19 +42,12 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0"
|
"node": ">=18.0.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": ["task-master", "cli", "task-management", "productivity"],
|
||||||
"task-master",
|
|
||||||
"cli",
|
|
||||||
"task-management",
|
|
||||||
"productivity"
|
|
||||||
],
|
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"typesVersions": {
|
"typesVersions": {
|
||||||
"*": {
|
"*": {
|
||||||
"*": [
|
"*": ["src/*"]
|
||||||
"src/*"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,32 @@ Taskmaster uses two primary methods for configuration:
|
|||||||
- **Location:**
|
- **Location:**
|
||||||
- For CLI usage: Create a `.env` file in your project root.
|
- For CLI usage: Create a `.env` file in your project root.
|
||||||
- For MCP/Cursor usage: Configure keys in the `env` section of your `.cursor/mcp.json` file.
|
- For MCP/Cursor usage: Configure keys in the `env` section of your `.cursor/mcp.json` file.
|
||||||
|
|
||||||
|
## MCP Timeout Configuration
|
||||||
|
|
||||||
|
For MCP usage, it's important to configure appropriate timeouts for long-running AI operations:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"task-master-ai": {
|
||||||
|
"command": "npx",
|
||||||
|
"args": ["-y", "task-master-ai"],
|
||||||
|
"timeout": 300,
|
||||||
|
"env": {
|
||||||
|
"ANTHROPIC_API_KEY": "your-api-key-here"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Key points:**
|
||||||
|
- **Default MCP timeout**: 60 seconds (often insufficient for AI operations)
|
||||||
|
- **Recommended timeout**: 300 seconds (5 minutes)
|
||||||
|
- **Operations that benefit**: `parse_prd`, `expand_task`, `analyze_project_complexity`, `research`
|
||||||
|
- **Automatic setup**: Included when using `task-master rules add` for supported editors
|
||||||
|
|
||||||
- **Required API Keys (Depending on configured providers):**
|
- **Required API Keys (Depending on configured providers):**
|
||||||
- `ANTHROPIC_API_KEY`: Your Anthropic API key.
|
- `ANTHROPIC_API_KEY`: Your Anthropic API key.
|
||||||
- `PERPLEXITY_API_KEY`: Your Perplexity API key.
|
- `PERPLEXITY_API_KEY`: Your Perplexity API key.
|
||||||
|
|||||||
@@ -7,6 +7,60 @@ sidebarTitle: "MCP Tools"
|
|||||||
|
|
||||||
This document provides an overview of the MCP (Machine-to-Machine Communication Protocol) interface for the Task Master application. The MCP interface is defined in the `mcp-server/` directory and exposes the application's core functionalities as a set of tools that can be called remotely.
|
This document provides an overview of the MCP (Machine-to-Machine Communication Protocol) interface for the Task Master application. The MCP interface is defined in the `mcp-server/` directory and exposes the application's core functionalities as a set of tools that can be called remotely.
|
||||||
|
|
||||||
|
## MCP Timeout Configuration
|
||||||
|
|
||||||
|
Long-running AI operations in Task Master can exceed the default 60-second MCP timeout. Operations like `parse_prd`, `expand_task`, `analyze_project_complexity`, and `research` may take 2-5 minutes to complete.
|
||||||
|
|
||||||
|
### Adding Timeout Configuration
|
||||||
|
|
||||||
|
Add a `timeout` parameter to your MCP configuration to extend the timeout limit:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"task-master-ai": {
|
||||||
|
"command": "npx",
|
||||||
|
"args": ["-y", "task-master-ai"],
|
||||||
|
"timeout": 300,
|
||||||
|
"env": {
|
||||||
|
"ANTHROPIC_API_KEY": "your-anthropic-api-key"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Configuration Details:**
|
||||||
|
- **`timeout: 300`** - Sets timeout to 300 seconds (5 minutes)
|
||||||
|
- **Value range**: 1-3600 seconds (1 second to 1 hour)
|
||||||
|
- **Recommended**: 300 seconds provides sufficient time for most AI operations
|
||||||
|
- **Format**: Integer value in seconds (not milliseconds)
|
||||||
|
|
||||||
|
### Automatic Setup
|
||||||
|
|
||||||
|
When using supported AI coding assistants, the timeout configuration is automatically included when you add Task Master rules:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Automatically includes timeout configuration
|
||||||
|
task-master rules add cursor
|
||||||
|
task-master rules add roo
|
||||||
|
task-master rules add windsurf
|
||||||
|
task-master rules add vscode
|
||||||
|
```
|
||||||
|
|
||||||
|
### Troubleshooting Timeouts
|
||||||
|
|
||||||
|
If you're still experiencing timeout errors:
|
||||||
|
|
||||||
|
1. **Verify configuration**: Check that `timeout: 300` is present in your MCP config
|
||||||
|
2. **Restart editor**: Restart your editor after making configuration changes
|
||||||
|
3. **Increase timeout**: For very complex operations, try `timeout: 600` (10 minutes)
|
||||||
|
4. **Check API keys**: Ensure required API keys are properly configured
|
||||||
|
|
||||||
|
**Expected behavior:**
|
||||||
|
- **Before fix**: Operations fail after 60 seconds with `MCP request timed out after 60000ms`
|
||||||
|
- **After fix**: Operations complete successfully within the configured timeout limit
|
||||||
|
|
||||||
## Core Concepts
|
## Core Concepts
|
||||||
|
|
||||||
The MCP interface is built on top of the `fastmcp` library and registers a set of tools that correspond to the core functionalities of the Task Master application. These tools are defined in the `mcp-server/src/tools/` directory and are registered with the MCP server in `mcp-server/src/tools/index.js`.
|
The MCP interface is built on top of the `fastmcp` library and registers a set of tools that correspond to the core functionalities of the Task Master application. These tools are defined in the `mcp-server/src/tools/` directory and are registered with the MCP server in `mcp-server/src/tools/index.js`.
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ For MCP/Cursor usage: Configure keys in the env section of your .cursor/mcp.json
|
|||||||
"task-master-ai": {
|
"task-master-ai": {
|
||||||
"command": "npx",
|
"command": "npx",
|
||||||
"args": ["-y", "task-master-ai"],
|
"args": ["-y", "task-master-ai"],
|
||||||
|
"timeout": 300,
|
||||||
"env": {
|
"env": {
|
||||||
"ANTHROPIC_API_KEY": "ANTHROPIC_API_KEY_HERE",
|
"ANTHROPIC_API_KEY": "ANTHROPIC_API_KEY_HERE",
|
||||||
"PERPLEXITY_API_KEY": "PERPLEXITY_API_KEY_HERE",
|
"PERPLEXITY_API_KEY": "PERPLEXITY_API_KEY_HERE",
|
||||||
@@ -37,6 +38,10 @@ For MCP/Cursor usage: Configure keys in the env section of your .cursor/mcp.json
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<Note>
|
||||||
|
The `timeout: 300` setting (5 minutes) is recommended for long-running AI operations like `parse-prd`, `expand-all`, and `analyze-complexity`. This prevents timeout errors during complex tasks.
|
||||||
|
</Note>
|
||||||
|
|
||||||
### CLI Usage: `.env` File
|
### CLI Usage: `.env` File
|
||||||
|
|
||||||
Create a `.env` file in your project root and include the keys for the providers you plan to use:
|
Create a `.env` file in your project root and include the keys for the providers you plan to use:
|
||||||
|
|||||||
@@ -9,17 +9,9 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.93.0"
|
"vscode": "^1.93.0"
|
||||||
},
|
},
|
||||||
"categories": [
|
"categories": ["AI", "Visualization", "Education", "Other"],
|
||||||
"AI",
|
|
||||||
"Visualization",
|
|
||||||
"Education",
|
|
||||||
"Other"
|
|
||||||
],
|
|
||||||
"main": "./dist/extension.js",
|
"main": "./dist/extension.js",
|
||||||
"activationEvents": [
|
"activationEvents": ["onStartupFinished", "workspaceContains:.taskmaster/**"],
|
||||||
"onStartupFinished",
|
|
||||||
"workspaceContains:.taskmaster/**"
|
|
||||||
],
|
|
||||||
"contributes": {
|
"contributes": {
|
||||||
"viewsContainers": {
|
"viewsContainers": {
|
||||||
"activitybar": [
|
"activitybar": [
|
||||||
@@ -147,11 +139,7 @@
|
|||||||
},
|
},
|
||||||
"taskmaster.ui.theme": {
|
"taskmaster.ui.theme": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": ["auto", "light", "dark"],
|
||||||
"auto",
|
|
||||||
"light",
|
|
||||||
"dark"
|
|
||||||
],
|
|
||||||
"default": "auto",
|
"default": "auto",
|
||||||
"description": "UI theme preference"
|
"description": "UI theme preference"
|
||||||
},
|
},
|
||||||
@@ -212,12 +200,7 @@
|
|||||||
},
|
},
|
||||||
"taskmaster.debug.logLevel": {
|
"taskmaster.debug.logLevel": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": ["error", "warn", "info", "debug"],
|
||||||
"error",
|
|
||||||
"warn",
|
|
||||||
"info",
|
|
||||||
"debug"
|
|
||||||
],
|
|
||||||
"default": "info",
|
"default": "info",
|
||||||
"description": "Logging level"
|
"description": "Logging level"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -235,6 +235,60 @@ node scripts/init.js
|
|||||||
- "MCP provider requires session context" → Ensure running in MCP environment
|
- "MCP provider requires session context" → Ensure running in MCP environment
|
||||||
- See the [MCP Provider Guide](./mcp-provider-guide.md) for detailed troubleshooting
|
- See the [MCP Provider Guide](./mcp-provider-guide.md) for detailed troubleshooting
|
||||||
|
|
||||||
|
### MCP Timeout Configuration
|
||||||
|
|
||||||
|
Long-running AI operations in taskmaster-ai can exceed the default 60-second MCP timeout. Operations like `parse_prd`, `expand_task`, `research`, and `analyze_project_complexity` may take 2-5 minutes to complete.
|
||||||
|
|
||||||
|
#### Adding Timeout Configuration
|
||||||
|
|
||||||
|
Add a `timeout` parameter to your MCP configuration to extend the timeout limit. The timeout configuration works identically across MCP clients including Cursor, Windsurf, and RooCode:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"task-master-ai": {
|
||||||
|
"command": "npx",
|
||||||
|
"args": ["-y", "--package=task-master-ai", "task-master-ai"],
|
||||||
|
"timeout": 300,
|
||||||
|
"env": {
|
||||||
|
"ANTHROPIC_API_KEY": "your-anthropic-api-key"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Configuration Details:**
|
||||||
|
- **`timeout: 300`** - Sets timeout to 300 seconds (5 minutes)
|
||||||
|
- **Value range**: 1-3600 seconds (1 second to 1 hour)
|
||||||
|
- **Recommended**: 300 seconds provides sufficient time for most AI operations
|
||||||
|
- **Format**: Integer value in seconds (not milliseconds)
|
||||||
|
|
||||||
|
#### Automatic Setup
|
||||||
|
|
||||||
|
When adding taskmaster rules for supported editors, the timeout configuration is automatically included:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Automatically includes timeout configuration
|
||||||
|
task-master rules add cursor
|
||||||
|
task-master rules add roo
|
||||||
|
task-master rules add windsurf
|
||||||
|
task-master rules add vscode
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Troubleshooting Timeouts
|
||||||
|
|
||||||
|
If you're still experiencing timeout errors:
|
||||||
|
|
||||||
|
1. **Verify configuration**: Check that `timeout: 300` is present in your MCP config
|
||||||
|
2. **Restart editor**: Restart your editor after making configuration changes
|
||||||
|
3. **Increase timeout**: For very complex operations, try `timeout: 600` (10 minutes)
|
||||||
|
4. **Check API keys**: Ensure required API keys are properly configured
|
||||||
|
|
||||||
|
**Expected behavior:**
|
||||||
|
- **Before fix**: Operations fail after 60 seconds with `MCP request timed out after 60000ms`
|
||||||
|
- **After fix**: Operations complete successfully within the configured timeout limit
|
||||||
|
|
||||||
### Google Vertex AI Configuration
|
### Google Vertex AI Configuration
|
||||||
|
|
||||||
Google Vertex AI is Google Cloud's enterprise AI platform and requires specific configuration:
|
Google Vertex AI is Google Cloud's enterprise AI platform and requires specific configuration:
|
||||||
|
|||||||
48
output.txt
Normal file
48
output.txt
Normal file
File diff suppressed because one or more lines are too long
14
package-lock.json
generated
14
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "task-master-ai",
|
"name": "task-master-ai",
|
||||||
"version": "0.27.0-rc.2",
|
"version": "0.27.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "task-master-ai",
|
"name": "task-master-ai",
|
||||||
"version": "0.27.0-rc.2",
|
"version": "0.27.0",
|
||||||
"license": "MIT WITH Commons-Clause",
|
"license": "MIT WITH Commons-Clause",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"apps/*",
|
"apps/*",
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
},
|
},
|
||||||
"apps/cli": {
|
"apps/cli": {
|
||||||
"name": "@tm/cli",
|
"name": "@tm/cli",
|
||||||
"version": "0.27.0-rc.0",
|
"version": "0.27.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tm/core": "*",
|
"@tm/core": "*",
|
||||||
@@ -359,13 +359,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apps/docs": {
|
"apps/docs": {
|
||||||
"version": "0.0.2",
|
"version": "0.0.3",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"mintlify": "^4.2.111"
|
"mintlify": "^4.2.111"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apps/extension": {
|
"apps/extension": {
|
||||||
"version": "0.25.0-rc.0",
|
"version": "0.25.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"task-master-ai": "*"
|
"task-master-ai": "*"
|
||||||
},
|
},
|
||||||
@@ -31873,7 +31873,7 @@
|
|||||||
},
|
},
|
||||||
"packages/build-config": {
|
"packages/build-config": {
|
||||||
"name": "@tm/build-config",
|
"name": "@tm/build-config",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tsup": "^8.5.0"
|
"tsup": "^8.5.0"
|
||||||
@@ -31885,7 +31885,7 @@
|
|||||||
},
|
},
|
||||||
"packages/tm-core": {
|
"packages/tm-core": {
|
||||||
"name": "@tm/core",
|
"name": "@tm/core",
|
||||||
"version": "0.26.0",
|
"version": "0.26.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@supabase/supabase-js": "^2.57.4",
|
"@supabase/supabase-js": "^2.57.4",
|
||||||
|
|||||||
13
package.json
13
package.json
@@ -9,11 +9,7 @@
|
|||||||
"task-master-mcp": "dist/mcp-server.js",
|
"task-master-mcp": "dist/mcp-server.js",
|
||||||
"task-master-ai": "dist/mcp-server.js"
|
"task-master-ai": "dist/mcp-server.js"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": ["apps/*", "packages/*", "."],
|
||||||
"apps/*",
|
|
||||||
"packages/*",
|
|
||||||
"."
|
|
||||||
],
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run build:build-config && cross-env NODE_ENV=production tsdown",
|
"build": "npm run build:build-config && cross-env NODE_ENV=production tsdown",
|
||||||
"dev": "tsdown --watch",
|
"dev": "tsdown --watch",
|
||||||
@@ -118,12 +114,7 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/eyaltoledano/claude-task-master/issues"
|
"url": "https://github.com/eyaltoledano/claude-task-master/issues"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": ["dist/**", "README-task-master.md", "README.md", "LICENSE"],
|
||||||
"dist/**",
|
|
||||||
"README-task-master.md",
|
|
||||||
"README.md",
|
|
||||||
"LICENSE"
|
|
||||||
],
|
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"node-fetch": "^2.6.12",
|
"node-fetch": "^2.6.12",
|
||||||
"whatwg-url": "^11.0.0"
|
"whatwg-url": "^11.0.0"
|
||||||
|
|||||||
@@ -12,15 +12,8 @@
|
|||||||
"import": "./dist/tsdown.base.js"
|
"import": "./dist/tsdown.base.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"files": [
|
"files": ["dist", "src"],
|
||||||
"dist",
|
"keywords": ["build-config", "tsup", "monorepo"],
|
||||||
"src"
|
|
||||||
],
|
|
||||||
"keywords": [
|
|
||||||
"build-config",
|
|
||||||
"tsup",
|
|
||||||
"monorepo"
|
|
||||||
],
|
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -48,18 +48,8 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0"
|
"node": ">=18.0.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": ["src", "README.md", "CHANGELOG.md"],
|
||||||
"src",
|
"keywords": ["task-management", "typescript", "ai", "prd", "parser"],
|
||||||
"README.md",
|
|
||||||
"CHANGELOG.md"
|
|
||||||
],
|
|
||||||
"keywords": [
|
|
||||||
"task-management",
|
|
||||||
"typescript",
|
|
||||||
"ai",
|
|
||||||
"prd",
|
|
||||||
"parser"
|
|
||||||
],
|
|
||||||
"author": "Task Master AI",
|
"author": "Task Master AI",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,37 @@ import { isSilentMode, log } from '../../scripts/modules/utils.js';
|
|||||||
import { createProfile, COMMON_TOOL_MAPPINGS } from './base-profile.js';
|
import { createProfile, COMMON_TOOL_MAPPINGS } from './base-profile.js';
|
||||||
import { ROO_MODES } from '../constants/profiles.js';
|
import { ROO_MODES } from '../constants/profiles.js';
|
||||||
|
|
||||||
|
// Import the shared MCP configuration helper
|
||||||
|
import { formatJSONWithTabs } from '../utils/create-mcp-config.js';
|
||||||
|
|
||||||
|
// Roo-specific MCP configuration enhancements
|
||||||
|
function enhanceRooMCPConfiguration(mcpPath) {
|
||||||
|
if (!fs.existsSync(mcpPath)) {
|
||||||
|
log('warn', `[Roo] MCP configuration file not found at ${mcpPath}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Read the existing configuration
|
||||||
|
const mcpConfig = JSON.parse(fs.readFileSync(mcpPath, 'utf8'));
|
||||||
|
|
||||||
|
if (mcpConfig.mcpServers && mcpConfig.mcpServers['task-master-ai']) {
|
||||||
|
const server = mcpConfig.mcpServers['task-master-ai'];
|
||||||
|
|
||||||
|
// Add Roo-specific timeout enhancement for long-running AI operations
|
||||||
|
server.timeout = 300;
|
||||||
|
|
||||||
|
// Write the enhanced configuration back
|
||||||
|
fs.writeFileSync(mcpPath, formatJSONWithTabs(mcpConfig) + '\n');
|
||||||
|
log('debug', `[Roo] Enhanced MCP configuration with timeout at ${mcpPath}`);
|
||||||
|
} else {
|
||||||
|
log('warn', `[Roo] task-master-ai server not found in MCP configuration`);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
log('error', `[Roo] Failed to enhance MCP configuration: ${error.message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Lifecycle functions for Roo profile
|
// Lifecycle functions for Roo profile
|
||||||
function onAddRulesProfile(targetDir, assetsDir) {
|
function onAddRulesProfile(targetDir, assetsDir) {
|
||||||
// Use the provided assets directory to find the roocode directory
|
// Use the provided assets directory to find the roocode directory
|
||||||
@@ -32,6 +63,9 @@ function onAddRulesProfile(targetDir, assetsDir) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note: MCP configuration is now handled by the base profile system
|
||||||
|
// The base profile will call setupMCPConfiguration, and we enhance it in onPostConvert
|
||||||
|
|
||||||
for (const mode of ROO_MODES) {
|
for (const mode of ROO_MODES) {
|
||||||
const src = path.join(rooModesDir, `rules-${mode}`, `${mode}-rules`);
|
const src = path.join(rooModesDir, `rules-${mode}`, `${mode}-rules`);
|
||||||
const dest = path.join(targetDir, '.roo', `rules-${mode}`, `${mode}-rules`);
|
const dest = path.join(targetDir, '.roo', `rules-${mode}`, `${mode}-rules`);
|
||||||
@@ -78,6 +112,15 @@ function onRemoveRulesProfile(targetDir) {
|
|||||||
|
|
||||||
const rooDir = path.join(targetDir, '.roo');
|
const rooDir = path.join(targetDir, '.roo');
|
||||||
if (fs.existsSync(rooDir)) {
|
if (fs.existsSync(rooDir)) {
|
||||||
|
// Remove MCP configuration
|
||||||
|
const mcpPath = path.join(rooDir, 'mcp.json');
|
||||||
|
try {
|
||||||
|
fs.rmSync(mcpPath, { force: true });
|
||||||
|
log('debug', `[Roo] Removed MCP configuration from ${mcpPath}`);
|
||||||
|
} catch (err) {
|
||||||
|
log('error', `[Roo] Failed to remove MCP configuration: ${err.message}`);
|
||||||
|
}
|
||||||
|
|
||||||
fs.readdirSync(rooDir).forEach((entry) => {
|
fs.readdirSync(rooDir).forEach((entry) => {
|
||||||
if (entry.startsWith('rules-')) {
|
if (entry.startsWith('rules-')) {
|
||||||
const modeDir = path.join(rooDir, entry);
|
const modeDir = path.join(rooDir, entry);
|
||||||
@@ -101,7 +144,13 @@ function onRemoveRulesProfile(targetDir) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onPostConvertRulesProfile(targetDir, assetsDir) {
|
function onPostConvertRulesProfile(targetDir, assetsDir) {
|
||||||
onAddRulesProfile(targetDir, assetsDir);
|
// Enhance the MCP configuration with Roo-specific features after base setup
|
||||||
|
const mcpPath = path.join(targetDir, '.roo', 'mcp.json');
|
||||||
|
try {
|
||||||
|
enhanceRooMCPConfiguration(mcpPath);
|
||||||
|
} catch (err) {
|
||||||
|
log('error', `[Roo] Failed to enhance MCP configuration: ${err.message}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create and export roo profile using the base factory
|
// Create and export roo profile using the base factory
|
||||||
@@ -111,6 +160,7 @@ export const rooProfile = createProfile({
|
|||||||
url: 'roocode.com',
|
url: 'roocode.com',
|
||||||
docsUrl: 'docs.roocode.com',
|
docsUrl: 'docs.roocode.com',
|
||||||
toolMappings: COMMON_TOOL_MAPPINGS.ROO_STYLE,
|
toolMappings: COMMON_TOOL_MAPPINGS.ROO_STYLE,
|
||||||
|
mcpConfig: true, // Enable MCP config - we enhance it with Roo-specific features
|
||||||
onAdd: onAddRulesProfile,
|
onAdd: onAddRulesProfile,
|
||||||
onRemove: onRemoveRulesProfile,
|
onRemove: onRemoveRulesProfile,
|
||||||
onPostConvert: onPostConvertRulesProfile
|
onPostConvert: onPostConvertRulesProfile
|
||||||
|
|||||||
@@ -262,3 +262,6 @@ export function removeTaskMasterMCPConfiguration(projectRoot, mcpConfigPath) {
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Export the formatting function for use by other modules
|
||||||
|
export { formatJSONWithTabs };
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ describe('Roo Profile Initialization Functionality', () => {
|
|||||||
expect(rooProfile.displayName).toBe('Roo Code');
|
expect(rooProfile.displayName).toBe('Roo Code');
|
||||||
expect(rooProfile.profileDir).toBe('.roo'); // default
|
expect(rooProfile.profileDir).toBe('.roo'); // default
|
||||||
expect(rooProfile.rulesDir).toBe('.roo/rules'); // default
|
expect(rooProfile.rulesDir).toBe('.roo/rules'); // default
|
||||||
expect(rooProfile.mcpConfig).toBe(true); // default
|
expect(rooProfile.mcpConfig).toBe(true); // now uses standard MCP configuration with Roo enhancements
|
||||||
});
|
});
|
||||||
|
|
||||||
test('roo.js uses custom ROO_STYLE tool mappings', () => {
|
test('roo.js uses custom ROO_STYLE tool mappings', () => {
|
||||||
|
|||||||
@@ -266,10 +266,10 @@ describe('MCP Configuration Validation', () => {
|
|||||||
expect(mcpEnabledProfiles).toContain('cursor');
|
expect(mcpEnabledProfiles).toContain('cursor');
|
||||||
expect(mcpEnabledProfiles).toContain('gemini');
|
expect(mcpEnabledProfiles).toContain('gemini');
|
||||||
expect(mcpEnabledProfiles).toContain('opencode');
|
expect(mcpEnabledProfiles).toContain('opencode');
|
||||||
expect(mcpEnabledProfiles).toContain('roo');
|
|
||||||
expect(mcpEnabledProfiles).toContain('vscode');
|
expect(mcpEnabledProfiles).toContain('vscode');
|
||||||
expect(mcpEnabledProfiles).toContain('windsurf');
|
expect(mcpEnabledProfiles).toContain('windsurf');
|
||||||
expect(mcpEnabledProfiles).toContain('zed');
|
expect(mcpEnabledProfiles).toContain('zed');
|
||||||
|
expect(mcpEnabledProfiles).toContain('roo');
|
||||||
expect(mcpEnabledProfiles).not.toContain('cline');
|
expect(mcpEnabledProfiles).not.toContain('cline');
|
||||||
expect(mcpEnabledProfiles).not.toContain('codex');
|
expect(mcpEnabledProfiles).not.toContain('codex');
|
||||||
expect(mcpEnabledProfiles).not.toContain('trae');
|
expect(mcpEnabledProfiles).not.toContain('trae');
|
||||||
@@ -384,6 +384,7 @@ describe('MCP Configuration Validation', () => {
|
|||||||
'claude',
|
'claude',
|
||||||
'cursor',
|
'cursor',
|
||||||
'gemini',
|
'gemini',
|
||||||
|
'kiro',
|
||||||
'opencode',
|
'opencode',
|
||||||
'roo',
|
'roo',
|
||||||
'windsurf',
|
'windsurf',
|
||||||
|
|||||||
Reference in New Issue
Block a user