From 2829194d3c1dd5373d3bf40275cf4f63b12d49a7 Mon Sep 17 00:00:00 2001 From: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com> Date: Wed, 23 Apr 2025 02:00:27 +0200 Subject: [PATCH] fix: dependency manager & friend fixes (#307) --- .changeset/calm-ways-visit.md | 5 +++++ .github/workflows/release.yml | 3 +++ README.md | 2 +- docs/tutorial.md | 4 ++-- scripts/modules/dependency-manager.js | 26 ++++++++++++++------------ 5 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 .changeset/calm-ways-visit.md diff --git a/.changeset/calm-ways-visit.md b/.changeset/calm-ways-visit.md new file mode 100644 index 00000000..ace763a4 --- /dev/null +++ b/.changeset/calm-ways-visit.md @@ -0,0 +1,5 @@ +--- +'task-master-ai': patch +--- + +Fix add_dependency tool crashing the MCP Server diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 176e0ccc..e49148b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,9 @@ on: push: branches: - main + +concurrency: ${{ github.workflow }}-${{ github.ref }} + jobs: release: runs-on: ubuntu-latest diff --git a/README.md b/README.md index 7459bc05..c36efb9a 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ MCP (Model Control Protocol) provides the easiest way to get started with Task M "mcpServers": { "taskmaster-ai": { "command": "npx", - "args": ["-y", "task-master-ai"], + "args": ["-y", "--package=task-master-ai", "task-master-ai"], "env": { "ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY_HERE", "PERPLEXITY_API_KEY": "YOUR_PERPLEXITY_API_KEY_HERE", diff --git a/docs/tutorial.md b/docs/tutorial.md index 1ecdf64e..5c3de9e3 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -17,7 +17,7 @@ MCP (Model Control Protocol) provides the easiest way to get started with Task M "mcpServers": { "taskmaster-ai": { "command": "npx", - "args": ["-y", "task-master-ai"], + "args": ["-y", "--package=task-master-ai", "task-master-ai"], "env": { "ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY_HERE", "PERPLEXITY_API_KEY": "YOUR_PERPLEXITY_API_KEY_HERE", @@ -132,7 +132,7 @@ You can also set up the MCP server in Cursor settings: 4. Configure with the following details: - Name: "Task Master" - Type: "Command" - - Command: "npx -y task-master-mcp" + - Command: "npx -y --package=task-master-ai task-master-ai" 5. Save the settings Once configured, you can interact with Task Master's task management commands directly through Cursor's interface, providing a more integrated experience. diff --git a/scripts/modules/dependency-manager.js b/scripts/modules/dependency-manager.js index af8904fb..8ce4565a 100644 --- a/scripts/modules/dependency-manager.js +++ b/scripts/modules/dependency-manager.js @@ -185,18 +185,20 @@ async function addDependency(tasksPath, taskId, dependencyId) { ); // Display a more visually appealing success message - console.log( - boxen( - chalk.green(`Successfully added dependency:\n\n`) + - `Task ${chalk.bold(formattedTaskId)} now depends on ${chalk.bold(formattedDependencyId)}`, - { - padding: 1, - borderColor: 'green', - borderStyle: 'round', - margin: { top: 1 } - } - ) - ); + if (!isSilentMode()) { + console.log( + boxen( + chalk.green(`Successfully added dependency:\n\n`) + + `Task ${chalk.bold(formattedTaskId)} now depends on ${chalk.bold(formattedDependencyId)}`, + { + padding: 1, + borderColor: 'green', + borderStyle: 'round', + margin: { top: 1 } + } + ) + ); + } // Generate updated task files await generateTaskFiles(tasksPath, 'tasks');