diff --git a/.changeset/many-wasps-sell.md b/.changeset/many-wasps-sell.md new file mode 100644 index 00000000..75631311 --- /dev/null +++ b/.changeset/many-wasps-sell.md @@ -0,0 +1,5 @@ +--- +'task-master-ai': patch +--- + +Task Master no longer tells you to update when you're already up to date diff --git a/.changeset/pre.json b/.changeset/pre.json index 0d16f4e6..e8be1d58 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -1,8 +1,8 @@ { - "mode": "pre", + "mode": "exit", "tag": "rc", "initialVersions": { - "task-master-ai": "0.13.1" + "task-master-ai": "0.13.2" }, "changesets": [ "beige-doodles-type", diff --git a/.changeset/soft-zoos-flow.md b/.changeset/soft-zoos-flow.md new file mode 100644 index 00000000..d908fa64 --- /dev/null +++ b/.changeset/soft-zoos-flow.md @@ -0,0 +1,7 @@ +--- +'task-master-ai': patch +--- + +Fix initial .env.example to work out of the box + +- Closes #419 diff --git a/.changeset/ten-ways-mate.md b/.changeset/ten-ways-mate.md new file mode 100644 index 00000000..993d6e2d --- /dev/null +++ b/.changeset/ten-ways-mate.md @@ -0,0 +1,5 @@ +--- +'task-master-ai': patch +--- + +Fix default fallback model and maxTokens in Taskmaster initialization diff --git a/.changeset/tricky-wombats-spend.md b/.changeset/tricky-wombats-spend.md new file mode 100644 index 00000000..2b961c9c --- /dev/null +++ b/.changeset/tricky-wombats-spend.md @@ -0,0 +1,5 @@ +--- +'task-master-ai': patch +--- + +Fix bug when updating tasks on the MCP server (#412) diff --git a/assets/.taskmasterconfig b/assets/.taskmasterconfig index 0b874da5..2e015bf6 100644 --- a/assets/.taskmasterconfig +++ b/assets/.taskmasterconfig @@ -14,8 +14,8 @@ }, "fallback": { "provider": "anthropic", - "modelId": "claude-3.5-sonnet-20240620", - "maxTokens": 120000, + "modelId": "claude-3-5-sonnet-20240620", + "maxTokens": 8192, "temperature": 0.1 } }, diff --git a/assets/env.example b/assets/env.example index d44c6b09..1c9b41e4 100644 --- a/assets/env.example +++ b/assets/env.example @@ -1,8 +1,8 @@ # API Keys (Required to enable respective provider) -ANTHROPIC_API_KEY=your_anthropic_api_key_here # Required: Format: sk-ant-api03-... -PERPLEXITY_API_KEY=your_perplexity_api_key_here # Optional: Format: pplx-... -OPENAI_API_KEY=your_openai_api_key_here # Optional, for OpenAI/OpenRouter models. Format: sk-proj-... -GOOGLE_API_KEY=your_google_api_key_here # Optional, for Google Gemini models. -MISTRAL_API_KEY=your_mistral_key_here # Optional, for Mistral AI models. -XAI_API_KEY=YOUR_XAI_KEY_HERE # Optional, for xAI AI models. -AZURE_OPENAI_API_KEY=your_azure_key_here # Optional, for Azure OpenAI models (requires endpoint in .taskmasterconfig). \ No newline at end of file +ANTHROPIC_API_KEY="your_anthropic_api_key_here" # Required: Format: sk-ant-api03-... +PERPLEXITY_API_KEY="your_perplexity_api_key_here" # Optional: Format: pplx-... +OPENAI_API_KEY="your_openai_api_key_here" # Optional, for OpenAI/OpenRouter models. Format: sk-proj-... +GOOGLE_API_KEY="your_google_api_key_here" # Optional, for Google Gemini models. +MISTRAL_API_KEY="your_mistral_key_here" # Optional, for Mistral AI models. +XAI_API_KEY="YOUR_XAI_KEY_HERE" # Optional, for xAI AI models. +AZURE_OPENAI_API_KEY="your_azure_key_here" # Optional, for Azure OpenAI models (requires endpoint in .taskmasterconfig). \ No newline at end of file diff --git a/mcp-server/src/core/direct-functions/update-tasks.js b/mcp-server/src/core/direct-functions/update-tasks.js index 3e485ae4..0b83a5dd 100644 --- a/mcp-server/src/core/direct-functions/update-tasks.js +++ b/mcp-server/src/core/direct-functions/update-tasks.js @@ -6,6 +6,10 @@ import path from 'path'; import { updateTasks } from '../../../../scripts/modules/task-manager.js'; import { createLogWrapper } from '../../tools/utils.js'; +import { + enableSilentMode, + disableSilentMode +} from '../../../../scripts/modules/utils.js'; /** * Direct function wrapper for updating tasks based on new context. diff --git a/package-lock.json b/package-lock.json index 342dd287..ff03b4e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "task-master-ai", - "version": "0.13.2-rc.1", + "version": "0.12", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "task-master-ai", - "version": "0.13.2-rc.1", + "version": "0.12", "license": "MIT WITH Commons-Clause", "dependencies": { "@ai-sdk/anthropic": "^1.2.10", diff --git a/package.json b/package.json index a9ef850d..039bcf41 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "task-master-ai", - "version": "0.13.2-rc.1", + "version": "0.13.2", "description": "A task management system for ambitious AI-driven development that doesn't overwhelm and confuse Cursor.", "main": "index.js", "type": "module", diff --git a/scripts/modules/commands.js b/scripts/modules/commands.js index 7fff05b7..0f62d6b8 100644 --- a/scripts/modules/commands.js +++ b/scripts/modules/commands.js @@ -73,6 +73,7 @@ import { getApiKeyStatusReport } from './task-manager/models.js'; import { findProjectRoot } from './utils.js'; +import { getTaskMasterVersion } from '../../src/utils/getVersion.js'; import { convertAllRulesToBrandRules, removeBrandRules, @@ -1423,10 +1424,6 @@ function registerCommands(programInstance) { '--details
', 'Implementation details (for manual task creation)' ) - .option( - '--test-strategy ', - 'Test strategy (for manual task creation)' - ) .option( '--dependencies ', 'Comma-separated list of task IDs this task depends on' @@ -1808,6 +1805,7 @@ function registerCommands(programInstance) { } } catch (error) { console.error(chalk.red(`Error: ${error.message}`)); + showAddSubtaskHelp(); process.exit(1); } }) @@ -2545,28 +2543,7 @@ function setupCLI() { */ async function checkForUpdate() { // Get current version from package.json ONLY - let currentVersion = 'unknown'; // Initialize with a default - try { - // Try to get the version from the installed package (if applicable) or current dir - let packageJsonPath = path.join( - process.cwd(), - 'node_modules', - 'task-master-ai', - 'package.json' - ); - // Fallback to current directory package.json if not found in node_modules - if (!fs.existsSync(packageJsonPath)) { - packageJsonPath = path.join(process.cwd(), 'package.json'); - } - - if (fs.existsSync(packageJsonPath)) { - const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); - currentVersion = packageJson.version; - } - } catch (error) { - // Silently fail and use default - log('debug', `Error reading current package version: ${error.message}`); - } + const currentVersion = getTaskMasterVersion(); return new Promise((resolve) => { // Get the latest version from npm registry diff --git a/scripts/modules/ui.js b/scripts/modules/ui.js index d9440622..70edc76f 100644 --- a/scripts/modules/ui.js +++ b/scripts/modules/ui.js @@ -16,10 +16,10 @@ import { truncate, isSilentMode } from './utils.js'; -import path from 'path'; import fs from 'fs'; import { findNextTask, analyzeTaskComplexity } from './task-manager.js'; import { getProjectName, getDefaultSubtasks } from './config-manager.js'; +import { getTaskMasterVersion } from '../../src/utils/getVersion.js'; // Create a color gradient for the banner const coolGradient = gradient(['#00b4d8', '#0077b6', '#03045e']); @@ -46,17 +46,7 @@ function displayBanner() { ); // Read version directly from package.json - let version = 'unknown'; // Initialize with a default - try { - const packageJsonPath = path.join(process.cwd(), 'package.json'); - if (fs.existsSync(packageJsonPath)) { - const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); - version = packageJson.version; - } - } catch (error) { - // Silently fall back to default version - log('warn', 'Could not read package.json for version info.'); - } + const version = getTaskMasterVersion(); console.log( boxen( @@ -809,12 +799,7 @@ async function displayNextTask(tasksPath) { 'padding-bottom': 0, compact: true }, - chars: { - mid: '', - 'left-mid': '', - 'mid-mid': '', - 'right-mid': '' - }, + chars: { mid: '', 'left-mid': '', 'mid-mid': '', 'right-mid': '' }, colWidths: [15, Math.min(75, process.stdout.columns - 20 || 60)], wordWrap: true }); @@ -902,12 +887,7 @@ async function displayNextTask(tasksPath) { 'padding-bottom': 0, compact: true }, - chars: { - mid: '', - 'left-mid': '', - 'mid-mid': '', - 'right-mid': '' - }, + chars: { mid: '', 'left-mid': '', 'mid-mid': '', 'right-mid': '' }, wordWrap: true }); diff --git a/src/utils/getVersion.js b/src/utils/getVersion.js new file mode 100644 index 00000000..55a64f40 --- /dev/null +++ b/src/utils/getVersion.js @@ -0,0 +1,35 @@ +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; +import { log } from '../../scripts/modules/utils.js'; + +/** + * Reads the version from the nearest package.json relative to this file. + * Returns 'unknown' if not found or on error. + * @returns {string} The version string or 'unknown'. + */ +export function getTaskMasterVersion() { + let version = 'unknown'; + try { + // Get the directory of the current module (getPackageVersion.js) + const currentModuleFilename = fileURLToPath(import.meta.url); + const currentModuleDirname = path.dirname(currentModuleFilename); + // Construct the path to package.json relative to this file (../../package.json) + const packageJsonPath = path.join( + currentModuleDirname, + '..', + '..', + 'package.json' + ); + + if (fs.existsSync(packageJsonPath)) { + const packageJsonContent = fs.readFileSync(packageJsonPath, 'utf8'); + const packageJson = JSON.parse(packageJsonContent); + version = packageJson.version; + } + } catch (error) { + // Silently fall back to default version + log('warn', 'Could not read own package.json for version info.', error); + } + return version; +}