@curdx/flow 2.3.9 → 2.3.10

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.
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Claude Code Discipline Layer — spec-driven workflow + goal-backward verification + Karpathy 4 principles enforced via gates. Stops Claude from faking \"done\" on non-trivial features.",
9
- "version": "2.3.9"
9
+ "version": "2.3.10"
10
10
  },
11
11
  "allowCrossMarketplaceDependenciesOn": [
12
12
  "context7-marketplace"
@@ -16,7 +16,7 @@
16
16
  "name": "curdx-flow",
17
17
  "source": "./",
18
18
  "description": "Claude Code Discipline Layer — spec-driven workflow + goal-backward verification + Karpathy 4 principles enforced via gates. Stops Claude from faking \"done\" on non-trivial features.",
19
- "version": "2.3.9",
19
+ "version": "2.3.10",
20
20
  "author": {
21
21
  "name": "wdx",
22
22
  "email": "bydongxin@gmail.com"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "curdx-flow",
3
- "version": "2.3.9",
3
+ "version": "2.3.10",
4
4
  "description": "Claude Code Discipline Layer — spec-driven workflow + goal-backward verification + Karpathy 4 principles enforced via gates. Stops Claude from faking \"done\" on non-trivial features.",
5
5
  "author": {
6
6
  "name": "wdx",
@@ -2,7 +2,9 @@ import fs from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
4
 
5
+ import { removeMcp } from "./lib/claude-ops.js";
5
6
  import { readProjectClaudeSettings } from "./lib/doctor-claude-settings.js";
7
+ import { CONFIG_FILE, readConfig, writeConfig } from "./lib/config.js";
6
8
  import { inspectRuntimeEnvironment } from "./lib/doctor-runtime-environment.js";
7
9
  import {
8
10
  claudeVersion,
@@ -310,6 +312,7 @@ export async function collectDoctorData(
310
312
  readProjectTeamConfigImpl = readProjectTeamConfig,
311
313
  readProjectClaudeSettingsImpl = readProjectClaudeSettings,
312
314
  readBundledPluginRuntimeDefaultsImpl = readBundledPluginRuntimeDefaults,
315
+ readConfigImpl = readConfig,
313
316
  } = {}
314
317
  ) {
315
318
  const claudeVersionValue = claudeVersionImpl();
@@ -338,6 +341,10 @@ export async function collectDoctorData(
338
341
  projectTeamConfig: await readProjectTeamConfigImpl(cwd),
339
342
  projectClaudeSettings: await readProjectClaudeSettingsImpl(cwd),
340
343
  bundledPluginRuntimeDefaults: await readBundledPluginRuntimeDefaultsImpl(),
344
+ legacyInstallState: {
345
+ configPath: CONFIG_FILE,
346
+ hasLegacyContext7ApiKey: Object.prototype.hasOwnProperty.call(readConfigImpl(), "context7ApiKey"),
347
+ },
341
348
  };
342
349
  }
343
350
 
@@ -345,9 +352,47 @@ export async function applyDoctorFixes(
345
352
  doctorData,
346
353
  {
347
354
  ensureClaudeMemRuntimesImpl = ensureClaudeMemRuntimes,
355
+ removeMcpImpl = removeMcp,
356
+ readConfigImpl = readConfig,
357
+ writeConfigImpl = writeConfig,
348
358
  } = {}
349
359
  ) {
350
360
  const fixes = [];
361
+ const context7PluginOwnsMcp = doctorData.mcps.some(
362
+ (entry) => entry.name === "context7" && entry.plugin === "context7-plugin"
363
+ );
364
+ const hasLegacyUserContext7Mcp =
365
+ doctorData.userMcpConfig instanceof Map && doctorData.userMcpConfig.has("context7");
366
+
367
+ if (context7PluginOwnsMcp && hasLegacyUserContext7Mcp) {
368
+ const result = await removeMcpImpl({ name: "context7" });
369
+ if (result.code === 0) {
370
+ doctorData.userMcpConfig.delete("context7");
371
+ doctorData.mcps = doctorData.mcps.filter(
372
+ (entry) => !(entry.name === "context7" && entry.plugin == null)
373
+ );
374
+ fixes.push({
375
+ kind: "legacy-context7-user-mcp-removed",
376
+ });
377
+ }
378
+ }
379
+
380
+ if (doctorData.legacyInstallState?.hasLegacyContext7ApiKey) {
381
+ const config = readConfigImpl();
382
+ if (Object.prototype.hasOwnProperty.call(config, "context7ApiKey")) {
383
+ delete config.context7ApiKey;
384
+ writeConfigImpl(config);
385
+ doctorData.legacyInstallState = {
386
+ ...doctorData.legacyInstallState,
387
+ hasLegacyContext7ApiKey: false,
388
+ };
389
+ fixes.push({
390
+ kind: "legacy-context7-api-key-removed",
391
+ configPath: CONFIG_FILE,
392
+ });
393
+ }
394
+ }
395
+
351
396
  const claudeMemEnabled = doctorData.plugins.some(
352
397
  (plugin) => plugin.name === "claude-mem" && plugin.status === "enabled"
353
398
  );
package/cli/lib/config.js CHANGED
@@ -3,7 +3,7 @@ import { homedir } from "node:os";
3
3
  import { join } from "node:path";
4
4
 
5
5
  const CONFIG_DIR = join(homedir(), ".claude");
6
- const CONFIG_FILE = join(CONFIG_DIR, "curdx-flow-config.json");
6
+ export const CONFIG_FILE = join(CONFIG_DIR, "curdx-flow-config.json");
7
7
 
8
8
  export function readConfig() {
9
9
  if (!existsSync(CONFIG_FILE)) {
@@ -224,6 +224,7 @@ export function buildDoctorReport({
224
224
  projectTeamConfig,
225
225
  projectClaudeSettings,
226
226
  bundledPluginRuntimeDefaults,
227
+ legacyInstallState,
227
228
  }) {
228
229
  const lines = [];
229
230
  const sections = [];
@@ -402,6 +403,12 @@ export function buildDoctorReport({
402
403
  "migration: claude plugin update curdx-flow@curdx-flow-marketplace",
403
404
  "then restart Claude Code",
404
405
  ]
406
+ : duplicate.pluginEntry.plugin === "context7-plugin" && duplicate.name === "context7"
407
+ ? [
408
+ "official Context7 plugin already owns the context7 MCP server",
409
+ "run: npx @curdx/flow doctor --fix",
410
+ `or run manually: claude mcp remove --scope user ${duplicate.name}`,
411
+ ]
405
412
  : [
406
413
  `remove the duplicate user-level server if plugin:${duplicate.pluginEntry.plugin} should own it`,
407
414
  `run: claude mcp remove --scope user ${duplicate.name}`,
@@ -415,6 +422,20 @@ export function buildDoctorReport({
415
422
  }
416
423
  }
417
424
 
425
+ if (legacyInstallState?.hasLegacyContext7ApiKey) {
426
+ const legacySection = createSection("Legacy installer state:");
427
+ pushSectionLine(
428
+ legacySection,
429
+ "warn",
430
+ "legacy Context7 API key stored in curdx-flow install config",
431
+ [
432
+ `path: ${legacyInstallState.configPath}`,
433
+ "this key belonged to the retired user-level Context7 MCP install flow and is no longer used by the official context7-plugin",
434
+ "run: npx @curdx/flow doctor --fix",
435
+ ]
436
+ );
437
+ }
438
+
418
439
  if (claudeMemEnabled && runtimeStatus) {
419
440
  const runtimeSection = createSection("Runtime (claude-mem dependencies):");
420
441
  for (const [name, status] of Object.entries(runtimeStatus)) {
@@ -124,7 +124,7 @@ export async function maybeRemoveBundledMcps(
124
124
  } = {}
125
125
  ) {
126
126
  logImpl.blank();
127
- logImpl.info("Required MCP servers (context7, sequential-thinking)");
127
+ logImpl.info("Required user-level MCP servers (sequential-thinking)");
128
128
  if (shouldKeepBundledMcpsImpl({ yes, keepRecommended })) {
129
129
  logImpl.info(
130
130
  color.dim("--yes or --keep-recommended: keeping user-level MCPs (remove manually with `claude mcp remove <name>`)")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curdx/flow",
3
- "version": "2.3.9",
3
+ "version": "2.3.10",
4
4
  "description": "Skill-first discipline layer and CLI installer for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {