@ppdocs/mcp 2.6.7 → 2.6.8

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.
Files changed (2) hide show
  1. package/dist/cli.js +6 -7
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -242,7 +242,6 @@ function generateHooksConfig() {
242
242
  hooks: {
243
243
  UserPromptSubmit: [
244
244
  {
245
- matcher: '*',
246
245
  hooks: [{ type: 'command', command }]
247
246
  }
248
247
  ]
@@ -266,12 +265,12 @@ function installClaudeTemplates(cwd) {
266
265
  copyDirRecursive(srcHooks, destHooks);
267
266
  console.log(`✅ Installed .claude/hooks/`);
268
267
  }
269
- // 3. 生成跨平台 hooks 配置并合并到 settings.local.json
270
- const settingsLocalPath = path.join(claudeDir, 'settings.local.json');
268
+ // 3. 生成跨平台 hooks 配置并合并到 settings.json (hooks 必须在 settings.json 才能生效)
269
+ const settingsPath = path.join(claudeDir, 'settings.json');
271
270
  let existingSettings = {};
272
- if (fs.existsSync(settingsLocalPath)) {
271
+ if (fs.existsSync(settingsPath)) {
273
272
  try {
274
- existingSettings = JSON.parse(fs.readFileSync(settingsLocalPath, 'utf-8'));
273
+ existingSettings = JSON.parse(fs.readFileSync(settingsPath, 'utf-8'));
275
274
  }
276
275
  catch { /* ignore */ }
277
276
  }
@@ -281,8 +280,8 @@ function installClaudeTemplates(cwd) {
281
280
  ...hooksConfig
282
281
  };
283
282
  fs.mkdirSync(claudeDir, { recursive: true });
284
- fs.writeFileSync(settingsLocalPath, JSON.stringify(mergedSettings, null, 2));
285
- console.log(`✅ Configured .claude/settings.local.json hooks (${process.platform})`);
283
+ fs.writeFileSync(settingsPath, JSON.stringify(mergedSettings, null, 2));
284
+ console.log(`✅ Configured .claude/settings.json hooks (${process.platform})`);
286
285
  }
287
286
  /** 安装 Codex 模板 (生成 AGENTS.md) */
288
287
  function installCodexTemplates(cwd) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ppdocs/mcp",
3
- "version": "2.6.7",
3
+ "version": "2.6.8",
4
4
  "description": "ppdocs MCP Server - Knowledge Graph for Claude",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",