Merge branch 'next' of https://github.com/eyaltoledano/claude-task-master into joedanz/flexible-brand-rules

# Conflicts:
#	scripts/modules/commands.js
This commit is contained in:
Joe Danziger
2025-05-16 06:16:07 -04:00
13 changed files with 82 additions and 64 deletions

View File

@@ -0,0 +1,5 @@
---
'task-master-ai': patch
---
Task Master no longer tells you to update when you're already up to date

View File

@@ -1,8 +1,8 @@
{ {
"mode": "pre", "mode": "exit",
"tag": "rc", "tag": "rc",
"initialVersions": { "initialVersions": {
"task-master-ai": "0.13.1" "task-master-ai": "0.13.2"
}, },
"changesets": [ "changesets": [
"beige-doodles-type", "beige-doodles-type",

View File

@@ -0,0 +1,7 @@
---
'task-master-ai': patch
---
Fix initial .env.example to work out of the box
- Closes #419

View File

@@ -0,0 +1,5 @@
---
'task-master-ai': patch
---
Fix default fallback model and maxTokens in Taskmaster initialization

View File

@@ -0,0 +1,5 @@
---
'task-master-ai': patch
---
Fix bug when updating tasks on the MCP server (#412)

View File

@@ -14,8 +14,8 @@
}, },
"fallback": { "fallback": {
"provider": "anthropic", "provider": "anthropic",
"modelId": "claude-3.5-sonnet-20240620", "modelId": "claude-3-5-sonnet-20240620",
"maxTokens": 120000, "maxTokens": 8192,
"temperature": 0.1 "temperature": 0.1
} }
}, },

View File

@@ -1,8 +1,8 @@
# API Keys (Required to enable respective provider) # API Keys (Required to enable respective provider)
ANTHROPIC_API_KEY=your_anthropic_api_key_here # Required: Format: sk-ant-api03-... ANTHROPIC_API_KEY="your_anthropic_api_key_here" # Required: Format: sk-ant-api03-...
PERPLEXITY_API_KEY=your_perplexity_api_key_here # Optional: Format: pplx-... 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-... 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. 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. MISTRAL_API_KEY="your_mistral_key_here" # Optional, for Mistral AI models.
XAI_API_KEY=YOUR_XAI_KEY_HERE # Optional, for xAI 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). AZURE_OPENAI_API_KEY="your_azure_key_here" # Optional, for Azure OpenAI models (requires endpoint in .taskmasterconfig).

View File

@@ -6,6 +6,10 @@
import path from 'path'; import path from 'path';
import { updateTasks } from '../../../../scripts/modules/task-manager.js'; import { updateTasks } from '../../../../scripts/modules/task-manager.js';
import { createLogWrapper } from '../../tools/utils.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. * Direct function wrapper for updating tasks based on new context.

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "task-master-ai", "name": "task-master-ai",
"version": "0.13.2-rc.1", "version": "0.12",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "task-master-ai", "name": "task-master-ai",
"version": "0.13.2-rc.1", "version": "0.12",
"license": "MIT WITH Commons-Clause", "license": "MIT WITH Commons-Clause",
"dependencies": { "dependencies": {
"@ai-sdk/anthropic": "^1.2.10", "@ai-sdk/anthropic": "^1.2.10",

View File

@@ -1,6 +1,6 @@
{ {
"name": "task-master-ai", "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.", "description": "A task management system for ambitious AI-driven development that doesn't overwhelm and confuse Cursor.",
"main": "index.js", "main": "index.js",
"type": "module", "type": "module",

View File

@@ -73,6 +73,7 @@ import {
getApiKeyStatusReport getApiKeyStatusReport
} from './task-manager/models.js'; } from './task-manager/models.js';
import { findProjectRoot } from './utils.js'; import { findProjectRoot } from './utils.js';
import { getTaskMasterVersion } from '../../src/utils/getVersion.js';
import { import {
convertAllRulesToBrandRules, convertAllRulesToBrandRules,
removeBrandRules, removeBrandRules,
@@ -1423,10 +1424,6 @@ function registerCommands(programInstance) {
'--details <details>', '--details <details>',
'Implementation details (for manual task creation)' 'Implementation details (for manual task creation)'
) )
.option(
'--test-strategy <testStrategy>',
'Test strategy (for manual task creation)'
)
.option( .option(
'--dependencies <dependencies>', '--dependencies <dependencies>',
'Comma-separated list of task IDs this task depends on' 'Comma-separated list of task IDs this task depends on'
@@ -1808,6 +1805,7 @@ function registerCommands(programInstance) {
} }
} catch (error) { } catch (error) {
console.error(chalk.red(`Error: ${error.message}`)); console.error(chalk.red(`Error: ${error.message}`));
showAddSubtaskHelp();
process.exit(1); process.exit(1);
} }
}) })
@@ -2545,28 +2543,7 @@ function setupCLI() {
*/ */
async function checkForUpdate() { async function checkForUpdate() {
// Get current version from package.json ONLY // Get current version from package.json ONLY
let currentVersion = 'unknown'; // Initialize with a default const currentVersion = getTaskMasterVersion();
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}`);
}
return new Promise((resolve) => { return new Promise((resolve) => {
// Get the latest version from npm registry // Get the latest version from npm registry

View File

@@ -16,10 +16,10 @@ import {
truncate, truncate,
isSilentMode isSilentMode
} from './utils.js'; } from './utils.js';
import path from 'path';
import fs from 'fs'; import fs from 'fs';
import { findNextTask, analyzeTaskComplexity } from './task-manager.js'; import { findNextTask, analyzeTaskComplexity } from './task-manager.js';
import { getProjectName, getDefaultSubtasks } from './config-manager.js'; import { getProjectName, getDefaultSubtasks } from './config-manager.js';
import { getTaskMasterVersion } from '../../src/utils/getVersion.js';
// Create a color gradient for the banner // Create a color gradient for the banner
const coolGradient = gradient(['#00b4d8', '#0077b6', '#03045e']); const coolGradient = gradient(['#00b4d8', '#0077b6', '#03045e']);
@@ -46,17 +46,7 @@ function displayBanner() {
); );
// Read version directly from package.json // Read version directly from package.json
let version = 'unknown'; // Initialize with a default const version = getTaskMasterVersion();
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.');
}
console.log( console.log(
boxen( boxen(
@@ -809,12 +799,7 @@ async function displayNextTask(tasksPath) {
'padding-bottom': 0, 'padding-bottom': 0,
compact: true compact: true
}, },
chars: { chars: { mid: '', 'left-mid': '', 'mid-mid': '', 'right-mid': '' },
mid: '',
'left-mid': '',
'mid-mid': '',
'right-mid': ''
},
colWidths: [15, Math.min(75, process.stdout.columns - 20 || 60)], colWidths: [15, Math.min(75, process.stdout.columns - 20 || 60)],
wordWrap: true wordWrap: true
}); });
@@ -902,12 +887,7 @@ async function displayNextTask(tasksPath) {
'padding-bottom': 0, 'padding-bottom': 0,
compact: true compact: true
}, },
chars: { chars: { mid: '', 'left-mid': '', 'mid-mid': '', 'right-mid': '' },
mid: '',
'left-mid': '',
'mid-mid': '',
'right-mid': ''
},
wordWrap: true wordWrap: true
}); });

35
src/utils/getVersion.js Normal file
View File

@@ -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;
}