claude-autopm 1.13.3 ā 1.13.5
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.
|
@@ -3,11 +3,26 @@ name: context7-docs
|
|
|
3
3
|
command: npx
|
|
4
4
|
args: ["@context7/mcp-server"]
|
|
5
5
|
env:
|
|
6
|
-
CONTEXT7_API_KEY:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
CONTEXT7_API_KEY:
|
|
7
|
+
default: ""
|
|
8
|
+
description: "Your Context7 API key"
|
|
9
|
+
required: true
|
|
10
|
+
CONTEXT7_MCP_URL:
|
|
11
|
+
default: "https://mcp.context7.com/mcp"
|
|
12
|
+
description: "MCP endpoint URL"
|
|
13
|
+
required: false
|
|
14
|
+
CONTEXT7_API_URL:
|
|
15
|
+
default: "https://context7.com/api/v1"
|
|
16
|
+
description: "API endpoint URL"
|
|
17
|
+
required: false
|
|
18
|
+
CONTEXT7_WORKSPACE:
|
|
19
|
+
default: "default"
|
|
20
|
+
description: "Your workspace identifier (uses default workspace if not set)"
|
|
21
|
+
required: false
|
|
22
|
+
CONTEXT7_MODE:
|
|
23
|
+
default: "documentation"
|
|
24
|
+
description: "Server mode"
|
|
25
|
+
required: false
|
|
11
26
|
envFile: .claude/.env
|
|
12
27
|
description: Context7 documentation server for accessing technical documentation
|
|
13
28
|
category: documentation
|
|
@@ -94,12 +94,8 @@ class PrdCreator {
|
|
|
94
94
|
console.log('\nā
PRD created successfully!');
|
|
95
95
|
console.log(`š File: ${prdFile}`);
|
|
96
96
|
|
|
97
|
-
// Show next steps
|
|
98
|
-
|
|
99
|
-
console.log(` 1. Review PRD file: .claude/prds/${prdName}.md`);
|
|
100
|
-
console.log(` 2. Convert to epic: /pm:prd-parse ${prdName}`);
|
|
101
|
-
console.log(` 3. Check status: /pm:prd-status ${prdName}`);
|
|
102
|
-
console.log(` 4. List all PRDs: /pm:prd-list`);
|
|
97
|
+
// Show comprehensive next steps
|
|
98
|
+
this.showNextSteps(prdName);
|
|
103
99
|
|
|
104
100
|
} finally {
|
|
105
101
|
rl.close();
|
|
@@ -108,6 +104,46 @@ class PrdCreator {
|
|
|
108
104
|
return true;
|
|
109
105
|
}
|
|
110
106
|
|
|
107
|
+
showNextSteps(prdName) {
|
|
108
|
+
console.log('\n' + 'ā'.repeat(60));
|
|
109
|
+
console.log('š What You Can Do Next:');
|
|
110
|
+
console.log('ā'.repeat(60) + '\n');
|
|
111
|
+
|
|
112
|
+
console.log('šÆ Option 1: Quick Start (Recommended for Simple Features)');
|
|
113
|
+
console.log(' One command to parse, decompose, and sync to GitHub:');
|
|
114
|
+
console.log(` /pm:epic-oneshot ${prdName}`);
|
|
115
|
+
console.log(' ⨠This creates epic + tasks + GitHub issues automatically\n');
|
|
116
|
+
|
|
117
|
+
console.log('š Option 2: Split into Multiple Epics (For Complex Features)');
|
|
118
|
+
console.log(' Break down large PRD into focused sub-epics:');
|
|
119
|
+
console.log(` /pm:prd-split ${prdName}`);
|
|
120
|
+
console.log(' Example: payment-system ā backend, frontend, security');
|
|
121
|
+
console.log(' š See README section "Splitting Large PRDs into Multiple Epics"\n');
|
|
122
|
+
|
|
123
|
+
console.log('š ļø Option 3: Step-by-Step Workflow (Full Control)');
|
|
124
|
+
console.log(' a) Convert PRD to epic:');
|
|
125
|
+
console.log(` /pm:prd-parse ${prdName}`);
|
|
126
|
+
console.log(' b) Break epic into tasks:');
|
|
127
|
+
console.log(` /pm:epic-decompose ${prdName}`);
|
|
128
|
+
console.log(' c) Push to GitHub/Azure:');
|
|
129
|
+
console.log(` /pm:epic-sync ${prdName}\n`);
|
|
130
|
+
|
|
131
|
+
console.log('š Option 4: Review & Edit First');
|
|
132
|
+
console.log(' Review and refine the PRD before processing:');
|
|
133
|
+
console.log(` nano .claude/prds/${prdName}.md`);
|
|
134
|
+
console.log(' Then use any option above\n');
|
|
135
|
+
|
|
136
|
+
console.log('š Option 5: Check Status');
|
|
137
|
+
console.log(' View PRD and track progress:');
|
|
138
|
+
console.log(` /pm:prd-status ${prdName}\n`);
|
|
139
|
+
|
|
140
|
+
console.log(`š” Don't know which to choose?`);
|
|
141
|
+
console.log(' ⢠Small feature (< 10 tasks)? ā Use Option 1 (/pm:epic-oneshot)');
|
|
142
|
+
console.log(' ⢠Large feature (15+ tasks)? ā Use Option 2 (/pm:prd-split)');
|
|
143
|
+
console.log(' ⢠Need full control? ā Use Option 3 (step-by-step)');
|
|
144
|
+
console.log('');
|
|
145
|
+
}
|
|
146
|
+
|
|
111
147
|
generatePrdContent(name, data) {
|
|
112
148
|
const timestamp = new Date().toISOString();
|
|
113
149
|
const author = process.env.USER || 'unknown';
|
package/package.json
CHANGED
package/scripts/mcp-handler.js
CHANGED
|
@@ -228,35 +228,39 @@ class MCPHandler {
|
|
|
228
228
|
const config = this.loadConfig();
|
|
229
229
|
const activeServers = config.mcp?.activeServers || [];
|
|
230
230
|
|
|
231
|
-
// Ensure .claude directory exists
|
|
231
|
+
// Ensure .claude directory exists
|
|
232
232
|
this.ensureClaudeDir();
|
|
233
233
|
|
|
234
|
+
// Read existing mcp-servers.json to preserve all servers
|
|
235
|
+
let existingMcpConfig = { mcpServers: {}, contextPools: {}, documentationSources: {} };
|
|
236
|
+
if (fs.existsSync(this.mcpServersPath)) {
|
|
237
|
+
try {
|
|
238
|
+
const content = fs.readFileSync(this.mcpServersPath, 'utf8');
|
|
239
|
+
existingMcpConfig = JSON.parse(content);
|
|
240
|
+
} catch (error) {
|
|
241
|
+
console.log('ā ļø Could not read existing mcp-servers.json, creating new');
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
234
245
|
if (activeServers.length === 0) {
|
|
235
|
-
console.log('ā¹ļø No active servers
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
mcpServers: {},
|
|
239
|
-
contextPools: config.mcp?.contextPools || {},
|
|
240
|
-
documentationSources: config.mcp?.documentationSources || {}
|
|
241
|
-
};
|
|
242
|
-
fs.writeFileSync(
|
|
243
|
-
this.mcpServersPath,
|
|
244
|
-
JSON.stringify(emptyConfig, null, 2)
|
|
245
|
-
);
|
|
246
|
+
console.log('ā¹ļø No active servers in config.json');
|
|
247
|
+
console.log('š” Preserving existing servers in mcp-servers.json');
|
|
248
|
+
console.log(`š Existing servers: ${Object.keys(existingMcpConfig.mcpServers).length}`);
|
|
246
249
|
return;
|
|
247
250
|
}
|
|
248
251
|
|
|
252
|
+
// Start with existing configuration
|
|
249
253
|
const mcpConfig = {
|
|
250
|
-
mcpServers: {},
|
|
251
|
-
contextPools:
|
|
252
|
-
documentationSources:
|
|
254
|
+
mcpServers: existingMcpConfig.mcpServers || {},
|
|
255
|
+
contextPools: existingMcpConfig.contextPools || {},
|
|
256
|
+
documentationSources: existingMcpConfig.documentationSources || {}
|
|
253
257
|
};
|
|
254
258
|
|
|
255
|
-
//
|
|
259
|
+
// Update active servers from registry
|
|
256
260
|
activeServers.forEach(serverName => {
|
|
257
261
|
const server = this.getServer(serverName);
|
|
258
262
|
if (!server) {
|
|
259
|
-
console.log(` ā ļø Server '${serverName}' not found, skipping`);
|
|
263
|
+
console.log(` ā ļø Server '${serverName}' not found in registry, skipping`);
|
|
260
264
|
return;
|
|
261
265
|
}
|
|
262
266
|
|
|
@@ -278,6 +282,7 @@ class MCPHandler {
|
|
|
278
282
|
|
|
279
283
|
console.log(`\nā
Configuration synced to ${this.mcpServersPath}`);
|
|
280
284
|
console.log(`š Active servers: ${activeServers.length}`);
|
|
285
|
+
console.log(`š¦ Total servers in file: ${Object.keys(mcpConfig.mcpServers).length}`);
|
|
281
286
|
}
|
|
282
287
|
|
|
283
288
|
/**
|
|
@@ -1098,13 +1103,74 @@ This server can be integrated with various agents and context pools.
|
|
|
1098
1103
|
console.log();
|
|
1099
1104
|
}
|
|
1100
1105
|
|
|
1101
|
-
// Show missing env vars details
|
|
1106
|
+
// Show missing env vars details with help
|
|
1102
1107
|
if (checkResult.missingEnvVars.length > 0) {
|
|
1103
|
-
console.log('š
|
|
1108
|
+
console.log('š Environment Variables Status:\n');
|
|
1104
1109
|
const byServer = Object.groupBy(checkResult.missingEnvVars, ({ server }) => server);
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1110
|
+
|
|
1111
|
+
Object.entries(byServer).forEach(([serverName, entries]) => {
|
|
1112
|
+
const server = this.getServer(serverName);
|
|
1113
|
+
console.log(` š¦ ${serverName}:`);
|
|
1114
|
+
|
|
1115
|
+
// Categorize as required or optional
|
|
1116
|
+
const required = [];
|
|
1117
|
+
const optional = [];
|
|
1118
|
+
|
|
1119
|
+
entries.forEach(({ variable }) => {
|
|
1120
|
+
const envDef = server?.metadata?.env?.[variable];
|
|
1121
|
+
if (this._hasNonEmptyDefault(envDef)) {
|
|
1122
|
+
optional.push({ name: variable, default: envDef.default, desc: envDef.description });
|
|
1123
|
+
} else {
|
|
1124
|
+
required.push({ name: variable, desc: envDef?.description || 'No description' });
|
|
1125
|
+
}
|
|
1126
|
+
});
|
|
1127
|
+
|
|
1128
|
+
if (required.length > 0) {
|
|
1129
|
+
console.log(' ā REQUIRED (must be set):');
|
|
1130
|
+
required.forEach(v => {
|
|
1131
|
+
console.log(` ⢠${v.name}`);
|
|
1132
|
+
if (v.desc) console.log(` ${v.desc}`);
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
if (optional.length > 0) {
|
|
1137
|
+
console.log(' ā ļø OPTIONAL (have defaults):');
|
|
1138
|
+
optional.forEach(v => {
|
|
1139
|
+
console.log(` ⢠${v.name} = ${v.default}`);
|
|
1140
|
+
if (v.desc) console.log(` ${v.desc}`);
|
|
1141
|
+
});
|
|
1142
|
+
}
|
|
1143
|
+
console.log();
|
|
1144
|
+
});
|
|
1145
|
+
|
|
1146
|
+
// Show configuration instructions
|
|
1147
|
+
console.log('š How to Configure:\n');
|
|
1148
|
+
console.log(' 1. Edit file: .claude/.env\n');
|
|
1149
|
+
console.log(' 2. Add required variables:\n');
|
|
1150
|
+
|
|
1151
|
+
Object.entries(byServer).forEach(([serverName, entries]) => {
|
|
1152
|
+
const server = this.getServer(serverName);
|
|
1153
|
+
console.log(` # ${serverName}`);
|
|
1154
|
+
entries.forEach(({ variable }) => {
|
|
1155
|
+
const envDef = server?.metadata?.env?.[variable];
|
|
1156
|
+
if (this._hasNonEmptyDefault(envDef)) {
|
|
1157
|
+
console.log(` # ${variable}=${envDef.default} (optional)`);
|
|
1158
|
+
} else {
|
|
1159
|
+
const example = this._getEnvVarExample(serverName, variable);
|
|
1160
|
+
console.log(` ${variable}=${example}`);
|
|
1161
|
+
}
|
|
1162
|
+
});
|
|
1163
|
+
console.log();
|
|
1164
|
+
});
|
|
1165
|
+
|
|
1166
|
+
// Show where to get credentials
|
|
1167
|
+
console.log('š Where to Get API Keys:\n');
|
|
1168
|
+
Object.keys(byServer).forEach(serverName => {
|
|
1169
|
+
const info = this._getCredentialInfo(serverName);
|
|
1170
|
+
if (info) {
|
|
1171
|
+
console.log(` ${serverName}:`);
|
|
1172
|
+
console.log(` ${info}`);
|
|
1173
|
+
}
|
|
1108
1174
|
});
|
|
1109
1175
|
console.log();
|
|
1110
1176
|
}
|
|
@@ -1116,19 +1182,73 @@ This server can be integrated with various agents and context pools.
|
|
|
1116
1182
|
console.log();
|
|
1117
1183
|
}
|
|
1118
1184
|
|
|
1119
|
-
|
|
1185
|
+
// Step-by-step fix
|
|
1186
|
+
console.log('š ļø Step-by-Step Fix:\n');
|
|
1187
|
+
let step = 1;
|
|
1188
|
+
|
|
1120
1189
|
if (Array.isArray(checkResult.disabledServers) && checkResult.disabledServers.length > 0) {
|
|
1190
|
+
console.log(` ${step}. Enable MCP server(s):`);
|
|
1121
1191
|
checkResult.disabledServers.forEach(server => {
|
|
1122
|
-
console.log(`
|
|
1192
|
+
console.log(` autopm mcp enable ${server.name}`);
|
|
1123
1193
|
});
|
|
1194
|
+
step++;
|
|
1124
1195
|
}
|
|
1196
|
+
|
|
1125
1197
|
if (checkResult.missingEnvVars.length > 0) {
|
|
1126
|
-
console.log(`
|
|
1198
|
+
console.log(` ${step}. Edit .claude/.env and add required variables`);
|
|
1199
|
+
console.log(` nano .claude/.env # or use your editor`);
|
|
1200
|
+
step++;
|
|
1127
1201
|
}
|
|
1128
|
-
|
|
1202
|
+
|
|
1203
|
+
console.log(` ${step}. Sync MCP configuration:`);
|
|
1204
|
+
console.log(` autopm mcp sync`);
|
|
1205
|
+
step++;
|
|
1206
|
+
|
|
1207
|
+
console.log(` ${step}. Verify everything works:`);
|
|
1208
|
+
console.log(' autopm mcp check');
|
|
1129
1209
|
console.log();
|
|
1130
1210
|
}
|
|
1131
1211
|
|
|
1212
|
+
/**
|
|
1213
|
+
* Get example value for environment variable
|
|
1214
|
+
* @private
|
|
1215
|
+
*/
|
|
1216
|
+
_getEnvVarExample(serverName, varName) {
|
|
1217
|
+
const examples = {
|
|
1218
|
+
'CONTEXT7_API_KEY': 'ctx7_1234567890abcdef',
|
|
1219
|
+
'CONTEXT7_WORKSPACE': 'my-workspace-id',
|
|
1220
|
+
'GITHUB_TOKEN': 'ghp_xxxxxxxxxxxxxxxxxxxx',
|
|
1221
|
+
'AZURE_DEVOPS_PAT': 'your-pat-token-here'
|
|
1222
|
+
};
|
|
1223
|
+
return examples[varName] || 'your-value-here';
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* Get information about where to obtain credentials
|
|
1228
|
+
* @private
|
|
1229
|
+
*/
|
|
1230
|
+
_getCredentialInfo(serverName) {
|
|
1231
|
+
const info = {
|
|
1232
|
+
'context7-docs': 'ā Sign up at https://context7.com and get API key from dashboard',
|
|
1233
|
+
'context7-codebase': 'ā Same credentials as context7-docs',
|
|
1234
|
+
'github-mcp': 'ā Generate token at https://github.com/settings/tokens',
|
|
1235
|
+
'playwright-mcp': 'ā No credentials needed - uses local Playwright installation'
|
|
1236
|
+
};
|
|
1237
|
+
return info[serverName] || 'ā Check server documentation: autopm mcp info ' + serverName;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* Check if environment variable definition has a non-empty default value
|
|
1242
|
+
* @private
|
|
1243
|
+
* @param {Object} envDef - Environment variable definition
|
|
1244
|
+
* @returns {boolean} True if has non-empty default
|
|
1245
|
+
*/
|
|
1246
|
+
_hasNonEmptyDefault(envDef) {
|
|
1247
|
+
if (!envDef?.default) return false;
|
|
1248
|
+
const defaultValue = String(envDef.default).trim();
|
|
1249
|
+
return defaultValue !== '';
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1132
1252
|
/**
|
|
1133
1253
|
* Run comprehensive MCP diagnostics
|
|
1134
1254
|
* @returns {Object} Diagnostic results
|