mirror of
https://github.com/eyaltoledano/claude-task-master.git
synced 2026-01-30 06:12:05 +00:00
feat: Hamster Integration - Cloud Storage, Sentry Telemetry, and Major CLI UX Improvements (#1452)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import TaskMasterMCPServer from './src/index.js';
|
||||
import dotenv from 'dotenv';
|
||||
import TaskMasterMCPServer from './src/index.js';
|
||||
import logger from './src/logger.js';
|
||||
|
||||
// Load environment variables
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { addDependency } from '../../../../scripts/modules/dependency-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
import { addSubtask } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
createTagFromBranch
|
||||
} from '../../../../scripts/modules/task-manager/tag-management.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { addTask } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
* Direct function wrapper for analyzeTaskComplexity
|
||||
*/
|
||||
|
||||
import fs from 'fs';
|
||||
import analyzeTaskComplexity from '../../../../scripts/modules/task-manager/analyze-task-complexity.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode,
|
||||
enableSilentMode,
|
||||
isSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import fs from 'fs';
|
||||
import { createLogWrapper } from '../../tools/utils.js'; // Import the new utility
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
* Direct function wrapper for clearSubtasks
|
||||
*/
|
||||
|
||||
import { clearSubtasks } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode,
|
||||
readJSON
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { clearSubtasks } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
disableSilentMode,
|
||||
enableSilentMode,
|
||||
readJSON
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Clear subtasks from specified tasks
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
readComplexityReport,
|
||||
disableSilentMode,
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
readComplexityReport
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { copyTag } from '../../../../scripts/modules/task-manager/tag-management.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
*/
|
||||
|
||||
import { createTagFromBranch } from '../../../../scripts/modules/task-manager/tag-management.js';
|
||||
import {
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import {
|
||||
getCurrentBranch,
|
||||
isGitRepository
|
||||
} from '../../../../scripts/modules/utils/git-utils.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { deleteTag } from '../../../../scripts/modules/task-manager/tag-management.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
import { expandAllTasks } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
import { resolveComplexityReportOutputPath } from '../../../../src/utils/path-utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
/**
|
||||
* Expand all pending tasks with subtasks (Direct Function Wrapper)
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
* Direct function implementation for expanding a task into subtasks
|
||||
*/
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import expandTask from '../../../../scripts/modules/task-manager/expand-task.js';
|
||||
import {
|
||||
readJSON,
|
||||
writeJSON,
|
||||
enableSilentMode,
|
||||
disableSilentMode,
|
||||
isSilentMode
|
||||
enableSilentMode,
|
||||
isSilentMode,
|
||||
readJSON,
|
||||
writeJSON
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
* Direct function wrapper for fixDependenciesCommand
|
||||
*/
|
||||
|
||||
import fs from 'fs';
|
||||
import { fixDependenciesCommand } from '../../../../scripts/modules/dependency-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import fs from 'fs';
|
||||
|
||||
/**
|
||||
* Fix invalid dependencies in tasks.json automatically
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import os from 'os'; // Import os module for home directory check
|
||||
import { initializeProject } from '../../../../scripts/init.js'; // Import core function and its logger if needed separately
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
// isSilentMode // Not used directly here
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import os from 'os'; // Import os module for home directory check
|
||||
import { RULE_PROFILES } from '../../../../src/constants/profiles.js';
|
||||
import { convertAllRulesToProfileRules } from '../../../../src/utils/rule-transformer.js';
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { tags } from '../../../../scripts/modules/task-manager/tag-management.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
* Direct function for managing AI model configurations via MCP
|
||||
*/
|
||||
|
||||
import { CUSTOM_PROVIDERS_ARRAY } from '@tm/core';
|
||||
import {
|
||||
getModelConfiguration,
|
||||
getAvailableModelsList,
|
||||
getModelConfiguration,
|
||||
setModel
|
||||
} from '../../../../scripts/modules/task-manager/models.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
import { CUSTOM_PROVIDERS_ARRAY } from '@tm/core';
|
||||
|
||||
// Define supported roles for model setting
|
||||
const MODEL_ROLES = ['main', 'research', 'fallback'];
|
||||
|
||||
@@ -6,8 +6,8 @@ import { moveTasksBetweenTags } from '../../../../scripts/modules/task-manager/m
|
||||
import { findTasksPath } from '../utils/path-utils.js';
|
||||
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
*/
|
||||
|
||||
import { moveTask } from '../../../../scripts/modules/task-manager.js';
|
||||
import { findTasksPath } from '../utils/path-utils.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { findTasksPath } from '../utils/path-utils.js';
|
||||
|
||||
/**
|
||||
* Move a task or subtask to a new position
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
import { findNextTask } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
readJSON,
|
||||
readComplexityReport
|
||||
readComplexityReport,
|
||||
readJSON
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
* Direct function implementation for parsing PRD documents
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { getDefaultNumTasks } from '../../../../scripts/modules/config-manager.js';
|
||||
import { parsePRD } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode,
|
||||
enableSilentMode,
|
||||
isSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
import { getDefaultNumTasks } from '../../../../scripts/modules/config-manager.js';
|
||||
import { resolvePrdPath, resolveProjectPath } from '../utils/path-utils.js';
|
||||
import { TASKMASTER_TASKS_FILE } from '../../../../src/constants/paths.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
import { resolvePrdPath, resolveProjectPath } from '../utils/path-utils.js';
|
||||
|
||||
/**
|
||||
* Direct function wrapper for parsing PRD documents and generating tasks.
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
import { removeDependency } from '../../../../scripts/modules/dependency-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
import { removeSubtask } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
taskExists
|
||||
} from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode,
|
||||
enableSilentMode,
|
||||
readJSON
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { renameTag } from '../../../../scripts/modules/task-manager/tag-management.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
import path from 'path';
|
||||
import { performResearch } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { setResponseLanguage } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
|
||||
@@ -3,24 +3,24 @@
|
||||
* Direct function implementation for adding or removing rules
|
||||
*/
|
||||
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import {
|
||||
convertAllRulesToProfileRules,
|
||||
removeProfileRules,
|
||||
getRulesProfile,
|
||||
isValidProfile
|
||||
} from '../../../../src/utils/rule-transformer.js';
|
||||
import { RULE_PROFILES } from '../../../../src/constants/profiles.js';
|
||||
import { RULES_ACTIONS } from '../../../../src/constants/rules-actions.js';
|
||||
import {
|
||||
wouldRemovalLeaveNoProfiles,
|
||||
getInstalledProfiles
|
||||
getInstalledProfiles,
|
||||
wouldRemovalLeaveNoProfiles
|
||||
} from '../../../../src/utils/profiles.js';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import {
|
||||
convertAllRulesToProfileRules,
|
||||
getRulesProfile,
|
||||
isValidProfile,
|
||||
removeProfileRules
|
||||
} from '../../../../src/utils/rule-transformer.js';
|
||||
|
||||
/**
|
||||
* Direct function wrapper for adding or removing rules.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { scopeDownTask } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { scopeUpTask } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { setTaskStatus } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode,
|
||||
enableSilentMode,
|
||||
isSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { nextTaskDirect } from './next-task.js';
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { updateSubtaskById } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode,
|
||||
enableSilentMode,
|
||||
isSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { updateTaskById } from '../../../../scripts/modules/task-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode,
|
||||
enableSilentMode,
|
||||
isSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
|
||||
import path from 'path';
|
||||
import { updateTasks } from '../../../../scripts/modules/task-manager.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
/**
|
||||
* Direct function wrapper for updating tasks based on new context.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import { useTag } from '../../../../scripts/modules/task-manager/tag-management.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import { createLogWrapper } from '../../tools/utils.js';
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
* Direct function wrapper for validateDependenciesCommand
|
||||
*/
|
||||
|
||||
import fs from 'fs';
|
||||
import { validateDependenciesCommand } from '../../../../scripts/modules/dependency-manager.js';
|
||||
import {
|
||||
enableSilentMode,
|
||||
disableSilentMode
|
||||
disableSilentMode,
|
||||
enableSilentMode
|
||||
} from '../../../../scripts/modules/utils.js';
|
||||
import fs from 'fs';
|
||||
|
||||
/**
|
||||
* Validate dependencies in tasks.json
|
||||
|
||||
@@ -4,40 +4,40 @@
|
||||
* for improved organization and maintainability.
|
||||
*/
|
||||
|
||||
import { addDependencyDirect } from './direct-functions/add-dependency.js';
|
||||
import { addSubtaskDirect } from './direct-functions/add-subtask.js';
|
||||
import { addTagDirect } from './direct-functions/add-tag.js';
|
||||
import { addTaskDirect } from './direct-functions/add-task.js';
|
||||
import { analyzeTaskComplexityDirect } from './direct-functions/analyze-task-complexity.js';
|
||||
// Import direct function implementations
|
||||
import { getCacheStatsDirect } from './direct-functions/cache-stats.js';
|
||||
import { parsePRDDirect } from './direct-functions/parse-prd.js';
|
||||
import { updateTasksDirect } from './direct-functions/update-tasks.js';
|
||||
import { updateTaskByIdDirect } from './direct-functions/update-task-by-id.js';
|
||||
import { updateSubtaskByIdDirect } from './direct-functions/update-subtask-by-id.js';
|
||||
import { setTaskStatusDirect } from './direct-functions/set-task-status.js';
|
||||
import { nextTaskDirect } from './direct-functions/next-task.js';
|
||||
import { expandTaskDirect } from './direct-functions/expand-task.js';
|
||||
import { addTaskDirect } from './direct-functions/add-task.js';
|
||||
import { addSubtaskDirect } from './direct-functions/add-subtask.js';
|
||||
import { removeSubtaskDirect } from './direct-functions/remove-subtask.js';
|
||||
import { analyzeTaskComplexityDirect } from './direct-functions/analyze-task-complexity.js';
|
||||
import { clearSubtasksDirect } from './direct-functions/clear-subtasks.js';
|
||||
import { expandAllTasksDirect } from './direct-functions/expand-all-tasks.js';
|
||||
import { removeDependencyDirect } from './direct-functions/remove-dependency.js';
|
||||
import { validateDependenciesDirect } from './direct-functions/validate-dependencies.js';
|
||||
import { fixDependenciesDirect } from './direct-functions/fix-dependencies.js';
|
||||
import { complexityReportDirect } from './direct-functions/complexity-report.js';
|
||||
import { addDependencyDirect } from './direct-functions/add-dependency.js';
|
||||
import { removeTaskDirect } from './direct-functions/remove-task.js';
|
||||
import { initializeProjectDirect } from './direct-functions/initialize-project.js';
|
||||
import { modelsDirect } from './direct-functions/models.js';
|
||||
import { moveTaskDirect } from './direct-functions/move-task.js';
|
||||
import { moveTaskCrossTagDirect } from './direct-functions/move-task-cross-tag.js';
|
||||
import { researchDirect } from './direct-functions/research.js';
|
||||
import { addTagDirect } from './direct-functions/add-tag.js';
|
||||
import { deleteTagDirect } from './direct-functions/delete-tag.js';
|
||||
import { listTagsDirect } from './direct-functions/list-tags.js';
|
||||
import { useTagDirect } from './direct-functions/use-tag.js';
|
||||
import { renameTagDirect } from './direct-functions/rename-tag.js';
|
||||
import { copyTagDirect } from './direct-functions/copy-tag.js';
|
||||
import { scopeUpDirect } from './direct-functions/scope-up.js';
|
||||
import { deleteTagDirect } from './direct-functions/delete-tag.js';
|
||||
import { expandAllTasksDirect } from './direct-functions/expand-all-tasks.js';
|
||||
import { expandTaskDirect } from './direct-functions/expand-task.js';
|
||||
import { fixDependenciesDirect } from './direct-functions/fix-dependencies.js';
|
||||
import { initializeProjectDirect } from './direct-functions/initialize-project.js';
|
||||
import { listTagsDirect } from './direct-functions/list-tags.js';
|
||||
import { modelsDirect } from './direct-functions/models.js';
|
||||
import { moveTaskCrossTagDirect } from './direct-functions/move-task-cross-tag.js';
|
||||
import { moveTaskDirect } from './direct-functions/move-task.js';
|
||||
import { nextTaskDirect } from './direct-functions/next-task.js';
|
||||
import { parsePRDDirect } from './direct-functions/parse-prd.js';
|
||||
import { removeDependencyDirect } from './direct-functions/remove-dependency.js';
|
||||
import { removeSubtaskDirect } from './direct-functions/remove-subtask.js';
|
||||
import { removeTaskDirect } from './direct-functions/remove-task.js';
|
||||
import { renameTagDirect } from './direct-functions/rename-tag.js';
|
||||
import { researchDirect } from './direct-functions/research.js';
|
||||
import { scopeDownDirect } from './direct-functions/scope-down.js';
|
||||
import { scopeUpDirect } from './direct-functions/scope-up.js';
|
||||
import { setTaskStatusDirect } from './direct-functions/set-task-status.js';
|
||||
import { updateSubtaskByIdDirect } from './direct-functions/update-subtask-by-id.js';
|
||||
import { updateTaskByIdDirect } from './direct-functions/update-task-by-id.js';
|
||||
import { updateTasksDirect } from './direct-functions/update-tasks.js';
|
||||
import { useTagDirect } from './direct-functions/use-tag.js';
|
||||
import { validateDependenciesDirect } from './direct-functions/validate-dependencies.js';
|
||||
|
||||
// Re-export utility functions
|
||||
export { findTasksPath } from './utils/path-utils.js';
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import path from 'path';
|
||||
import { PROJECT_MARKERS } from '../../../../src/constants/paths.js';
|
||||
import {
|
||||
findTasksPath as coreFindTasksPath,
|
||||
findPRDPath as coreFindPrdPath,
|
||||
findComplexityReportPath as coreFindComplexityReportPath,
|
||||
resolveComplexityReportOutputPath as coreResolveComplexityReportOutputPath,
|
||||
findPRDPath as coreFindPrdPath,
|
||||
findProjectRoot as coreFindProjectRoot,
|
||||
findTasksPath as coreFindTasksPath,
|
||||
resolveComplexityReportOutputPath as coreResolveComplexityReportOutputPath,
|
||||
normalizeProjectRoot
|
||||
} from '../../../../src/utils/path-utils.js';
|
||||
import { PROJECT_MARKERS } from '../../../../src/constants/paths.js';
|
||||
|
||||
/**
|
||||
* MCP-specific path utilities that extend core path utilities with session support
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
* Uses MCP session.requestSampling() for AI operations.
|
||||
*/
|
||||
|
||||
import {
|
||||
convertToMCPFormat,
|
||||
convertFromMCPFormat
|
||||
} from './message-converter.js';
|
||||
import { MCPError, mapMCPError } from './errors.js';
|
||||
import { extractJson } from './json-extractor.js';
|
||||
import {
|
||||
convertFromMCPFormat,
|
||||
convertToMCPFormat
|
||||
} from './message-converter.js';
|
||||
import {
|
||||
convertSchemaToInstructions,
|
||||
enhancePromptForJSON
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
import { FastMCP } from 'fastmcp';
|
||||
import path from 'path';
|
||||
import dotenv from 'dotenv';
|
||||
import { fileURLToPath } from 'url';
|
||||
import fs from 'fs';
|
||||
import logger from './logger.js';
|
||||
import {
|
||||
registerTaskMasterTools,
|
||||
getToolsConfiguration
|
||||
} from './tools/index.js';
|
||||
import ProviderRegistry from '../../src/provider-registry/index.js';
|
||||
import { MCPProvider } from './providers/mcp-provider.js';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import * as Sentry from '@sentry/node';
|
||||
import dotenv from 'dotenv';
|
||||
import { FastMCP } from 'fastmcp';
|
||||
import packageJson from '../../package.json' with { type: 'json' };
|
||||
import ProviderRegistry from '../../src/provider-registry/index.js';
|
||||
import { initializeSentry } from '../../src/telemetry/sentry.js';
|
||||
import logger from './logger.js';
|
||||
import { MCPProvider } from './providers/mcp-provider.js';
|
||||
import {
|
||||
getToolsConfiguration,
|
||||
registerTaskMasterTools
|
||||
} from './tools/index.js';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
// Initialize Sentry after .env is loaded
|
||||
initializeSentry();
|
||||
|
||||
// Constants
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
@@ -28,7 +33,22 @@ class TaskMasterMCPServer {
|
||||
version: packageJson.version
|
||||
};
|
||||
|
||||
this.server = new FastMCP(this.options);
|
||||
// Create FastMCP instance
|
||||
const fastmcpServer = new FastMCP(this.options);
|
||||
|
||||
// Wrap the underlying MCP server with Sentry instrumentation
|
||||
// FastMCP exposes the internal MCP server via _mcpServer property
|
||||
if (fastmcpServer._mcpServer && Sentry.wrapMcpServerWithSentry) {
|
||||
try {
|
||||
fastmcpServer._mcpServer = Sentry.wrapMcpServerWithSentry(
|
||||
fastmcpServer._mcpServer
|
||||
);
|
||||
} catch (error) {
|
||||
logger.warn(`Failed to wrap MCP server with Sentry: ${error.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
this.server = fastmcpServer;
|
||||
this.initialized = false;
|
||||
|
||||
this.init = this.init.bind(this);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import chalk from 'chalk';
|
||||
import { isSilentMode } from '../../scripts/modules/utils.js';
|
||||
import { getLogLevel } from '../../scripts/modules/config-manager.js';
|
||||
import { isSilentMode } from '../../scripts/modules/utils.js';
|
||||
|
||||
// Define log levels
|
||||
const LOG_LEVELS = {
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
* Follows the Claude Code provider pattern for session-based providers.
|
||||
*/
|
||||
|
||||
import { createMCP } from '../custom-sdk/index.js';
|
||||
import { BaseAIProvider } from '../../../src/ai-providers/base-provider.js';
|
||||
import { createMCP } from '../custom-sdk/index.js';
|
||||
|
||||
export class MCPProvider extends BaseAIProvider {
|
||||
constructor() {
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* Tool for adding subtasks to existing tasks
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
handleApiResult,
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { addSubtaskDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the addSubtask tool with the MCP server
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* Tool to create a new tag
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { addTagDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* Tool to add a new task using AI
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { addTaskDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the addTask tool with the MCP server
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
* Tool for analyzing task complexity and generating recommendations
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import path from 'path';
|
||||
import fs from 'fs'; // Import fs for directory check/creation
|
||||
import path from 'path';
|
||||
import {
|
||||
handleApiResult,
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { analyzeTaskComplexityDirect } from '../core/task-master-core.js'; // Assuming core functions are exported via task-master-core.js
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { COMPLEXITY_REPORT_FILE } from '../../../src/constants/paths.js';
|
||||
import { resolveComplexityReportOutputPath } from '../../../src/utils/path-utils.js';
|
||||
import { analyzeTaskComplexityDirect } from '../core/task-master-core.js'; // Assuming core functions are exported via task-master-core.js
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
|
||||
/**
|
||||
* Register the analyze_project_complexity tool
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* Tool for clearing subtasks from parent tasks
|
||||
*/
|
||||
|
||||
import { createErrorResponse, handleApiResult, withToolContext } from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { handleApiResult, createErrorResponse, withToolContext } from '@tm/mcp';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { clearSubtasksDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the clearSubtasks tool with the MCP server
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
* Tool for displaying the complexity analysis report
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
handleApiResult,
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { complexityReportDirect } from '../core/task-master-core.js';
|
||||
import { COMPLEXITY_REPORT_FILE } from '../../../src/constants/paths.js';
|
||||
import { findComplexityReportPath } from '../core/utils/path-utils.js';
|
||||
import { z } from 'zod';
|
||||
import { getCurrentTag } from '../../../scripts/modules/utils.js';
|
||||
import { COMPLEXITY_REPORT_FILE } from '../../../src/constants/paths.js';
|
||||
import { complexityReportDirect } from '../core/task-master-core.js';
|
||||
import { findComplexityReportPath } from '../core/utils/path-utils.js';
|
||||
|
||||
/**
|
||||
* Register the complexityReport tool with the MCP server
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* Tool to copy an existing tag to a new tag
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { copyTagDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* Tool to delete an existing tag
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { deleteTagDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
* Tool for expanding all pending tasks with subtasks
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
handleApiResult,
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { expandAllTasksDirect } from '../core/task-master-core.js';
|
||||
import {
|
||||
findTasksPath,
|
||||
resolveComplexityReportOutputPath
|
||||
} from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the expandAll tool with the MCP server
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
* Tool to expand a task into subtasks
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
handleApiResult,
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { expandTaskDirect } from '../core/task-master-core.js';
|
||||
import {
|
||||
findTasksPath,
|
||||
findComplexityReportPath
|
||||
findComplexityReportPath,
|
||||
findTasksPath
|
||||
} from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the expand-task tool with the MCP server
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
* Tool for automatically fixing invalid task dependencies
|
||||
*/
|
||||
|
||||
import { createErrorResponse, handleApiResult, withToolContext } from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { handleApiResult, createErrorResponse, withToolContext } from '@tm/mcp';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { fixDependenciesDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the fixDependencies tool with the MCP server
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createContentResponse, createErrorResponse } from '@tm/mcp';
|
||||
// mcp-server/src/tools/get-operation-status.js
|
||||
import { z } from 'zod';
|
||||
import { createErrorResponse, createContentResponse } from '@tm/mcp';
|
||||
|
||||
/**
|
||||
* Register the get_operation_status tool.
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
import logger from '../logger.js';
|
||||
import {
|
||||
toolRegistry,
|
||||
coreTools,
|
||||
standardTools,
|
||||
getAvailableTools,
|
||||
getToolRegistration,
|
||||
isValidTool
|
||||
isValidTool,
|
||||
standardTools,
|
||||
toolRegistry
|
||||
} from './tool-registry.js';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { initializeProjectDirect } from '../core/task-master-core.js';
|
||||
import { z } from 'zod';
|
||||
import { RULE_PROFILES } from '../../../src/constants/profiles.js';
|
||||
import { initializeProjectDirect } from '../core/task-master-core.js';
|
||||
|
||||
export function registerInitializeProjectTool(server) {
|
||||
server.addTool({
|
||||
@@ -24,7 +24,9 @@ export function registerInitializeProjectTool(server) {
|
||||
.boolean()
|
||||
.optional()
|
||||
.default(true)
|
||||
.describe('Add shell aliases (tm, taskmaster) to shell config file.'),
|
||||
.describe(
|
||||
'Add shell aliases (tm, taskmaster, hamster, ham) to shell config file.'
|
||||
),
|
||||
initGit: z
|
||||
.boolean()
|
||||
.optional()
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* Tool to list all available tags
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { listTagsDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* MCP tool for managing AI model configurations
|
||||
*/
|
||||
|
||||
import { createErrorResponse, handleApiResult, withToolContext } from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { handleApiResult, createErrorResponse, withToolContext } from '@tm/mcp';
|
||||
import { modelsDirect } from '../core/task-master-core.js';
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
* Tool to find the next task to work on based on dependencies and status
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { nextTaskDirect } from '../core/task-master-core.js';
|
||||
import {
|
||||
resolveTasksPath,
|
||||
resolveComplexityReportPath
|
||||
resolveComplexityReportPath,
|
||||
resolveTasksPath
|
||||
} from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the nextTask tool with the MCP server
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
* Tool to parse PRD document and generate tasks
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot,
|
||||
checkProgressCapability,
|
||||
createErrorResponse,
|
||||
checkProgressCapability
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { parsePRDDirect } from '../core/task-master-core.js';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import {
|
||||
PRD_FILE,
|
||||
TASKMASTER_DOCS_DIR,
|
||||
TASKMASTER_TASKS_FILE
|
||||
} from '../../../src/constants/paths.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { parsePRDDirect } from '../core/task-master-core.js';
|
||||
|
||||
/**
|
||||
* Register the parse_prd tool
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* Tool for removing subtasks from parent tasks
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
handleApiResult,
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { removeSubtaskDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the removeSubtask tool with the MCP server
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* Tool to remove a task by ID
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
handleApiResult,
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { removeTaskDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the remove-task tool with the MCP server
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* Tool to rename an existing tag
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { renameTagDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
* Tool to perform AI-powered research queries with project context
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { researchDirect } from '../core/task-master-core.js';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { researchDirect } from '../core/task-master-core.js';
|
||||
|
||||
/**
|
||||
* Register the research tool with the MCP server
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { responseLanguageDirect } from '../core/direct-functions/response-language.js';
|
||||
|
||||
export function registerResponseLanguageTool(server) {
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
* Tool to add or remove rules from a project (MCP server)
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { rulesDirect } from '../core/direct-functions/rules.js';
|
||||
import { z } from 'zod';
|
||||
import { RULE_PROFILES } from '../../../src/constants/profiles.js';
|
||||
import { rulesDirect } from '../core/direct-functions/rules.js';
|
||||
|
||||
/**
|
||||
* Register the rules tool with the MCP server
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* Tool to scope down task complexity
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { scopeDownDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the scopeDown tool with the MCP server
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* Tool to scope up task complexity
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { scopeUpDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the scopeUp tool with the MCP server
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
* Tool to set the status of a task
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
handleApiResult,
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { TASK_STATUS_OPTIONS } from '../../../src/constants/task-status.js';
|
||||
import {
|
||||
setTaskStatusDirect,
|
||||
nextTaskDirect
|
||||
nextTaskDirect,
|
||||
setTaskStatusDirect
|
||||
} from '../core/task-master-core.js';
|
||||
import {
|
||||
findTasksPath,
|
||||
findComplexityReportPath
|
||||
findComplexityReportPath,
|
||||
findTasksPath
|
||||
} from '../core/utils/path-utils.js';
|
||||
import { TASK_STATUS_OPTIONS } from '../../../src/constants/task-status.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the setTaskStatus tool with the MCP server
|
||||
|
||||
@@ -3,52 +3,52 @@
|
||||
* Tool Registry - Maps tool names to registration functions
|
||||
*/
|
||||
|
||||
import { registerParsePRDTool } from './parse-prd.js';
|
||||
import { registerUpdateTool } from './update.js';
|
||||
import { registerUpdateTaskTool } from './update-task.js';
|
||||
import { registerUpdateSubtaskTool } from './update-subtask.js';
|
||||
import { registerNextTaskTool } from './next-task.js';
|
||||
import { registerExpandTaskTool } from './expand-task.js';
|
||||
import { registerAddTaskTool } from './add-task.js';
|
||||
import { registerAddDependencyTool } from './add-dependency.js';
|
||||
import { registerAddSubtaskTool } from './add-subtask.js';
|
||||
import { registerRemoveSubtaskTool } from './remove-subtask.js';
|
||||
import { registerAddTagTool } from './add-tag.js';
|
||||
import { registerAddTaskTool } from './add-task.js';
|
||||
import { registerAnalyzeProjectComplexityTool } from './analyze.js';
|
||||
import { registerClearSubtasksTool } from './clear-subtasks.js';
|
||||
import { registerExpandAllTool } from './expand-all.js';
|
||||
import { registerRemoveDependencyTool } from './remove-dependency.js';
|
||||
import { registerValidateDependenciesTool } from './validate-dependencies.js';
|
||||
import { registerFixDependenciesTool } from './fix-dependencies.js';
|
||||
import { registerComplexityReportTool } from './complexity-report.js';
|
||||
import { registerAddDependencyTool } from './add-dependency.js';
|
||||
import { registerRemoveTaskTool } from './remove-task.js';
|
||||
import { registerCopyTagTool } from './copy-tag.js';
|
||||
import { registerDeleteTagTool } from './delete-tag.js';
|
||||
import { registerExpandAllTool } from './expand-all.js';
|
||||
import { registerExpandTaskTool } from './expand-task.js';
|
||||
import { registerFixDependenciesTool } from './fix-dependencies.js';
|
||||
import { registerInitializeProjectTool } from './initialize-project.js';
|
||||
import { registerListTagsTool } from './list-tags.js';
|
||||
import { registerModelsTool } from './models.js';
|
||||
import { registerMoveTaskTool } from './move-task.js';
|
||||
import { registerResponseLanguageTool } from './response-language.js';
|
||||
import { registerAddTagTool } from './add-tag.js';
|
||||
import { registerDeleteTagTool } from './delete-tag.js';
|
||||
import { registerListTagsTool } from './list-tags.js';
|
||||
import { registerUseTagTool } from './use-tag.js';
|
||||
import { registerNextTaskTool } from './next-task.js';
|
||||
import { registerParsePRDTool } from './parse-prd.js';
|
||||
import { registerRemoveDependencyTool } from './remove-dependency.js';
|
||||
import { registerRemoveSubtaskTool } from './remove-subtask.js';
|
||||
import { registerRemoveTaskTool } from './remove-task.js';
|
||||
import { registerRenameTagTool } from './rename-tag.js';
|
||||
import { registerCopyTagTool } from './copy-tag.js';
|
||||
import { registerResearchTool } from './research.js';
|
||||
import { registerResponseLanguageTool } from './response-language.js';
|
||||
import { registerRulesTool } from './rules.js';
|
||||
import { registerScopeUpTool } from './scope-up.js';
|
||||
import { registerScopeDownTool } from './scope-down.js';
|
||||
import { registerScopeUpTool } from './scope-up.js';
|
||||
import { registerUpdateSubtaskTool } from './update-subtask.js';
|
||||
import { registerUpdateTaskTool } from './update-task.js';
|
||||
import { registerUpdateTool } from './update.js';
|
||||
import { registerUseTagTool } from './use-tag.js';
|
||||
import { registerValidateDependenciesTool } from './validate-dependencies.js';
|
||||
|
||||
// Import TypeScript tools from apps/mcp
|
||||
import {
|
||||
registerAutopilotStartTool,
|
||||
registerAutopilotResumeTool,
|
||||
registerAutopilotNextTool,
|
||||
registerAutopilotStatusTool,
|
||||
registerAutopilotCompleteTool,
|
||||
registerAutopilotCommitTool,
|
||||
registerAutopilotFinalizeTool,
|
||||
registerAutopilotAbortTool,
|
||||
registerGetTasksTool,
|
||||
registerGetTaskTool,
|
||||
registerAutopilotCommitTool,
|
||||
registerAutopilotCompleteTool,
|
||||
registerAutopilotFinalizeTool,
|
||||
registerAutopilotNextTool,
|
||||
registerAutopilotResumeTool,
|
||||
registerAutopilotStartTool,
|
||||
registerAutopilotStatusTool,
|
||||
registerGenerateTool,
|
||||
registerGetTaskTool,
|
||||
registerGetTasksTool,
|
||||
registerSetTaskStatusTool
|
||||
} from '@tm/mcp';
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* Tool to append additional information to a specific subtask
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
handleApiResult,
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { updateSubtaskByIdDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the update-subtask tool with the MCP server
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* Tool to update a single task by ID with new information
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
handleApiResult,
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { updateTaskByIdDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the update-task tool with the MCP server
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
* Tool to update tasks based on new context/prompt
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
handleApiResult,
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
import { updateTasksDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
import { resolveTag } from '../../../scripts/modules/utils.js';
|
||||
|
||||
/**
|
||||
* Register the update tool with the MCP server
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* Tool to switch to a different tag context
|
||||
*/
|
||||
|
||||
import { z } from 'zod';
|
||||
import {
|
||||
createErrorResponse,
|
||||
handleApiResult,
|
||||
withNormalizedProjectRoot
|
||||
} from '@tm/mcp';
|
||||
import { z } from 'zod';
|
||||
import { useTagDirect } from '../core/task-master-core.js';
|
||||
import { findTasksPath } from '../core/utils/path-utils.js';
|
||||
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
*/
|
||||
|
||||
import { spawnSync } from 'child_process';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { contextManager } from '../core/context-manager.js'; // Import the singleton
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import packageJson from '../../../package.json' with { type: 'json' };
|
||||
import { getCurrentTag } from '../../../scripts/modules/utils.js';
|
||||
import { contextManager } from '../core/context-manager.js'; // Import the singleton
|
||||
|
||||
// Import path utilities to ensure consistent path resolution
|
||||
import {
|
||||
lastFoundProjectRoot,
|
||||
PROJECT_MARKERS
|
||||
PROJECT_MARKERS,
|
||||
lastFoundProjectRoot
|
||||
} from '../core/utils/path-utils.js';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
|
||||
Reference in New Issue
Block a user