feat(mcp): Add tagInfo to responses and integrate ContextGatherer
Enhances the MCP server to include 'tagInfo' (currentTag, availableTags) in all tool responses, providing better client-side context.
- Introduces a new 'ContextGatherer' utility to standardize the collection of file, task, and project context for AI-powered commands. This refactors several task-manager modules ('expand-task', 'research', 'update-task', etc.) to use the new utility.
- Fixes an issue in 'get-task' and 'get-tasks' MCP tools where the 'projectRoot' was not being passed correctly, preventing tag information from being included in their responses.
- Adds subtask '103.17' to track the implementation of the task template importing feature.
- Updates documentation ('.cursor/rules', 'docs/') to align with the new tagged task system and context gatherer logic.
This commit is contained in:
@@ -32,10 +32,7 @@
|
||||
"defaultTag": "master"
|
||||
},
|
||||
"tags": {
|
||||
"autoSwitchOnBranch": false,
|
||||
"gitIntegration": {
|
||||
"enabled": false,
|
||||
"autoSwitchTagWithBranch": false
|
||||
}
|
||||
"enabledGitworkflow": false,
|
||||
"autoSwitchTagWithBranch": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ Create a new core function (e.g., research.js) in scripts/modules/task-manager/
|
||||
The research command now provides the same polished user experience as other AI-powered commands in the system.
|
||||
</info added on 2025-05-25T06:29:01.194Z>
|
||||
|
||||
## 5. Direct Function Implementation [pending]
|
||||
## 5. Direct Function Implementation [done]
|
||||
### Dependencies: 98.4
|
||||
### Description: Create the MCP direct function wrapper in mcp-server/src/core/direct-functions/ following the add-task pattern
|
||||
### Details:
|
||||
@@ -233,7 +233,7 @@ Create a new direct function (e.g., research.js) in mcp-server/src/core/direct-f
|
||||
- Handles telemetry data propagation
|
||||
- Export and register in task-master-core.js
|
||||
|
||||
## 6. MCP Tool Implementation [pending]
|
||||
## 6. MCP Tool Implementation [done]
|
||||
### Dependencies: 98.5
|
||||
### Description: Create the MCP tool in mcp-server/src/tools/ following the add-task tool pattern
|
||||
### Details:
|
||||
|
||||
@@ -115,7 +115,7 @@ Ensure all features work as intended and meet quality standards, with specific f
|
||||
### Details:
|
||||
|
||||
|
||||
## 14. Create State Management Utilities [pending]
|
||||
## 14. Create State Management Utilities [done]
|
||||
### Dependencies: 103.3, 103.7
|
||||
### Description: Implement utilities for reading/writing current tag state, tag resolution logic (currentTag from state -> --tag flag -> defaultTag fallback), and state file validation
|
||||
### Details:
|
||||
@@ -145,3 +145,9 @@ COMPLETED: All documentation files have been successfully updated to reflect the
|
||||
All documentation now properly reflects Part 1 implementation and prepares for Part 2 features. Documentation is fully aligned with the new tagged task structure.
|
||||
</info added on 2025-06-11T21:12:52.662Z>
|
||||
|
||||
## 17. Implement Task Template Importing from External .json Files [pending]
|
||||
### Dependencies: None
|
||||
### Description: Implement a mechanism to import tasks from external .json files, treating them as task templates. This allows users to add new .json files to the .taskmaster/tasks folder. The system should read these files, extract tasks under a specific tag, and merge them into the main tasks.json. The 'master' tag from template files must be ignored to prevent conflicts, and the primary tasks.json file will always take precedence over imported tags.
|
||||
### Details:
|
||||
Key implementation steps: 1. Develop a file watcher or a manual import command to detect and process new .json files in the tasks directory. 2. Implement logic to read an external json file, identify the tag key, and extract the array of tasks. 3. Handle potential conflicts: if an imported tag already exists in the main tasks.json, the existing tasks should be preserved and new ones appended, or the import should be skipped based on a defined precedence rule. 4. Ignore any 'master' key in template files to protect the integrity of the main task list. 5. Update task ID sequencing to ensure imported tasks are assigned unique IDs that don't conflict with existing tasks.
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user