mcp-adr-analysis-server 2.0.16 → 2.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +285 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/tools/interactive-adr-planning-tool.d.ts +39 -0
- package/dist/src/tools/interactive-adr-planning-tool.d.ts.map +1 -0
- package/dist/src/tools/interactive-adr-planning-tool.js +1028 -0
- package/dist/src/tools/interactive-adr-planning-tool.js.map +1 -0
- package/dist/src/tools/mcp-planning-tool.d.ts +26 -0
- package/dist/src/tools/mcp-planning-tool.d.ts.map +1 -0
- package/dist/src/tools/mcp-planning-tool.js +1096 -0
- package/dist/src/tools/mcp-planning-tool.js.map +1 -0
- package/dist/src/tools/todo-management-tool-v2.d.ts.map +1 -1
- package/dist/src/tools/todo-management-tool-v2.js +69 -15
- package/dist/src/tools/todo-management-tool-v2.js.map +1 -1
- package/dist/src/utils/todo-json-manager.d.ts.map +1 -1
- package/dist/src/utils/todo-json-manager.js +5 -3
- package/dist/src/utils/todo-json-manager.js.map +1 -1
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -24,7 +24,7 @@ function getPackageVersion() {
|
|
|
24
24
|
try {
|
|
25
25
|
// Handle both Jest environment and normal execution
|
|
26
26
|
const currentDir = getCurrentDirCompat();
|
|
27
|
-
// Try multiple possible locations for package.json
|
|
27
|
+
// Strategy 1: Try multiple possible locations for package.json
|
|
28
28
|
const possiblePaths = [
|
|
29
29
|
join(currentDir, 'package.json'),
|
|
30
30
|
join(currentDir, '..', 'package.json'),
|
|
@@ -42,11 +42,17 @@ function getPackageVersion() {
|
|
|
42
42
|
// Try next path
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
// Strategy 2: Use process.env.npm_package_version if available (during npm scripts)
|
|
46
|
+
if (process.env['npm_package_version']) {
|
|
47
|
+
return process.env['npm_package_version'];
|
|
48
|
+
}
|
|
49
|
+
// Final fallback: Use generic version instead of hardcoded specific version
|
|
50
|
+
// This prevents the need to update this code when version changes
|
|
51
|
+
return 'unknown'; // Generic fallback - no longer tied to specific version
|
|
46
52
|
}
|
|
47
53
|
catch (error) {
|
|
48
54
|
console.error('Error reading package.json:', error);
|
|
49
|
-
return '
|
|
55
|
+
return 'unknown'; // Generic fallback - no longer tied to specific version
|
|
50
56
|
}
|
|
51
57
|
}
|
|
52
58
|
/**
|
|
@@ -1961,6 +1967,258 @@ export class McpAdrAnalysisServer {
|
|
|
1961
1967
|
},
|
|
1962
1968
|
required: ['operation', 'projectPath']
|
|
1963
1969
|
}
|
|
1970
|
+
},
|
|
1971
|
+
{
|
|
1972
|
+
name: 'mcp_planning',
|
|
1973
|
+
description: 'Enhanced project planning and workflow management tool - phase-based project management, team resource allocation, progress tracking, risk analysis, and executive reporting',
|
|
1974
|
+
inputSchema: {
|
|
1975
|
+
type: 'object',
|
|
1976
|
+
properties: {
|
|
1977
|
+
operation: {
|
|
1978
|
+
type: 'string',
|
|
1979
|
+
enum: ['create_project', 'manage_phases', 'track_progress', 'manage_resources', 'risk_analysis', 'generate_reports'],
|
|
1980
|
+
description: 'Project planning operation to perform'
|
|
1981
|
+
},
|
|
1982
|
+
projectPath: {
|
|
1983
|
+
type: 'string',
|
|
1984
|
+
description: 'Project root path'
|
|
1985
|
+
},
|
|
1986
|
+
projectName: {
|
|
1987
|
+
type: 'string',
|
|
1988
|
+
description: 'Project name (for create_project operation)'
|
|
1989
|
+
},
|
|
1990
|
+
description: {
|
|
1991
|
+
type: 'string',
|
|
1992
|
+
description: 'Project description (for create_project operation)'
|
|
1993
|
+
},
|
|
1994
|
+
phases: {
|
|
1995
|
+
type: 'array',
|
|
1996
|
+
items: {
|
|
1997
|
+
type: 'object',
|
|
1998
|
+
properties: {
|
|
1999
|
+
name: { type: 'string' },
|
|
2000
|
+
duration: { type: 'string' },
|
|
2001
|
+
dependencies: {
|
|
2002
|
+
type: 'array',
|
|
2003
|
+
items: { type: 'string' },
|
|
2004
|
+
default: []
|
|
2005
|
+
},
|
|
2006
|
+
milestones: {
|
|
2007
|
+
type: 'array',
|
|
2008
|
+
items: { type: 'string' },
|
|
2009
|
+
default: []
|
|
2010
|
+
}
|
|
2011
|
+
},
|
|
2012
|
+
required: ['name', 'duration']
|
|
2013
|
+
},
|
|
2014
|
+
description: 'Initial project phases (for create_project operation)'
|
|
2015
|
+
},
|
|
2016
|
+
team: {
|
|
2017
|
+
type: 'array',
|
|
2018
|
+
items: {
|
|
2019
|
+
type: 'object',
|
|
2020
|
+
properties: {
|
|
2021
|
+
name: { type: 'string' },
|
|
2022
|
+
role: { type: 'string' },
|
|
2023
|
+
skills: {
|
|
2024
|
+
type: 'array',
|
|
2025
|
+
items: { type: 'string' },
|
|
2026
|
+
default: []
|
|
2027
|
+
},
|
|
2028
|
+
capacity: { type: 'string' }
|
|
2029
|
+
},
|
|
2030
|
+
required: ['name', 'role', 'capacity']
|
|
2031
|
+
},
|
|
2032
|
+
default: [],
|
|
2033
|
+
description: 'Team structure (for create_project operation)'
|
|
2034
|
+
},
|
|
2035
|
+
importFromAdrs: {
|
|
2036
|
+
type: 'boolean',
|
|
2037
|
+
default: true,
|
|
2038
|
+
description: 'Import phases from existing ADRs (for create_project operation)'
|
|
2039
|
+
},
|
|
2040
|
+
importFromTodos: {
|
|
2041
|
+
type: 'boolean',
|
|
2042
|
+
default: true,
|
|
2043
|
+
description: 'Import tasks from TODO system (for create_project operation)'
|
|
2044
|
+
},
|
|
2045
|
+
action: {
|
|
2046
|
+
type: 'string',
|
|
2047
|
+
enum: ['list', 'create', 'update', 'delete', 'transition', 'add', 'remove', 'allocate', 'optimize'],
|
|
2048
|
+
description: 'Management action (for manage_phases/manage_resources operations)'
|
|
2049
|
+
},
|
|
2050
|
+
phaseId: {
|
|
2051
|
+
type: 'string',
|
|
2052
|
+
description: 'Phase ID for phase operations'
|
|
2053
|
+
},
|
|
2054
|
+
phaseData: {
|
|
2055
|
+
type: 'object',
|
|
2056
|
+
properties: {
|
|
2057
|
+
name: { type: 'string' },
|
|
2058
|
+
description: { type: 'string' },
|
|
2059
|
+
estimatedDuration: { type: 'string' },
|
|
2060
|
+
dependencies: {
|
|
2061
|
+
type: 'array',
|
|
2062
|
+
items: { type: 'string' }
|
|
2063
|
+
},
|
|
2064
|
+
milestones: {
|
|
2065
|
+
type: 'array',
|
|
2066
|
+
items: { type: 'string' }
|
|
2067
|
+
},
|
|
2068
|
+
linkedAdrs: {
|
|
2069
|
+
type: 'array',
|
|
2070
|
+
items: { type: 'string' }
|
|
2071
|
+
}
|
|
2072
|
+
},
|
|
2073
|
+
description: 'Phase data for create/update operations'
|
|
2074
|
+
},
|
|
2075
|
+
targetStatus: {
|
|
2076
|
+
type: 'string',
|
|
2077
|
+
enum: ['planning', 'active', 'completed', 'blocked', 'cancelled'],
|
|
2078
|
+
description: 'Target status for phase transition'
|
|
2079
|
+
},
|
|
2080
|
+
reportType: {
|
|
2081
|
+
type: 'string',
|
|
2082
|
+
enum: ['summary', 'detailed', 'gantt', 'milestones', 'risks', 'executive', 'status', 'health', 'team_performance', 'milestone_tracking'],
|
|
2083
|
+
default: 'summary',
|
|
2084
|
+
description: 'Type of progress report or generated report'
|
|
2085
|
+
},
|
|
2086
|
+
timeframe: {
|
|
2087
|
+
type: 'string',
|
|
2088
|
+
enum: ['current', 'weekly', 'monthly', 'quarterly', 'week', 'month', 'quarter', 'project'],
|
|
2089
|
+
default: 'current',
|
|
2090
|
+
description: 'Time frame for reports and tracking'
|
|
2091
|
+
},
|
|
2092
|
+
includeVisuals: {
|
|
2093
|
+
type: 'boolean',
|
|
2094
|
+
default: true,
|
|
2095
|
+
description: 'Include visual progress indicators'
|
|
2096
|
+
},
|
|
2097
|
+
updateTaskProgress: {
|
|
2098
|
+
type: 'boolean',
|
|
2099
|
+
default: true,
|
|
2100
|
+
description: 'Sync progress from TODO system'
|
|
2101
|
+
},
|
|
2102
|
+
memberId: {
|
|
2103
|
+
type: 'string',
|
|
2104
|
+
description: 'Team member ID for resource operations'
|
|
2105
|
+
},
|
|
2106
|
+
memberData: {
|
|
2107
|
+
type: 'object',
|
|
2108
|
+
properties: {
|
|
2109
|
+
name: { type: 'string' },
|
|
2110
|
+
role: { type: 'string' },
|
|
2111
|
+
skills: {
|
|
2112
|
+
type: 'array',
|
|
2113
|
+
items: { type: 'string' }
|
|
2114
|
+
},
|
|
2115
|
+
capacity: { type: 'string' }
|
|
2116
|
+
},
|
|
2117
|
+
description: 'Team member data for resource operations'
|
|
2118
|
+
},
|
|
2119
|
+
allocationData: {
|
|
2120
|
+
type: 'object',
|
|
2121
|
+
properties: {
|
|
2122
|
+
phaseId: { type: 'string' },
|
|
2123
|
+
allocation: {
|
|
2124
|
+
type: 'number',
|
|
2125
|
+
minimum: 0,
|
|
2126
|
+
maximum: 100
|
|
2127
|
+
}
|
|
2128
|
+
},
|
|
2129
|
+
required: ['phaseId', 'allocation'],
|
|
2130
|
+
description: 'Resource allocation data'
|
|
2131
|
+
},
|
|
2132
|
+
analysisType: {
|
|
2133
|
+
type: 'string',
|
|
2134
|
+
enum: ['automated', 'manual', 'comprehensive'],
|
|
2135
|
+
default: 'comprehensive',
|
|
2136
|
+
description: 'Type of risk analysis'
|
|
2137
|
+
},
|
|
2138
|
+
includeAdrRisks: {
|
|
2139
|
+
type: 'boolean',
|
|
2140
|
+
default: true,
|
|
2141
|
+
description: 'Analyze risks from ADR complexity'
|
|
2142
|
+
},
|
|
2143
|
+
includeDependencyRisks: {
|
|
2144
|
+
type: 'boolean',
|
|
2145
|
+
default: true,
|
|
2146
|
+
description: 'Analyze dependency chain risks'
|
|
2147
|
+
},
|
|
2148
|
+
includeResourceRisks: {
|
|
2149
|
+
type: 'boolean',
|
|
2150
|
+
default: true,
|
|
2151
|
+
description: 'Analyze resource allocation risks'
|
|
2152
|
+
},
|
|
2153
|
+
generateMitigation: {
|
|
2154
|
+
type: 'boolean',
|
|
2155
|
+
default: true,
|
|
2156
|
+
description: 'Generate mitigation strategies'
|
|
2157
|
+
},
|
|
2158
|
+
format: {
|
|
2159
|
+
type: 'string',
|
|
2160
|
+
enum: ['markdown', 'json', 'html'],
|
|
2161
|
+
default: 'markdown',
|
|
2162
|
+
description: 'Report output format'
|
|
2163
|
+
},
|
|
2164
|
+
includeCharts: {
|
|
2165
|
+
type: 'boolean',
|
|
2166
|
+
default: true,
|
|
2167
|
+
description: 'Include progress charts and graphs'
|
|
2168
|
+
}
|
|
2169
|
+
},
|
|
2170
|
+
required: ['operation', 'projectPath']
|
|
2171
|
+
}
|
|
2172
|
+
},
|
|
2173
|
+
{
|
|
2174
|
+
name: 'interactive_adr_planning',
|
|
2175
|
+
description: 'Interactive guided ADR planning and creation tool - walks users through structured decision-making process with research integration, option evaluation, and automatic ADR generation',
|
|
2176
|
+
inputSchema: {
|
|
2177
|
+
type: 'object',
|
|
2178
|
+
properties: {
|
|
2179
|
+
operation: {
|
|
2180
|
+
type: 'string',
|
|
2181
|
+
enum: [
|
|
2182
|
+
'start_session',
|
|
2183
|
+
'continue_session',
|
|
2184
|
+
'provide_input',
|
|
2185
|
+
'request_research',
|
|
2186
|
+
'evaluate_options',
|
|
2187
|
+
'make_decision',
|
|
2188
|
+
'assess_impact',
|
|
2189
|
+
'plan_implementation',
|
|
2190
|
+
'generate_adr',
|
|
2191
|
+
'update_todos',
|
|
2192
|
+
'get_guidance',
|
|
2193
|
+
'save_session',
|
|
2194
|
+
'complete_session'
|
|
2195
|
+
],
|
|
2196
|
+
description: 'Interactive planning operation to perform'
|
|
2197
|
+
},
|
|
2198
|
+
sessionId: {
|
|
2199
|
+
type: 'string',
|
|
2200
|
+
description: 'Planning session ID (required for all operations except start_session)'
|
|
2201
|
+
},
|
|
2202
|
+
input: {
|
|
2203
|
+
description: 'User input for the current phase (varies by phase)'
|
|
2204
|
+
},
|
|
2205
|
+
projectPath: {
|
|
2206
|
+
type: 'string',
|
|
2207
|
+
description: 'Project root path'
|
|
2208
|
+
},
|
|
2209
|
+
autoResearch: {
|
|
2210
|
+
type: 'boolean',
|
|
2211
|
+
default: true,
|
|
2212
|
+
description: 'Automatically trigger research when needed'
|
|
2213
|
+
},
|
|
2214
|
+
generateTodos: {
|
|
2215
|
+
type: 'boolean',
|
|
2216
|
+
default: true,
|
|
2217
|
+
description: 'Automatically generate TODO items from decisions'
|
|
2218
|
+
}
|
|
2219
|
+
},
|
|
2220
|
+
required: ['operation', 'projectPath']
|
|
2221
|
+
}
|
|
1964
2222
|
}
|
|
1965
2223
|
]
|
|
1966
2224
|
};
|
|
@@ -2079,6 +2337,12 @@ export class McpAdrAnalysisServer {
|
|
|
2079
2337
|
case 'smart_score':
|
|
2080
2338
|
response = await this.smartScore(args);
|
|
2081
2339
|
break;
|
|
2340
|
+
case 'mcp_planning':
|
|
2341
|
+
response = await this.mcpPlanning(args);
|
|
2342
|
+
break;
|
|
2343
|
+
case 'interactive_adr_planning':
|
|
2344
|
+
response = await this.interactiveAdrPlanning(args);
|
|
2345
|
+
break;
|
|
2082
2346
|
default:
|
|
2083
2347
|
throw new McpAdrError(`Unknown tool: ${name}`, 'UNKNOWN_TOOL');
|
|
2084
2348
|
}
|
|
@@ -5073,6 +5337,24 @@ Please provide:
|
|
|
5073
5337
|
throw new McpAdrError(`Smart score analysis failed: ${error instanceof Error ? error.message : String(error)}`, 'SMART_SCORE_ERROR');
|
|
5074
5338
|
}
|
|
5075
5339
|
}
|
|
5340
|
+
async mcpPlanning(args) {
|
|
5341
|
+
try {
|
|
5342
|
+
const { mcpPlanning } = await import('./tools/mcp-planning-tool.js');
|
|
5343
|
+
return await mcpPlanning(args);
|
|
5344
|
+
}
|
|
5345
|
+
catch (error) {
|
|
5346
|
+
throw new McpAdrError(`MCP planning failed: ${error instanceof Error ? error.message : String(error)}`, 'MCP_PLANNING_ERROR');
|
|
5347
|
+
}
|
|
5348
|
+
}
|
|
5349
|
+
async interactiveAdrPlanning(args) {
|
|
5350
|
+
try {
|
|
5351
|
+
const { interactiveAdrPlanning } = await import('./tools/interactive-adr-planning-tool.js');
|
|
5352
|
+
return await interactiveAdrPlanning(args);
|
|
5353
|
+
}
|
|
5354
|
+
catch (error) {
|
|
5355
|
+
throw new McpAdrError(`Interactive ADR planning failed: ${error instanceof Error ? error.message : String(error)}`, 'INTERACTIVE_ADR_PLANNING_ERROR');
|
|
5356
|
+
}
|
|
5357
|
+
}
|
|
5076
5358
|
}
|
|
5077
5359
|
/**
|
|
5078
5360
|
* Main execution
|