Compare commits
1 Commits
feat/make.
...
feat/bundl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83c0eec982 |
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"task-master-ai": patch
|
||||
---
|
||||
|
||||
Call rules interactive setup during init
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"task-master-ai": patch
|
||||
---
|
||||
|
||||
Fix issues with task creation/update where subtasks are being created like id: <parent_task>.<subtask> instead if just id: <subtask>
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
"task-master-ai": minor
|
||||
---
|
||||
|
||||
Make task-master more compatible with the "o" family models of OpenAI
|
||||
|
||||
Now works well with:
|
||||
- o3
|
||||
- o3-mini
|
||||
- etc.
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"mode": "exit",
|
||||
"tag": "rc",
|
||||
"initialVersions": {
|
||||
"task-master-ai": "0.17.1"
|
||||
},
|
||||
"changesets": [
|
||||
"bright-llamas-enter",
|
||||
"huge-moose-prove",
|
||||
"icy-dryers-hunt",
|
||||
"lemon-deer-hide",
|
||||
"modern-cats-pick",
|
||||
"nasty-berries-tan",
|
||||
"shy-groups-fly",
|
||||
"sour-lions-check",
|
||||
"spicy-teams-travel",
|
||||
"stale-cameras-sin",
|
||||
"swift-squids-sip",
|
||||
"tiny-dogs-change",
|
||||
"vast-plants-exist",
|
||||
"wet-berries-dress"
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"task-master-ai": patch
|
||||
---
|
||||
|
||||
Store tasks in Git by default
|
||||
98
CHANGELOG.md
98
CHANGELOG.md
@@ -1,103 +1,5 @@
|
||||
# task-master-ai
|
||||
|
||||
## 0.18.0-rc.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- [#830](https://github.com/eyaltoledano/claude-task-master/pull/830) [`e9d1bc2`](https://github.com/eyaltoledano/claude-task-master/commit/e9d1bc2385521c08374a85eba7899e878a51066c) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Can now configure baseURL of provider with `<PROVIDER>_BASE_URL`
|
||||
|
||||
- For example:
|
||||
- `OPENAI_BASE_URL`
|
||||
|
||||
- [#460](https://github.com/eyaltoledano/claude-task-master/pull/460) [`a09a2d0`](https://github.com/eyaltoledano/claude-task-master/commit/a09a2d0967a10276623e3f3ead3ed577c15ce62f) Thanks [@joedanz](https://github.com/joedanz)! - Added comprehensive rule profile management:
|
||||
|
||||
**New Profile Support**: Added comprehensive IDE profile support with eight specialized profiles: Claude Code, Cline, Codex, Cursor, Roo, Trae, VS Code, and Windsurf. Each profile is optimized for its respective IDE with appropriate mappings and configuration.
|
||||
**Initialization**: You can now specify which rule profiles to include at project initialization using `--rules <profiles>` or `-r <profiles>` (e.g., `task-master init -r cursor,roo`). Only the selected profiles and configuration are included.
|
||||
**Add/Remove Commands**: `task-master rules add <profiles>` and `task-master rules remove <profiles>` let you manage specific rule profiles and MCP config after initialization, supporting multiple profiles at once.
|
||||
**Interactive Setup**: `task-master rules setup` launches an interactive prompt to select which rule profiles to add to your project. This does **not** re-initialize your project or affect shell aliases; it only manages rules.
|
||||
**Selective Removal**: Rules removal intelligently preserves existing non-Task Master rules and files and only removes Task Master-specific rules. Profile directories are only removed when completely empty and all conditions are met (no existing rules, no other files/folders, MCP config completely removed).
|
||||
**Safety Features**: Confirmation messages clearly explain that only Task Master-specific rules and MCP configurations will be removed, while preserving existing custom rules and other files.
|
||||
**Robust Validation**: Includes comprehensive checks for array types in MCP config processing and error handling throughout the rules management system.
|
||||
|
||||
This enables more flexible, rule-specific project setups with intelligent cleanup that preserves user customizations while safely managing Task Master components.
|
||||
|
||||
- Resolves #338
|
||||
|
||||
- [#804](https://github.com/eyaltoledano/claude-task-master/pull/804) [`1b8c320`](https://github.com/eyaltoledano/claude-task-master/commit/1b8c320c570473082f1eb4bf9628bff66e799092) Thanks [@ejones40](https://github.com/ejones40)! - Add better support for python projects by adding `pyproject.toml` as a projectRoot marker
|
||||
|
||||
- [#743](https://github.com/eyaltoledano/claude-task-master/pull/743) [`a2a3229`](https://github.com/eyaltoledano/claude-task-master/commit/a2a3229fd01e24a5838f11a3938a77250101e184) Thanks [@joedanz](https://github.com/joedanz)! - - **Git Worktree Detection:**
|
||||
|
||||
- Now properly skips Git initialization when inside existing Git worktree
|
||||
- Prevents accidental nested repository creation
|
||||
- **Flag System Overhaul:**
|
||||
- `--git`/`--no-git` controls repository initialization
|
||||
- `--aliases`/`--no-aliases` consistently manages shell alias creation
|
||||
- `--git-tasks`/`--no-git-tasks` controls whether task files are stored in Git
|
||||
- `--dry-run` accurately previews all initialization behaviors
|
||||
- **GitTasks Functionality:**
|
||||
- New `--git-tasks` flag includes task files in Git (comments them out in .gitignore)
|
||||
- New `--no-git-tasks` flag excludes task files from Git (default behavior)
|
||||
- Supports both CLI and MCP interfaces with proper parameter passing
|
||||
|
||||
**Implementation Details:**
|
||||
|
||||
- Added explicit Git worktree detection before initialization
|
||||
- Refactored flag processing to ensure consistent behavior
|
||||
- Fixes #734
|
||||
|
||||
- [#829](https://github.com/eyaltoledano/claude-task-master/pull/829) [`4b0c9d9`](https://github.com/eyaltoledano/claude-task-master/commit/4b0c9d9af62d00359fca3f43283cf33223d410bc) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Add Claude Code provider support
|
||||
|
||||
Introduces a new provider that enables using Claude models (Opus and Sonnet) through the Claude Code CLI without requiring an API key.
|
||||
|
||||
Key features:
|
||||
|
||||
- New claude-code provider with support for opus and sonnet models
|
||||
- No API key required - uses local Claude Code CLI installation
|
||||
- Optional dependency - won't affect users who don't need Claude Code
|
||||
- Lazy loading ensures the provider only loads when requested
|
||||
- Full integration with existing Task Master commands and workflows
|
||||
- Comprehensive test coverage for reliability
|
||||
- New --claude-code flag for the models command
|
||||
|
||||
Users can now configure Claude Code models with:
|
||||
task-master models --set-main sonnet --claude-code
|
||||
task-master models --set-research opus --claude-code
|
||||
|
||||
The @anthropic-ai/claude-code package is optional and won't be installed unless explicitly needed.
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#827](https://github.com/eyaltoledano/claude-task-master/pull/827) [`5da5b59`](https://github.com/eyaltoledano/claude-task-master/commit/5da5b59bdeeb634dcb3adc7a9bc0fc37e004fa0c) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Fix expand command preserving tagged task structure and preventing data corruption
|
||||
|
||||
- Enhance E2E tests with comprehensive tag-aware expand testing to verify tag corruption fix
|
||||
- Add new test section for feature-expand tag creation and testing during expand operations
|
||||
- Verify tag preservation during expand, force expand, and expand --all operations
|
||||
- Test that master tag remains intact while feature-expand tag receives subtasks correctly
|
||||
- Fix file path references to use correct .taskmaster/config.json and .taskmaster/tasks/tasks.json locations
|
||||
- All tag corruption verification tests pass successfully, confirming the expand command tag corruption bug fix works as expected
|
||||
|
||||
- [#833](https://github.com/eyaltoledano/claude-task-master/pull/833) [`cf2c066`](https://github.com/eyaltoledano/claude-task-master/commit/cf2c06697a0b5b952fb6ca4b3c923e9892604d08) Thanks [@joedanz](https://github.com/joedanz)! - Call rules interactive setup during init
|
||||
|
||||
- [#826](https://github.com/eyaltoledano/claude-task-master/pull/826) [`7811227`](https://github.com/eyaltoledano/claude-task-master/commit/78112277b3caa4539e6e29805341a944799fb0e7) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Improves Amazon Bedrock support
|
||||
|
||||
- [#834](https://github.com/eyaltoledano/claude-task-master/pull/834) [`6483537`](https://github.com/eyaltoledano/claude-task-master/commit/648353794eb60d11ffceda87370a321ad310fbd7) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Fix issues with task creation/update where subtasks are being created like id: <parent_task>.<subtask> instead if just id: <subtask>
|
||||
|
||||
- [#835](https://github.com/eyaltoledano/claude-task-master/pull/835) [`727f1ec`](https://github.com/eyaltoledano/claude-task-master/commit/727f1ec4ebcbdd82547784c4c113b666af7e122e) Thanks [@joedanz](https://github.com/joedanz)! - Store tasks in Git by default
|
||||
|
||||
- [#822](https://github.com/eyaltoledano/claude-task-master/pull/822) [`1bd6d4f`](https://github.com/eyaltoledano/claude-task-master/commit/1bd6d4f2468070690e152e6e63e15a57bc550d90) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Improve provider validation system with clean constants structure
|
||||
|
||||
- **Fixed "Invalid provider hint" errors**: Resolved validation failures for Azure, Vertex, and Bedrock providers
|
||||
- **Improved search UX**: Integrated search for better model discovery with real-time filtering
|
||||
- **Better organization**: Moved custom provider options to bottom of model selection with clear section separators
|
||||
|
||||
This change ensures all custom providers (Azure, Vertex, Bedrock, OpenRouter, Ollama) work correctly in `task-master models --setup`
|
||||
|
||||
- [#633](https://github.com/eyaltoledano/claude-task-master/pull/633) [`3a2325a`](https://github.com/eyaltoledano/claude-task-master/commit/3a2325a963fed82377ab52546eedcbfebf507a7e) Thanks [@nmarley](https://github.com/nmarley)! - Fix weird `task-master init` bug when using in certain environments
|
||||
|
||||
- [#831](https://github.com/eyaltoledano/claude-task-master/pull/831) [`b592dff`](https://github.com/eyaltoledano/claude-task-master/commit/b592dff8bc5c5d7966843fceaa0adf4570934336) Thanks [@joedanz](https://github.com/joedanz)! - Rename Roo Code Boomerang role to Orchestrator
|
||||
|
||||
- [#830](https://github.com/eyaltoledano/claude-task-master/pull/830) [`e9d1bc2`](https://github.com/eyaltoledano/claude-task-master/commit/e9d1bc2385521c08374a85eba7899e878a51066c) Thanks [@Crunchyman-ralph](https://github.com/Crunchyman-ralph)! - Improve mcp keys check in cursor
|
||||
|
||||
## 0.17.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
".changeset",
|
||||
"tasks",
|
||||
"package-lock.json",
|
||||
"tests/fixture/*.json",
|
||||
"dist"
|
||||
"tests/fixture/*.json"
|
||||
]
|
||||
},
|
||||
"formatter": {
|
||||
|
||||
@@ -33,7 +33,7 @@ export function registerInitializeProjectTool(server) {
|
||||
storeTasksInGit: z
|
||||
.boolean()
|
||||
.optional()
|
||||
.default(true)
|
||||
.default(false)
|
||||
.describe('Store tasks in Git (tasks.json and tasks/ directory).'),
|
||||
yes: z
|
||||
.boolean()
|
||||
|
||||
1671
package-lock.json
generated
1671
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
35
package.json
35
package.json
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "task-master-ai",
|
||||
"version": "0.18.0-rc.0",
|
||||
"version": "0.17.1-test",
|
||||
"description": "A task management system for ambitious AI-driven development that doesn't overwhelm and confuse Cursor.",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"task-master": "bin/task-master.js",
|
||||
"task-master-mcp": "mcp-server/server.js",
|
||||
"task-master-ai": "mcp-server/server.js"
|
||||
"task-master": "dist/task-master.cjs",
|
||||
"task-master-mcp": "dist/task-master-mcp.cjs",
|
||||
"task-master-ai": "dist/task-master-mcp.cjs"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node --experimental-vm-modules node_modules/.bin/jest",
|
||||
@@ -22,7 +22,13 @@
|
||||
"inspector": "npx @modelcontextprotocol/inspector node mcp-server/server.js",
|
||||
"mcp-server": "node mcp-server/server.js",
|
||||
"format-check": "biome format .",
|
||||
"format": "biome format . --write"
|
||||
"format": "biome format . --write",
|
||||
"prebuild": "npm test",
|
||||
"build": "vite build && npm run postbuild",
|
||||
"postbuild": "node scripts/add-shebang.js",
|
||||
"build:bundle": "npm run build",
|
||||
"build:watch": "vite build --watch",
|
||||
"test:build": "echo 'Testing bundled binaries:' && echo '🔧 CLI (task-master):' && node dist/task-master.cjs --version && echo '🔌 MCP (task-master-ai):' && node dist/task-master-mcp.cjs --help | head -5 && echo '✅ Both bundles work!'"
|
||||
},
|
||||
"keywords": [
|
||||
"claude",
|
||||
@@ -91,14 +97,11 @@
|
||||
"url": "https://github.com/eyaltoledano/claude-task-master/issues"
|
||||
},
|
||||
"files": [
|
||||
"scripts/**",
|
||||
"assets/**",
|
||||
".cursor/**",
|
||||
"README-task-master.md",
|
||||
"index.js",
|
||||
"bin/**",
|
||||
"dist/**",
|
||||
"mcp-server/**",
|
||||
"src/**"
|
||||
"README-task-master.md",
|
||||
".cursor/**",
|
||||
"assets/**"
|
||||
],
|
||||
"overrides": {
|
||||
"node-fetch": "^2.6.12",
|
||||
@@ -108,15 +111,19 @@
|
||||
"@biomejs/biome": "^1.9.4",
|
||||
"@changesets/changelog-github": "^0.5.1",
|
||||
"@changesets/cli": "^2.28.1",
|
||||
"@rollup/plugin-json": "^6.1.0",
|
||||
"@rollup/plugin-node-resolve": "^16.0.1",
|
||||
"@types/jest": "^29.5.14",
|
||||
"execa": "^8.0.1",
|
||||
"ink": "^5.0.1",
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-node": "^29.7.0",
|
||||
"mock-fs": "^5.5.0",
|
||||
"pkg": "^5.8.1",
|
||||
"prettier": "^3.5.3",
|
||||
"react": "^18.3.1",
|
||||
"supertest": "^7.1.0",
|
||||
"tsx": "^4.16.2"
|
||||
"tsx": "^4.16.2",
|
||||
"vite": "^6.3.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
82
scripts/add-shebang.js
Normal file
82
scripts/add-shebang.js
Normal file
@@ -0,0 +1,82 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import {
|
||||
readFileSync,
|
||||
writeFileSync,
|
||||
chmodSync,
|
||||
copyFileSync,
|
||||
mkdirSync,
|
||||
existsSync
|
||||
} from 'fs';
|
||||
import { join, dirname } from 'path';
|
||||
|
||||
const bundlePaths = [
|
||||
join(process.cwd(), 'dist/task-master.cjs'), // CLI tool
|
||||
join(process.cwd(), 'dist/task-master-mcp.cjs') // MCP server
|
||||
];
|
||||
|
||||
try {
|
||||
// Copy necessary asset files to dist
|
||||
const assetsToCopy = [
|
||||
{
|
||||
src: 'scripts/modules/supported-models.json',
|
||||
dest: 'dist/supported-models.json'
|
||||
},
|
||||
{ src: 'README-task-master.md', dest: 'dist/README-task-master.md' }
|
||||
];
|
||||
|
||||
console.log('📁 Copying assets...');
|
||||
for (const asset of assetsToCopy) {
|
||||
const srcPath = join(process.cwd(), asset.src);
|
||||
const destPath = join(process.cwd(), asset.dest);
|
||||
|
||||
if (existsSync(srcPath)) {
|
||||
// Ensure destination directory exists
|
||||
const destDir = dirname(destPath);
|
||||
if (!existsSync(destDir)) {
|
||||
mkdirSync(destDir, { recursive: true });
|
||||
}
|
||||
|
||||
copyFileSync(srcPath, destPath);
|
||||
console.log(` ✅ Copied ${asset.src} → ${asset.dest}`);
|
||||
} else {
|
||||
console.log(` ⚠️ Source not found: ${asset.src}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Process each bundle file
|
||||
for (const bundlePath of bundlePaths) {
|
||||
const fileName = bundlePath.split('/').pop();
|
||||
|
||||
if (!existsSync(bundlePath)) {
|
||||
console.log(`⚠️ Bundle not found: ${fileName}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Read the existing bundle
|
||||
const bundleContent = readFileSync(bundlePath, 'utf8');
|
||||
|
||||
// Add shebang if it doesn't already exist
|
||||
if (!bundleContent.startsWith('#!/usr/bin/env node')) {
|
||||
const contentWithShebang = '#!/usr/bin/env node\n' + bundleContent;
|
||||
writeFileSync(bundlePath, contentWithShebang);
|
||||
console.log(`✅ Added shebang to ${fileName}`);
|
||||
} else {
|
||||
console.log(`✅ Shebang already exists in ${fileName}`);
|
||||
}
|
||||
|
||||
// Make it executable
|
||||
chmodSync(bundlePath, 0o755);
|
||||
console.log(`✅ Made ${fileName} executable`);
|
||||
}
|
||||
|
||||
console.log('📦 Both bundles ready:');
|
||||
console.log(' 🔧 CLI tool: dist/task-master.cjs');
|
||||
console.log(' 🔌 MCP server: dist/task-master-mcp.cjs');
|
||||
console.log('🧪 Test with:');
|
||||
console.log(' node dist/task-master.cjs --version');
|
||||
console.log(' node dist/task-master-mcp.cjs --help');
|
||||
} catch (error) {
|
||||
console.error('❌ Post-build failed:', error.message);
|
||||
process.exit(1);
|
||||
}
|
||||
106
scripts/init.js
106
scripts/init.js
@@ -352,30 +352,10 @@ async function initializeProject(options = {}) {
|
||||
// console.log('Skip prompts determined:', skipPrompts);
|
||||
// }
|
||||
|
||||
let selectedRuleProfiles;
|
||||
if (options.rulesExplicitlyProvided) {
|
||||
// If --rules flag was used, always respect it.
|
||||
log(
|
||||
'info',
|
||||
`Using rule profiles provided via command line: ${options.rules.join(', ')}`
|
||||
);
|
||||
selectedRuleProfiles = options.rules;
|
||||
} else if (skipPrompts) {
|
||||
// If non-interactive (e.g., --yes) and no rules specified, default to ALL.
|
||||
log(
|
||||
'info',
|
||||
`No rules specified in non-interactive mode, defaulting to all profiles.`
|
||||
);
|
||||
selectedRuleProfiles = RULE_PROFILES;
|
||||
} else {
|
||||
// If interactive and no rules specified, default to NONE.
|
||||
// The 'rules --setup' wizard will handle selection.
|
||||
log(
|
||||
'info',
|
||||
'No rules specified; interactive setup will be launched to select profiles.'
|
||||
);
|
||||
selectedRuleProfiles = [];
|
||||
}
|
||||
const selectedRuleProfiles =
|
||||
options.rules && Array.isArray(options.rules) && options.rules.length > 0
|
||||
? options.rules
|
||||
: RULE_PROFILES; // Default to all profiles
|
||||
|
||||
if (skipPrompts) {
|
||||
if (!isSilentMode()) {
|
||||
@@ -393,7 +373,7 @@ async function initializeProject(options = {}) {
|
||||
options.addAliases !== undefined ? options.addAliases : true; // Default to true if not specified
|
||||
const initGit = options.initGit !== undefined ? options.initGit : true; // Default to true if not specified
|
||||
const storeTasksInGit =
|
||||
options.storeTasksInGit !== undefined ? options.storeTasksInGit : true; // Default to true if not specified
|
||||
options.storeTasksInGit !== undefined ? options.storeTasksInGit : false; // Default to false if not specified
|
||||
|
||||
if (dryRun) {
|
||||
log('info', 'DRY RUN MODE: No files will be modified');
|
||||
@@ -463,17 +443,17 @@ async function initializeProject(options = {}) {
|
||||
}
|
||||
|
||||
// Prompt for Git tasks storage (skip if --git-tasks or --no-git-tasks flag was provided)
|
||||
let storeGitPrompted = true; // Default to true
|
||||
let storeGitPrompted = false; // Default to false
|
||||
if (options.storeTasksInGit !== undefined) {
|
||||
storeGitPrompted = options.storeTasksInGit; // Use flag value if provided
|
||||
} else {
|
||||
const gitTasksInput = await promptQuestion(
|
||||
rl,
|
||||
chalk.cyan(
|
||||
'Store tasks in Git (tasks.json and tasks/ directory)? (Y/n): '
|
||||
'Store tasks in Git (tasks.json and tasks/ directory)? (y/N): '
|
||||
)
|
||||
);
|
||||
storeGitPrompted = gitTasksInput.trim().toLowerCase() !== 'n';
|
||||
storeGitPrompted = gitTasksInput.trim().toLowerCase() === 'y';
|
||||
}
|
||||
|
||||
// Confirm settings...
|
||||
@@ -512,6 +492,16 @@ async function initializeProject(options = {}) {
|
||||
'info',
|
||||
`Using rule profiles provided via command line: ${selectedRuleProfiles.join(', ')}`
|
||||
);
|
||||
} else {
|
||||
try {
|
||||
const targetDir = process.cwd();
|
||||
execSync('npx task-master rules setup', {
|
||||
stdio: 'inherit',
|
||||
cwd: targetDir
|
||||
});
|
||||
} catch (error) {
|
||||
log('error', 'Failed to run interactive rules setup:', error.message);
|
||||
}
|
||||
}
|
||||
|
||||
const dryRun = options.dryRun || false;
|
||||
@@ -551,9 +541,7 @@ async function initializeProject(options = {}) {
|
||||
);
|
||||
rl.close();
|
||||
} catch (error) {
|
||||
if (rl) {
|
||||
rl.close();
|
||||
}
|
||||
rl.close();
|
||||
log('error', `Error during initialization process: ${error.message}`);
|
||||
process.exit(1);
|
||||
}
|
||||
@@ -576,7 +564,7 @@ function createProjectStructure(
|
||||
storeTasksInGit,
|
||||
dryRun,
|
||||
options,
|
||||
selectedRuleProfiles = RULE_PROFILES
|
||||
selectedRuleProfiles = RULE_PROFILES // Default to all rule profiles
|
||||
) {
|
||||
const targetDir = process.cwd();
|
||||
log('info', `Initializing project in ${targetDir}`);
|
||||
@@ -677,13 +665,10 @@ function createProjectStructure(
|
||||
log('warn', 'Git not available, skipping repository initialization');
|
||||
}
|
||||
|
||||
// Only run the manual transformer if rules were provided via flags.
|
||||
// The interactive `rules --setup` wizard handles its own installation.
|
||||
if (options.rulesExplicitlyProvided || options.yes) {
|
||||
log('info', 'Generating profile rules from command-line flags...');
|
||||
for (const profileName of selectedRuleProfiles) {
|
||||
_processSingleProfile(profileName);
|
||||
}
|
||||
// Generate profile rules from assets/rules
|
||||
log('info', 'Generating profile rules from assets/rules...');
|
||||
for (const profileName of selectedRuleProfiles) {
|
||||
_processSingleProfile(profileName);
|
||||
}
|
||||
|
||||
// Add shell aliases if requested
|
||||
@@ -714,49 +699,6 @@ function createProjectStructure(
|
||||
);
|
||||
}
|
||||
|
||||
// === Add Rule Profiles Setup Step ===
|
||||
if (
|
||||
!isSilentMode() &&
|
||||
!dryRun &&
|
||||
!options?.yes &&
|
||||
!options.rulesExplicitlyProvided
|
||||
) {
|
||||
console.log(
|
||||
boxen(chalk.cyan('Configuring Rule Profiles...'), {
|
||||
padding: 0.5,
|
||||
margin: { top: 1, bottom: 0.5 },
|
||||
borderStyle: 'round',
|
||||
borderColor: 'blue'
|
||||
})
|
||||
);
|
||||
log(
|
||||
'info',
|
||||
'Running interactive rules setup. Please select which rule profiles to include.'
|
||||
);
|
||||
try {
|
||||
// Correct command confirmed by you.
|
||||
execSync('npx task-master rules --setup', {
|
||||
stdio: 'inherit',
|
||||
cwd: targetDir
|
||||
});
|
||||
log('success', 'Rule profiles configured.');
|
||||
} catch (error) {
|
||||
log('error', 'Failed to configure rule profiles:', error.message);
|
||||
log('warn', 'You may need to run "task-master rules --setup" manually.');
|
||||
}
|
||||
} else if (isSilentMode() || dryRun || options?.yes) {
|
||||
// This branch can log why setup was skipped, similar to the model setup logic.
|
||||
if (options.rulesExplicitlyProvided) {
|
||||
log(
|
||||
'info',
|
||||
'Skipping interactive rules setup because --rules flag was used.'
|
||||
);
|
||||
} else {
|
||||
log('info', 'Skipping interactive rules setup in non-interactive mode.');
|
||||
}
|
||||
}
|
||||
// =====================================
|
||||
|
||||
// === Add Model Configuration Step ===
|
||||
if (!isSilentMode() && !dryRun && !options?.yes) {
|
||||
console.log(
|
||||
|
||||
@@ -3828,26 +3828,7 @@ Examples:
|
||||
if (options[RULES_SETUP_ACTION]) {
|
||||
// Run interactive rules setup ONLY (no project init)
|
||||
const selectedRuleProfiles = await runInteractiveProfilesSetup();
|
||||
|
||||
if (!selectedRuleProfiles || selectedRuleProfiles.length === 0) {
|
||||
console.log(chalk.yellow('No profiles selected. Exiting.'));
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(
|
||||
chalk.blue(
|
||||
`Installing ${selectedRuleProfiles.length} selected profile(s)...`
|
||||
)
|
||||
);
|
||||
|
||||
for (let i = 0; i < selectedRuleProfiles.length; i++) {
|
||||
const profile = selectedRuleProfiles[i];
|
||||
console.log(
|
||||
chalk.blue(
|
||||
`Processing profile ${i + 1}/${selectedRuleProfiles.length}: ${profile}...`
|
||||
)
|
||||
);
|
||||
|
||||
for (const profile of selectedRuleProfiles) {
|
||||
if (!isValidProfile(profile)) {
|
||||
console.warn(
|
||||
`Rule profile for "${profile}" not found. Valid profiles: ${RULE_PROFILES.join(', ')}. Skipping.`
|
||||
@@ -3855,20 +3836,16 @@ Examples:
|
||||
continue;
|
||||
}
|
||||
const profileConfig = getRulesProfile(profile);
|
||||
|
||||
const addResult = convertAllRulesToProfileRules(
|
||||
projectDir,
|
||||
profileConfig
|
||||
);
|
||||
if (typeof profileConfig.onAddRulesProfile === 'function') {
|
||||
profileConfig.onAddRulesProfile(projectDir);
|
||||
}
|
||||
|
||||
console.log(chalk.green(generateProfileSummary(profile, addResult)));
|
||||
}
|
||||
|
||||
console.log(
|
||||
chalk.green(
|
||||
`\nCompleted installation of all ${selectedRuleProfiles.length} profile(s).`
|
||||
)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ const DEFAULTS = {
|
||||
// No default fallback provider/model initially
|
||||
provider: 'anthropic',
|
||||
modelId: 'claude-3-5-sonnet',
|
||||
maxTokens: 8192, // Default parameters if fallback IS configured
|
||||
maxTokens: 64000, // Default parameters if fallback IS configured
|
||||
temperature: 0.2
|
||||
}
|
||||
},
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
"output": 15.0
|
||||
},
|
||||
"allowed_roles": ["main", "fallback"],
|
||||
"max_tokens": 8192
|
||||
"max_tokens": 64000
|
||||
}
|
||||
],
|
||||
"openai": [
|
||||
@@ -84,8 +84,7 @@
|
||||
"input": 2.0,
|
||||
"output": 8.0
|
||||
},
|
||||
"allowed_roles": ["main", "fallback"],
|
||||
"max_tokens": 100000
|
||||
"allowed_roles": ["main", "fallback"]
|
||||
},
|
||||
{
|
||||
"id": "o3-mini",
|
||||
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
} from '../utils.js';
|
||||
import { generateObjectService } from '../ai-services-unified.js';
|
||||
import { getDefaultPriority } from '../config-manager.js';
|
||||
import generateTaskFiles from './generate-task-files.js';
|
||||
import ContextGatherer from '../utils/contextGatherer.js';
|
||||
|
||||
// Define Zod schema for the expected AI output object
|
||||
@@ -43,7 +44,7 @@ const AiTaskDataSchema = z.object({
|
||||
.describe('Detailed approach for verifying task completion'),
|
||||
dependencies: z
|
||||
.array(z.number())
|
||||
.nullable()
|
||||
.optional()
|
||||
.describe(
|
||||
'Array of task IDs that this task depends on (must be completed before this task can start)'
|
||||
)
|
||||
|
||||
@@ -43,9 +43,8 @@ const subtaskSchema = z
|
||||
),
|
||||
testStrategy: z
|
||||
.string()
|
||||
.nullable()
|
||||
.optional()
|
||||
.describe('Approach for testing this subtask')
|
||||
.default('')
|
||||
})
|
||||
.strict();
|
||||
const subtaskArraySchema = z.array(subtaskSchema);
|
||||
|
||||
@@ -26,11 +26,11 @@ const prdSingleTaskSchema = z.object({
|
||||
id: z.number().int().positive(),
|
||||
title: z.string().min(1),
|
||||
description: z.string().min(1),
|
||||
details: z.string().nullable(),
|
||||
testStrategy: z.string().nullable(),
|
||||
priority: z.enum(['high', 'medium', 'low']).nullable(),
|
||||
dependencies: z.array(z.number().int().positive()).nullable(),
|
||||
status: z.string().nullable()
|
||||
details: z.string().optional().default(''),
|
||||
testStrategy: z.string().optional().default(''),
|
||||
priority: z.enum(['high', 'medium', 'low']).default('medium'),
|
||||
dependencies: z.array(z.number().int().positive()).optional().default([]),
|
||||
status: z.string().optional().default('pending')
|
||||
});
|
||||
|
||||
// Define the Zod schema for the ENTIRE expected AI response object
|
||||
|
||||
@@ -36,27 +36,10 @@ const updatedTaskSchema = z
|
||||
description: z.string(),
|
||||
status: z.string(),
|
||||
dependencies: z.array(z.union([z.number().int(), z.string()])),
|
||||
priority: z.string().nullable().default('medium'),
|
||||
details: z.string().nullable().default(''),
|
||||
testStrategy: z.string().nullable().default(''),
|
||||
subtasks: z
|
||||
.array(
|
||||
z.object({
|
||||
id: z
|
||||
.number()
|
||||
.int()
|
||||
.positive()
|
||||
.describe('Sequential subtask ID starting from 1'),
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
status: z.string(),
|
||||
dependencies: z.array(z.number().int()).nullable().default([]),
|
||||
details: z.string().nullable().default(''),
|
||||
testStrategy: z.string().nullable().default('')
|
||||
})
|
||||
)
|
||||
.nullable()
|
||||
.default([])
|
||||
priority: z.string().optional(),
|
||||
details: z.string().optional(),
|
||||
testStrategy: z.string().optional(),
|
||||
subtasks: z.array(z.any()).optional()
|
||||
})
|
||||
.strip(); // Allows parsing even if AI adds extra fields, but validation focuses on schema
|
||||
|
||||
@@ -458,8 +441,6 @@ Guidelines:
|
||||
9. Instead, add a new subtask that clearly indicates what needs to be changed or replaced
|
||||
10. Use the existence of completed subtasks as an opportunity to make new subtasks more specific and targeted
|
||||
11. Ensure any new subtasks have unique IDs that don't conflict with existing ones
|
||||
12. CRITICAL: For subtask IDs, use ONLY numeric values (1, 2, 3, etc.) NOT strings ("1", "2", "3")
|
||||
13. CRITICAL: Subtask IDs should start from 1 and increment sequentially (1, 2, 3...) - do NOT use parent task ID as prefix
|
||||
|
||||
The changes described in the prompt should be thoughtfully applied to make the task more accurate and actionable.`;
|
||||
|
||||
@@ -592,37 +573,6 @@ The changes described in the prompt should be thoughtfully applied to make the t
|
||||
);
|
||||
updatedTask.status = taskToUpdate.status;
|
||||
}
|
||||
// Fix subtask IDs if they exist (ensure they are numeric and sequential)
|
||||
if (updatedTask.subtasks && Array.isArray(updatedTask.subtasks)) {
|
||||
let currentSubtaskId = 1;
|
||||
updatedTask.subtasks = updatedTask.subtasks.map((subtask) => {
|
||||
// Fix AI-generated subtask IDs that might be strings or use parent ID as prefix
|
||||
const correctedSubtask = {
|
||||
...subtask,
|
||||
id: currentSubtaskId, // Override AI-generated ID with correct sequential ID
|
||||
dependencies: Array.isArray(subtask.dependencies)
|
||||
? subtask.dependencies
|
||||
.map((dep) =>
|
||||
typeof dep === 'string' ? parseInt(dep, 10) : dep
|
||||
)
|
||||
.filter(
|
||||
(depId) =>
|
||||
!Number.isNaN(depId) &&
|
||||
depId >= 1 &&
|
||||
depId < currentSubtaskId
|
||||
)
|
||||
: [],
|
||||
status: subtask.status || 'pending'
|
||||
};
|
||||
currentSubtaskId++;
|
||||
return correctedSubtask;
|
||||
});
|
||||
report(
|
||||
'info',
|
||||
`Fixed ${updatedTask.subtasks.length} subtask IDs to be sequential numeric IDs.`
|
||||
);
|
||||
}
|
||||
|
||||
// Preserve completed subtasks (Keep existing logic)
|
||||
if (taskToUpdate.subtasks?.length > 0) {
|
||||
if (!updatedTask.subtasks) {
|
||||
|
||||
@@ -35,10 +35,10 @@ const updatedTaskSchema = z
|
||||
description: z.string(),
|
||||
status: z.string(),
|
||||
dependencies: z.array(z.union([z.number().int(), z.string()])),
|
||||
priority: z.string().nullable(),
|
||||
details: z.string().nullable(),
|
||||
testStrategy: z.string().nullable(),
|
||||
subtasks: z.array(z.any()).nullable() // Keep subtasks flexible for now
|
||||
priority: z.string().optional(),
|
||||
details: z.string().optional(),
|
||||
testStrategy: z.string().optional(),
|
||||
subtasks: z.array(z.any()).optional() // Keep subtasks flexible for now
|
||||
})
|
||||
.strip(); // Allow potential extra fields during parsing if needed, then validate structure
|
||||
const updatedTaskArraySchema = z.array(updatedTaskSchema);
|
||||
|
||||
@@ -255,7 +255,7 @@ function mergeWithExistingFile(
|
||||
function manageGitignoreFile(
|
||||
targetPath,
|
||||
content,
|
||||
storeTasksInGit = true,
|
||||
storeTasksInGit = false,
|
||||
log = null
|
||||
) {
|
||||
// Validate inputs
|
||||
|
||||
@@ -206,7 +206,6 @@ export function convertAllRulesToProfileRules(projectDir, profile) {
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const assetsDir = path.join(__dirname, '..', '..', 'assets');
|
||||
|
||||
if (typeof profile.onPostConvertRulesProfile === 'function') {
|
||||
profile.onPostConvertRulesProfile(projectDir, assetsDir);
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ jest.mock('../../../scripts/modules/utils.js', () => ({
|
||||
readComplexityReport: mockReadComplexityReport,
|
||||
CONFIG: {
|
||||
model: 'claude-3-7-sonnet-20250219',
|
||||
maxTokens: 8192,
|
||||
maxTokens: 64000,
|
||||
temperature: 0.2,
|
||||
defaultSubtasks: 5
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ const DEFAULT_CONFIG = {
|
||||
fallback: {
|
||||
provider: 'anthropic',
|
||||
modelId: 'claude-3-5-sonnet',
|
||||
maxTokens: 8192,
|
||||
maxTokens: 64000,
|
||||
temperature: 0.2
|
||||
}
|
||||
},
|
||||
|
||||
@@ -75,7 +75,7 @@ const DEFAULT_CONFIG = {
|
||||
fallback: {
|
||||
provider: 'anthropic',
|
||||
modelId: 'claude-3-5-sonnet',
|
||||
maxTokens: 8192,
|
||||
maxTokens: 64000,
|
||||
temperature: 0.2
|
||||
}
|
||||
},
|
||||
|
||||
@@ -123,9 +123,7 @@ describe('updateTasks', () => {
|
||||
details: 'New details 2 based on direction',
|
||||
description: 'Updated description',
|
||||
dependencies: [],
|
||||
priority: 'medium',
|
||||
testStrategy: 'Unit test the updated functionality',
|
||||
subtasks: []
|
||||
priority: 'medium'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
@@ -134,9 +132,7 @@ describe('updateTasks', () => {
|
||||
details: 'New details 3 based on direction',
|
||||
description: 'Updated description',
|
||||
dependencies: [],
|
||||
priority: 'medium',
|
||||
testStrategy: 'Integration test the updated features',
|
||||
subtasks: []
|
||||
priority: 'medium'
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
72
vite.config.js
Normal file
72
vite.config.js
Normal file
@@ -0,0 +1,72 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import { resolve } from 'path';
|
||||
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
||||
|
||||
export default defineConfig({
|
||||
build: {
|
||||
ssr: true, // Use SSR mode for Node.js
|
||||
rollupOptions: {
|
||||
// Multiple entry points for different applications
|
||||
input: {
|
||||
'task-master': resolve(__dirname, 'bin/task-master.js'), // CLI tool
|
||||
'task-master-mcp': resolve(__dirname, 'mcp-server/server.js') // MCP server
|
||||
},
|
||||
// Bundle everything except Node.js built-ins
|
||||
external: [
|
||||
// Node.js built-in modules
|
||||
'fs',
|
||||
'fs/promises',
|
||||
'path',
|
||||
'os',
|
||||
'crypto',
|
||||
'http',
|
||||
'https',
|
||||
'net',
|
||||
'tls',
|
||||
'child_process',
|
||||
'util',
|
||||
'events',
|
||||
'stream',
|
||||
'url',
|
||||
'querystring',
|
||||
'buffer',
|
||||
'module',
|
||||
'worker_threads',
|
||||
'readline',
|
||||
'process',
|
||||
'assert',
|
||||
'zlib',
|
||||
'dns',
|
||||
'perf_hooks',
|
||||
// Optional dependencies that might not be available
|
||||
'@anthropic-ai/claude-code'
|
||||
],
|
||||
output: {
|
||||
// Generate separate files for each entry
|
||||
dir: 'dist',
|
||||
format: 'cjs', // CommonJS for Node.js compatibility
|
||||
entryFileNames: '[name].cjs',
|
||||
chunkFileNames: 'chunks/[name]-[hash].cjs',
|
||||
assetFileNames: 'assets/[name].[ext]'
|
||||
},
|
||||
plugins: [
|
||||
nodeResolve({
|
||||
preferBuiltins: true,
|
||||
exportConditions: ['node']
|
||||
})
|
||||
]
|
||||
},
|
||||
target: 'node18',
|
||||
outDir: 'dist',
|
||||
minify: false, // Keep readable for debugging
|
||||
sourcemap: false
|
||||
},
|
||||
define: {
|
||||
// Define any environment variables if needed
|
||||
'process.env.NODE_ENV': '"production"'
|
||||
},
|
||||
ssr: {
|
||||
// Don't externalize any dependencies - bundle them all
|
||||
noExternal: true
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user