@ppdocs/mcp 3.2.16 → 3.2.17

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/cli.d.ts CHANGED
@@ -2,6 +2,6 @@
2
2
  * ppdocs MCP CLI
3
3
  * 命令: init - 初始化项目配置 + 安装工作流模板 + 自动注册 MCP
4
4
  */
5
- export declare function runCli(args: string[]): Promise<'exit' | 'keep-alive' | false>;
5
+ export declare function runCli(args: string[]): Promise<boolean>;
6
6
  /** 安装项目模板文件 (供授权后自动配置调用) */
7
7
  export declare function setupProjectFiles(cwd: string, apiUrl: string): void;
package/dist/cli.js CHANGED
@@ -90,7 +90,6 @@ ppdocs MCP CLI
90
90
 
91
91
  Commands:
92
92
  init Initialize ppdocs config + install workflow templates
93
- webui Start PPDocs Web UI (MCP management + File Sync)
94
93
 
95
94
  Usage:
96
95
  npx @ppdocs/mcp init -p <projectId> -k <key> [options]
@@ -122,16 +121,11 @@ export async function runCli(args) {
122
121
  process.exit(1);
123
122
  }
124
123
  await initProject(opts);
125
- return 'exit';
126
- }
127
- if (cmd === 'webui') {
128
- // 动态导入 WebUI 入口 (Web UI + 多项目管理) — 长驻进程,不退出
129
- await import('./agent.js');
130
- return 'keep-alive';
124
+ return true;
131
125
  }
132
126
  if (cmd === '--help' || cmd === '-h' || cmd === 'help') {
133
127
  showHelp();
134
- return 'exit';
128
+ return true;
135
129
  }
136
130
  return false; // Not a CLI command, run as MCP server
137
131
  }
package/dist/config.js CHANGED
@@ -38,7 +38,7 @@ export async function loadConfig() {
38
38
  const envConfig = readEnvConfig();
39
39
  if (envConfig)
40
40
  return envConfig;
41
- // 2. .ppdocs 文件 (由 Agent WebUI 绑定时自动生成)
41
+ // 2. .ppdocs 文件 (由 init 命令生成)
42
42
  const fileConfig = readPpdocsFile();
43
43
  if (fileConfig)
44
44
  return fileConfig;
package/dist/index.js CHANGED
@@ -22,17 +22,9 @@ const VERSION = pkg.version;
22
22
  // 检查是否为 CLI 命令
23
23
  const args = process.argv.slice(2);
24
24
  if (args.length > 0) {
25
- const result = await runCli(args);
26
- if (result === 'exit')
25
+ const handled = await runCli(args);
26
+ if (handled)
27
27
  process.exit(0);
28
- if (result === 'keep-alive') {
29
- // webui 长驻模式,不继续执行 MCP Server
30
- // 用 setInterval 保活,避免 Node.js 'unsettled top-level await' 警告
31
- setInterval(() => { }, 1 << 30);
32
- // @ts-ignore: 防止后续 main() 执行
33
- await new Promise(() => { });
34
- }
35
- // result === false → 继续作为 MCP Server
36
28
  }
37
29
  // 运行 MCP 服务
38
30
  async function main() {
package/package.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "name": "@ppdocs/mcp",
3
- "version": "3.2.16",
3
+ "version": "3.2.17",
4
4
  "description": "ppdocs MCP Server - Knowledge Graph for Claude",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
8
8
  "ppdocs": "dist/index.js",
9
9
  "mcp": "dist/index.js",
10
- "ppdocs-mcp": "dist/index.js",
11
- "ppdocs-agent": "dist/agent.js"
10
+ "ppdocs-mcp": "dist/index.js"
12
11
  },
13
12
  "scripts": {
14
13
  "prebuild": "node scripts/copy-templates.js",