Conversation
🦋 Changeset detectedLatest commit: 4386d01 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Crunchyman-ralph
left a comment
There was a problem hiding this comment.
Not going to review yet, just a small nit pick
There was a problem hiding this comment.
Not a patch, this is a minor for sure
|
Did i use changeset properly or still need adjutsments |
|
Yup pretty good |
|
OK so the issue with the root path stuff is that we're conflating two paths in one If we think about it, we have 2 paths to keep track of: Package Path:
Project Path:
So we need to be identify and grab both in a recursive way. researching This is the main blocker for MCP rn |
I've updated subtask 23.38 with more specific information about the path handling challenges and advanced solutions. The update includes: Key Challenges to Avoid:
Advanced Solutions:
This additional information should help us do the path handling in task-master in a way that should work across all npm installation scenarios without requiring manual path specification. The research confirms using import.meta.url for package path and recursive directory traversal for project path, while also suggesting additional techniques like using environment variables and dedicated packages like find-up for even more robust handling. |
|
This is now feature complete and tested on a fresh install with Two main changes
I'm seeing some commands still failing to find the project root but they may just need a touch to work list the list-tasks does, which doesnt need the root. Fixing now and pushing here, at which point i only need to check in on all the other tasks to verify no errors, then update the rules and readme, and get this into next for a release Readme really will need some help Gonna be a busy day tomorrow |
|
That fixes it 👌 All commands are verified on my end. Just need to adjust the rules and readmes at this point I also would like to make the ENV variables work in the mcp set up instead of only through env but that is an improvement.. we can patch that in if need be on day 2 |
The function aimed to abstract the common flow within MCP tool methods (logging, calling direct function, handling result). However, the established pattern (e.g., in ) involves the method directly calling the function (which handles its own caching via ) and then passing the result to . This pattern is clear, functional, and leverages the core utilities effectively. Removing the unused simplifies , eliminates a redundant abstraction layer, and clarifies the standard implementation pattern for MCP tools.
…et command with contextual information based on how we want to use it. not to be called for internal dev stuff.
Split monolithic task-master-core.js into separate function files within the mcp-server/src/core/direct-functions/ directory. This change: - Creates individual files for each direct function implementation - Moves findTasksJsonPath to a dedicated utils/path-utils.js file - Converts task-master-core.js to be a simple import/export hub - Improves maintainability and organization of the codebase - Reduces potential merge conflicts when multiple developers contribute - Follows standard module separation patterns Each function is now in its own self-contained file with clear imports and focused responsibility, while maintaining the same API endpoints.
…s by ID with proper direct function wrapper, MCP tool implementation, and registration
- Update architecture.mdc with file/function naming standards for MCP server components - Update mcp.mdc with detailed naming conventions section - Update task 23 to include naming convention details - Update changeset to capture documentation changes - Rename MCP tool files to follow kebab-case convention - Implement set-task-status MCP command
- Create direct function wrapper in show-task.js with error handling and caching - Add MCP tool integration for displaying detailed task information - Update task-master-core.js to expose showTaskDirect function - Update changeset to document the new command - Follow kebab-case/camelCase/snake_case naming conventions
- Create direct function wrapper in next-task.js with error handling and caching - Add MCP tool integration for finding the next task to work on - Update task-master-core.js to expose nextTaskDirect function - Update changeset to document the new command
- Create direct function wrapper in expand-task.js with error handling - Add MCP tool integration for breaking down tasks into subtasks - Update task-master-core.js to expose expandTaskDirect function - Update changeset to document the new command - Parameter support for subtask generation options (num, research, prompt, force)
…e index.js for MCP. TODO: Figure out the project roots so we can do this on other projects vs just our own.
- Create direct function wrapper in add-task.js with prompt and dependency handling - Add MCP tool integration for creating new tasks via AI - Update task-master-core.js to expose addTaskDirect function - Update changeset to document the new command
…task-master-mcp. It cannot be simpler because global installations of the npm package would expose this as a globally available command. Calling it like 'mcp' could collide and also is lacking in branding and clarity of what command would be run. This is as good as we can make it.
…t that was a close call.
… despite working in inspector
…n flags
This commit fixes several issues with command line interface error handling:
1. Fix inconsistent behavior between --no-generate and --skip-generate:
- Standardized on --skip-generate across all commands
- Updated bin/task-master.js to use --skip-generate instead of --no-generate
- Modified add-subtask and remove-subtask commands to use --skip-generate
2. Enhance error handling for unknown options:
- Removed .allowUnknownOption() from commands to properly detect unknown options
- Added global error handler in bin/task-master.js for unknown commands/options
- Added command-specific error handlers with helpful error messages
3. Improve user experience with better help messages:
- Added helper functions to display formatted command help on errors
- Created command-specific help displays for add-subtask and remove-subtask
- Show available options when encountering unknown options
4. Update MCP server configuration:
- Modified .cursor/mcp.json to use node ./mcp-server/server.js directly
- Removed npx -y usage for more reliable execution
5. Other minor improvements:
- Adjusted column width for task ID display in UI
- Updated version number in package-lock.json to 0.9.30
This resolves issues where users would see confusing error messages like
'error: unknown option --generate' when using an incorrect flag."
… despite working in inspector
- Refactor for more reliable project root detection, particularly when running within integrated environments like Cursor IDE. Includes deriving root from script path and avoiding fallback to '/'.
- Enhance error handling in :
- Add detailed debug information (paths searched, CWD, etc.) to the error message when is not found in the provided project root.
- Improve clarity of error messages and potential solutions.
- Add verbose logging in to trace session object content and the finally resolved project root path, aiding in debugging path-related issues.
- Add default values for and to the example environment configuration.
…t that was a close call.
08f7eac to
9a66db0
Compare
Working through moving the MCP functions to use the direct functions.
MCP is feature complete, the last thing missing is to ensure the root is properly handled.