refactor(mcp): Modularize direct functions in MCP server
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.
This commit is contained in:
@@ -361,4 +361,13 @@ alwaysApply: false
|
||||
};
|
||||
```
|
||||
|
||||
Refer to [`utils.js`](mdc:scripts/modules/utils.js) for implementation examples and [`new_features.mdc`](mdc:.cursor/rules/new_features.mdc) for integration guidelines. Use [`commands.mdc`](mdc:.cursor/rules/commands.mdc) for CLI integration details.
|
||||
Refer to [`utils.js`](mdc:scripts/modules/utils.js) for implementation examples and [`new_features.mdc`](mdc:.cursor/rules/new_features.mdc) for integration guidelines. Use [`commands.mdc`](mdc:.cursor/rules/commands.mdc) for CLI integration details.
|
||||
|
||||
## MCP Server Utilities Structure
|
||||
|
||||
- **Core Utilities** (`mcp-server/src/core/utils/path-utils.js`):
|
||||
- Contains path-related utilities like `findTasksJsonPath` that are used by direct function implementations.
|
||||
- These are imported by direct function files in the `direct-functions/` directory.
|
||||
|
||||
- **MCP Tool Utilities** (`mcp-server/src/tools/utils.js`):
|
||||
- Contains utilities related to MCP response handling and caching.
|
||||
Reference in New Issue
Block a user