@yeepay/coderocket-mcp 1.0.1 → 1.1.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,113 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.1.0] - 2025-08-01
9
+
10
+ ### 🚀 Major Changes - Complete Independence
11
+
12
+ This release marks a major milestone: **CodeRocket MCP is now completely independent** and no longer requires `coderocket-cli` as a dependency.
13
+
14
+ ### ✨ Added
15
+
16
+ - **Independent Configuration Management**: New `ConfigManager` class with support for:
17
+ - Environment variables
18
+ - Project-level `.env` files
19
+ - Global `~/.coderocket/env` configuration
20
+ - Priority hierarchy: env vars > project .env > global .env > defaults
21
+
22
+ - **Independent Prompt Management**: New `PromptManager` class with support for:
23
+ - Project-level prompts in `./prompts/` directory
24
+ - Global prompts in `~/.coderocket/prompts/` directory
25
+ - Built-in default prompts
26
+
27
+ - **Direct AI Service Integration**: Native API implementations for:
28
+ - **Gemini**: Using `@google/generative-ai` SDK with `gemini-1.5-flash` model
29
+ - **ClaudeCode**: Using `@anthropic-ai/sdk` for direct API calls
30
+ - **OpenCode**: HTTP-based API integration with axios
31
+
32
+ - **Intelligent AI Manager**: New `AIManager` class with:
33
+ - Smart service selection and failover
34
+ - Automatic retry logic with exponential backoff
35
+ - Service health monitoring
36
+ - Load balancing across available services
37
+
38
+ - **Enhanced Error Handling**: New `ErrorHandler` class with:
39
+ - Contextual error messages
40
+ - User-friendly error suggestions
41
+ - Detailed logging for debugging
42
+
43
+ ### 🔄 Changed
44
+
45
+ - **Startup Method**: Now supports direct execution without parameters
46
+ - Old: `coderocket-mcp start`
47
+ - New: `npx @yeepay/coderocket-mcp` (recommended)
48
+ - Still supports: `coderocket-mcp` (if globally installed)
49
+
50
+ - **Configuration Approach**: Moved from CLI-based to environment variable-based configuration
51
+ - Supports standard MCP configuration patterns
52
+ - Maintains backward compatibility with existing `.env` files
53
+
54
+ - **Model Updates**: Updated Gemini model from deprecated `gemini-pro` to `gemini-1.5-flash`
55
+
56
+ ### 🗑️ Removed
57
+
58
+ - **CodeRocket-CLI Dependency**: Completely removed dependency on `coderocket-cli`
59
+ - **Shell Script Execution**: Replaced shell script calls with direct API implementations
60
+ - **Path Detection Logic**: Removed `findCoderocketCliPath()` and related functions
61
+ - **CLI Command Execution**: Removed `executeShellCommand()` and `callAIServiceManager()`
62
+
63
+ ### 🛠️ Technical Improvements
64
+
65
+ - **Type Safety**: Enhanced TypeScript types and error handling
66
+ - **Performance**: Direct API calls eliminate shell script overhead
67
+ - **Reliability**: Reduced external dependencies and failure points
68
+ - **Maintainability**: Cleaner architecture with separation of concerns
69
+
70
+ ### 📚 Documentation
71
+
72
+ - Updated README.md with independent installation instructions
73
+ - Added comprehensive environment variable documentation
74
+ - Updated troubleshooting guide for independent operation
75
+ - Enhanced feature comparison table
76
+
77
+ ### 🧪 Testing
78
+
79
+ - Updated test suite for independent operation
80
+ - Added configuration management tests
81
+ - Enhanced error scenario testing
82
+ - Improved boundary condition testing
83
+ - All tests now pass with 100% success rate
84
+
85
+ ### 🔧 Migration Guide
86
+
87
+ For users upgrading from previous versions:
88
+
89
+ 1. **No more CLI dependency**: Uninstall `coderocket-cli` if only used for MCP
90
+ 2. **Environment variables**: Move API keys to environment variables or `.env` files
91
+ 3. **New startup command**: Use `npx @yeepay/coderocket-mcp` instead of `coderocket-mcp start`
92
+ 4. **Configuration files**: Existing `.env` files continue to work
93
+
94
+ ### 📦 Dependencies
95
+
96
+ - Added: `@google/generative-ai@^0.21.0`
97
+ - Added: `@anthropic-ai/sdk@^0.27.0`
98
+ - Added: `axios@^1.6.0`
99
+ - Removed: All `coderocket-cli` related dependencies
100
+
101
+ ---
102
+
103
+ ## [1.0.1] - 2024-XX-XX
104
+
105
+ ### Fixed
106
+ - Initial bug fixes and stability improvements
107
+
108
+ ## [1.0.0] - 2024-XX-XX
109
+
110
+ ### Added
111
+ - Initial release with `coderocket-cli` dependency
112
+ - Basic MCP server functionality
113
+ - Code review capabilities
package/README.md CHANGED
@@ -1,21 +1,23 @@
1
1
  # CodeRocket MCP
2
2
 
3
3
  <div align="center">
4
- <img src="docs/assets/banner.png" alt="CodeRocket Banner" />
4
+ <img src="https://raw.githubusercontent.com/im47cn/coderocket-mcp/refs/heads/develop/docs/assets/banner.png" alt="CodeRocket Banner" />
5
5
  </div>
6
6
 
7
7
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
8
8
  [![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org/)
9
9
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)
10
10
 
11
- 一个基于 Model Context Protocol (MCP) 的智能代码审查 MCP,集成了 CodeRocket-CLI 的强大功能,为AI编程工具提供专业的代码审查能力。
11
+ 一个完全独立的基于 Model Context Protocol (MCP) 的智能代码审查服务器,为AI编程工具提供专业的代码审查能力。
12
12
 
13
13
  ## 🚀 核心功能
14
14
 
15
+ - **完全独立运行**:无需依赖任何外部CLI工具,开箱即用
15
16
  - **多维度代码审查**:支持代码片段、Git提交、文件列表的全面审查
16
- - **多AI服务支持**:集成Gemini、OpenCode、ClaudeCode等多种AI服务
17
+ - **多AI服务支持**:原生集成Gemini、ClaudeCode、OpenCodeAI服务
17
18
  - **智能故障转移**:自动切换AI服务,确保审查的可靠性
18
- - **灵活配置管理**:支持项目级和全局级配置
19
+ - **灵活配置管理**:支持环境变量和.env文件配置
20
+ - **专业提示词系统**:内置专业代码审查提示词,支持自定义
19
21
  - **详细错误处理**:提供用户友好的错误信息和解决建议
20
22
  - **完整日志记录**:详细的操作日志,便于调试和监控
21
23
 
@@ -31,17 +33,31 @@
31
33
 
32
34
  ## 🛠 安装
33
35
 
34
- ### 正式安装(推荐)
36
+ ### 快速安装(推荐)
35
37
 
36
38
  #### 前置要求
37
39
 
38
40
  1. **Node.js**: >= 18.0.0
39
- 2. **CodeRocket-CLI**: 需要先安装 [CodeRocket-CLI](https://github.com/im47cn/coderocket-cli)
40
- 3. **AI服务**: 至少配置一个AI服务(Gemini、OpenCode或ClaudeCode)
41
+ 2. **AI服务API密钥**: 至少配置一个AI服务(Gemini、ClaudeCode或OpenCode)
41
42
 
42
- #### 安装过程
43
+ #### 直接使用(无需安装)
43
44
 
44
- 从npm注册表安装:
45
+ 使用 npx 直接运行,无需全局安装:
46
+
47
+ ```bash
48
+ # 直接启动 CodeRocket MCP 服务器
49
+ npx @yeepay/coderocket-mcp
50
+
51
+ # 查看帮助信息
52
+ npx @yeepay/coderocket-mcp help
53
+
54
+ # 查看版本信息
55
+ npx @yeepay/coderocket-mcp version
56
+ ```
57
+
58
+ #### 全局安装(可选)
59
+
60
+ 如果需要全局安装:
45
61
 
46
62
  ```bash
47
63
  # 1. 全局安装CodeRocket MCP
@@ -283,23 +299,30 @@ npm run build
283
299
  **问题 2**: AI服务不可用
284
300
 
285
301
  ```bash
286
- # 检查AI服务状态
287
- gemini --version
288
- opencode --version
289
- claudecode --version
302
+ # 检查API密钥配置
303
+ echo $GEMINI_API_KEY
304
+ echo $CLAUDECODE_API_KEY
305
+ echo $OPENCODE_API_KEY
306
+
307
+ # 检查配置文件
308
+ cat ~/.coderocket/env
309
+ cat .env
290
310
 
291
- # 重新配置AI服务
292
- gemini config
311
+ # 使用get_ai_service_status工具检查服务状态
312
+ npx @yeepay/coderocket-mcp test
293
313
  ```
294
314
 
295
- **问题 3**: CodeRocket-CLI路径错误
315
+ **问题 3**: 配置文件权限问题
296
316
 
297
317
  ```bash
298
- # 设置环境变量指定路径
299
- export CODEROCKET_CLI_PATH=/path/to/coderocket-cli
300
-
301
- # 或在项目中创建符号链接
302
- ln -s /path/to/coderocket-cli ./coderocket-cli
318
+ # 检查配置目录权限
319
+ ls -la ~/.coderocket/
320
+ chmod 700 ~/.coderocket/
321
+ chmod 600 ~/.coderocket/env
322
+
323
+ # 检查项目配置文件
324
+ ls -la .env
325
+ chmod 600 .env
303
326
  ```
304
327
 
305
328
  ### 调试模式
@@ -307,14 +330,16 @@ ln -s /path/to/coderocket-cli ./coderocket-cli
307
330
  启用详细日志:
308
331
 
309
332
  ```bash
310
- NODE_ENV=development npm start
333
+ DEBUG=true NODE_ENV=development npx @yeepay/coderocket-mcp
311
334
  ```
312
335
 
313
- 查看日志文件:
336
+ 查看详细错误信息:
314
337
 
315
338
  ```bash
316
- # 日志文件位置
317
- tail -f /tmp/coderocket-mcp.log
339
+ # 启用调试模式
340
+ export DEBUG=true
341
+ export NODE_ENV=development
342
+ npx @yeepay/coderocket-mcp
318
343
  ```
319
344
 
320
345
  ## 👨‍💻 开发指南
@@ -363,7 +388,7 @@ npm test
363
388
 
364
389
  ## 🤝 贡献
365
390
 
366
- 我们欢迎社区贡献!请参考 [CodeRocket-CLI贡献指南](../coderocket-cli/CONTRIBUTING.md)。
391
+ 我们欢迎社区贡献!请参考 [CodeRocket-CLI贡献指南](https://github.com/im47cn/coderocket-mcp/blob/main/CONTRIBUTING.md)。
367
392
 
368
393
  ### 快速开始
369
394
 
@@ -379,21 +404,24 @@ npm test
379
404
 
380
405
  ## 🔗 相关链接
381
406
 
382
- - [CodeRocket-CLI](../coderocket-cli) - 核心CLI工具
407
+ - [CodeRocket-CLI](https://github.com/im47cn/coderocket-cli) - 命令行版本的代码审查工具
383
408
  - [Model Context Protocol](https://modelcontextprotocol.io/) - MCP官方文档
384
- - [问题反馈](https://github.com/im47cn/coderocket-cli/issues) - 报告问题或建议
409
+ - [问题反馈](https://github.com/im47cn/coderocket-mcp/issues) - 报告问题或建议
410
+ - [NPM包](https://www.npmjs.com/package/@yeepay/coderocket-mcp) - NPM官方页面
385
411
 
386
412
  ## 📊 特性对比
387
413
 
388
414
  | 功能 | CodeRocket-CLI | CodeRocket-MCP |
389
415
  |------|----------------|----------------|
390
- | Git Hooks集成 | ✅ | |
416
+ | 独立运行 | ❌ (需要配置) | ✅ (开箱即用) |
391
417
  | MCP协议支持 | ❌ | ✅ |
392
418
  | 代码片段审查 | ❌ | ✅ |
393
419
  | AI工具集成 | ❌ | ✅ |
394
420
  | 多AI服务支持 | ✅ | ✅ |
421
+ | Git Hooks集成 | ✅ | ❌ |
395
422
  | 自动MR创建 | ✅ | ❌ |
396
423
  | 详细审查报告 | ✅ | ✅ |
424
+ | 环境变量配置 | ✅ | ✅ |
397
425
 
398
426
  ---
399
427
 
@@ -1,108 +1,113 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * CodeRocket MCP 启动脚本
4
+ * CodeRocket MCP 独立启动脚本
5
+ *
6
+ * 符合 MCP 标准,直接启动服务器,无需额外参数
5
7
  */
6
8
 
7
- import { spawn } from 'child_process';
8
9
  import { resolve, dirname } from 'path';
9
10
  import { fileURLToPath } from 'url';
11
+ import { readFileSync } from 'fs';
10
12
 
11
13
  const __filename = fileURLToPath(import.meta.url);
12
14
  const __dirname = dirname(__filename);
13
15
 
14
16
  const command = process.argv[2];
15
17
 
16
- switch (command) {
17
- case 'start':
18
- case undefined:
19
- // 启动MCP服务器
20
- console.error('🚀 启动 CodeRocket MCP 服务器...');
21
- const serverPath = resolve(__dirname, '../dist/index.js');
22
- const server = spawn('node', [serverPath], {
23
- stdio: 'inherit',
24
- env: process.env,
25
- });
26
-
27
- server.on('error', (error) => {
28
- console.error('❌ 服务器启动失败:', error.message);
18
+ // 如果没有命令或命令是 start,直接启动 MCP 服务器
19
+ if (!command || command === 'start') {
20
+ // 直接导入并启动 MCP 服务器(不使用 spawn)
21
+ const serverPath = resolve(__dirname, '../dist/index.js');
22
+
23
+ try {
24
+ // 动态导入服务器模块并启动
25
+ import(serverPath).catch((error) => {
26
+ console.error('❌ CodeRocket MCP 服务器启动失败:', error.message);
29
27
  process.exit(1);
30
28
  });
31
-
32
- server.on('exit', (code) => {
33
- if (code !== 0) {
34
- console.error(`❌ 服务器异常退出,代码: ${code}`);
35
- process.exit(code || 1);
29
+ } catch (error) {
30
+ console.error('❌ 无法加载 CodeRocket MCP 服务器:', error.message);
31
+ process.exit(1);
32
+ }
33
+ } else {
34
+ // 处理其他命令
35
+ switch (command) {
36
+
37
+ case 'test':
38
+ // 运行测试
39
+ console.error('🧪 运行 CodeRocket MCP 测试...');
40
+ const testPath = resolve(__dirname, '../dist/test.js');
41
+
42
+ try {
43
+ import(testPath).catch((error) => {
44
+ console.error('❌ 测试运行失败:', error.message);
45
+ process.exit(1);
46
+ });
47
+ } catch (error) {
48
+ console.error('❌ 无法加载测试模块:', error.message);
49
+ process.exit(1);
36
50
  }
37
- });
38
- break;
39
-
40
- case 'test':
41
- // 运行测试
42
- console.error('🧪 运行 CodeRocket MCP 测试...');
43
- const testPath = resolve(__dirname, '../dist/test.js');
44
- const test = spawn('node', [testPath], {
45
- stdio: 'inherit',
46
- env: process.env,
47
- });
48
-
49
- test.on('error', (error) => {
50
- console.error('❌ 测试运行失败:', error.message);
51
- process.exit(1);
52
- });
53
-
54
- test.on('exit', (code) => {
55
- process.exit(code || 0);
56
- });
57
- break;
51
+ break;
58
52
 
59
- case 'help':
60
- case '--help':
61
- case '-h':
62
- console.log(`
63
- CodeRocket MCP - AI驱动的代码审查服务器
53
+ case 'help':
54
+ case '--help':
55
+ case '-h':
56
+ console.log(`
57
+ CodeRocket MCP - 独立的AI驱动代码审查服务器
64
58
 
65
59
  用法:
66
- coderocket-mcp [命令]
60
+ npx @yeepay/coderocket-mcp [命令]
67
61
 
68
62
  命令:
69
- start, (默认) 启动MCP服务器
70
- test 运行功能测试
71
- help 显示帮助信息
63
+ (默认) 启动MCP服务器
64
+ test 运行功能测试
65
+ help 显示帮助信息
66
+ version 显示版本信息
72
67
 
73
68
  示例:
74
- coderocket-mcp start # 启动服务器
75
- coderocket-mcp test # 运行测试
76
- coderocket-mcp help # 显示帮助
69
+ npx @yeepay/coderocket-mcp # 启动服务器
70
+ npx @yeepay/coderocket-mcp test # 运行测试
71
+ npx @yeepay/coderocket-mcp help # 显示帮助
77
72
 
78
- 环境变量:
79
- AI_SERVICE 默认AI服务 (gemini/opencode/claudecode)
73
+ 环境变量配置:
74
+ AI_SERVICE 默认AI服务 (gemini/claudecode/opencode)
80
75
  AI_AUTO_SWITCH 启用自动切换 (true/false)
81
- AI_TIMEOUT 超时时间(秒)
82
- AI_MAX_RETRIES 最大重试次数
76
+ AI_TIMEOUT 超时时间(秒,默认30)
77
+ AI_MAX_RETRIES 最大重试次数(默认3)
78
+ GEMINI_API_KEY Gemini API密钥
79
+ CLAUDECODE_API_KEY ClaudeCode API密钥
80
+ OPENCODE_API_KEY OpenCode API密钥
83
81
  NODE_ENV 环境模式 (development/production)
82
+ DEBUG 调试模式 (true/false)
84
83
 
85
- 更多信息请访问: https://github.com/im47cn/coderocket-cli
84
+ 配置文件:
85
+ 项目级: .env
86
+ 全局级: ~/.coderocket/env
87
+
88
+ 更多信息请访问: https://github.com/im47cn/coderocket-mcp
86
89
  `);
87
- break;
88
-
89
- case 'version':
90
- case '--version':
91
- case '-v':
92
- // 读取package.json获取版本信息
93
- try {
94
- const packagePath = resolve(__dirname, '../package.json');
95
- const packageJson = JSON.parse(
96
- require('fs').readFileSync(packagePath, 'utf-8')
97
- );
98
- console.log(`CodeRocket MCP v${packageJson.version}`);
99
- } catch (error) {
100
- console.log('CodeRocket MCP v1.0.0');
101
- }
102
- break;
103
-
104
- default:
105
- console.error(`❌ 未知命令: ${command}`);
106
- console.error('使用 "coderocket-mcp help" 查看可用命令');
107
- process.exit(1);
90
+ break;
91
+
92
+ case 'version':
93
+ case '--version':
94
+ case '-v':
95
+ // 读取package.json获取版本信息
96
+ try {
97
+ const packagePath = resolve(__dirname, '../package.json');
98
+ const packageJson = JSON.parse(
99
+ readFileSync(packagePath, 'utf-8')
100
+ );
101
+ console.log(`CodeRocket MCP v${packageJson.version}`);
102
+ console.log(`独立版本 - 无需 coderocket-cli 依赖`);
103
+ } catch (error) {
104
+ console.log('CodeRocket MCP v1.0.1 (独立版本)');
105
+ }
106
+ break;
107
+
108
+ default:
109
+ console.error(`❌ 未知命令: ${command}`);
110
+ console.error('使用 "npx @yeepay/coderocket-mcp help" 查看可用命令');
111
+ process.exit(1);
112
+ }
108
113
  }
@@ -1,33 +1,97 @@
1
- import { ReviewCodeRequest, ReviewCommitRequest, ReviewFilesRequest, ConfigureAIServiceRequest, ReviewResult, ServiceStatusResponse, SuccessResponse } from './types.js';
1
+ import { ReviewCodeRequest, ReviewCommitRequest, ReviewFilesRequest, ConfigureAIServiceRequest, ReviewResult, ServiceStatusResponse, SuccessResponse, AIService } from './types.js';
2
2
  /**
3
- * CodeRocket服务类
3
+ * 独立配置管理类
4
4
  *
5
- * 负责与coderocket-cli集成,提供代码审查和AI服务管理功能
5
+ * 支持多层级配置加载:
6
+ * 1. 环境变量(最高优先级)
7
+ * 2. 项目级 .env 文件
8
+ * 3. 全局 ~/.coderocket/env 文件
9
+ * 4. 默认值(最低优先级)
6
10
  */
7
- export declare class CodeRocketService {
8
- private coderocketCliPath;
9
- constructor();
10
- private ensureInitialized;
11
+ export declare class ConfigManager {
12
+ private static config;
13
+ private static initialized;
14
+ /**
15
+ * 初始化配置系统
16
+ */
17
+ static initialize(): Promise<void>;
18
+ /**
19
+ * 加载默认配置
20
+ */
21
+ private static loadDefaults;
22
+ /**
23
+ * 加载全局配置文件 ~/.coderocket/env
24
+ */
25
+ private static loadGlobalConfig;
26
+ /**
27
+ * 加载项目配置文件 .env
28
+ */
29
+ private static loadProjectConfig;
30
+ /**
31
+ * 加载环境变量(最高优先级)
32
+ */
33
+ private static loadEnvironmentVariables;
34
+ /**
35
+ * 解析 .env 文件内容
36
+ */
37
+ private static parseEnvContent;
38
+ /**
39
+ * 获取配置值
40
+ */
41
+ static get(key: string, defaultValue?: any): any;
42
+ /**
43
+ * 获取API密钥环境变量名
44
+ */
45
+ static getAPIKeyEnvVar(service: AIService): string;
46
+ /**
47
+ * 获取API密钥
48
+ */
49
+ static getAPIKey(service: AIService): string;
50
+ /**
51
+ * 获取AI服务配置
52
+ */
53
+ static getAIService(): AIService;
54
+ /**
55
+ * 获取超时配置
56
+ */
57
+ static getTimeout(): number;
11
58
  /**
12
- * 查找coderocket-cli的安装路径
59
+ * 获取最大重试次数
13
60
  */
14
- private findCoderocketCliPath;
61
+ static getMaxRetries(): number;
15
62
  /**
16
- * 执行shell命令并返回结果
63
+ * 是否启用自动切换
17
64
  */
18
- private executeShellCommand;
65
+ static isAutoSwitchEnabled(): boolean;
19
66
  /**
20
- * 调用AI服务管理器脚本
67
+ * 获取安全的配置信息(隐藏敏感信息)
21
68
  */
22
- private callAIServiceManager;
69
+ private static getSafeConfig;
70
+ /**
71
+ * 获取配置文件路径(保持向后兼容)
72
+ */
73
+ static getConfigPath(scope: string): {
74
+ dir: string;
75
+ file: string;
76
+ };
77
+ }
78
+ /**
79
+ * 独立 CodeRocket 服务类
80
+ *
81
+ * 提供完全独立的代码审查和AI服务管理功能,不依赖 coderocket-cli
82
+ */
83
+ export declare class CodeRocketService {
84
+ private aiManager;
85
+ private initialized;
86
+ constructor();
23
87
  /**
24
- * 创建临时提示词文件
88
+ * 初始化服务
25
89
  */
26
- private createTempPromptFile;
90
+ private ensureInitialized;
27
91
  /**
28
- * 获取内置的默认提示词
92
+ * 执行AI审查的通用方法
29
93
  */
30
- private getDefaultPrompt;
94
+ private executeAIReview;
31
95
  /**
32
96
  * 解析审查结果
33
97
  */
@@ -53,36 +117,20 @@ export declare class CodeRocketService {
53
117
  */
54
118
  configureAIService(request: ConfigureAIServiceRequest): Promise<SuccessResponse>;
55
119
  /**
56
- * 获取API密钥环境变量名
120
+ * 保存配置项到文件
57
121
  */
58
- private getAPIKeyEnvVar;
122
+ private saveConfigToFile;
59
123
  /**
60
124
  * 保存API密钥到配置文件
125
+ *
126
+ * ⚠️ 安全警告:API密钥将以明文形式存储在配置文件中。
127
+ * 请确保配置文件的访问权限受到适当限制。
128
+ * 建议使用环境变量或更安全的密钥管理方案。
61
129
  */
62
130
  private saveAPIKeyToConfig;
63
131
  /**
64
132
  * 获取AI服务状态
65
133
  */
66
134
  getAIServiceStatus(): Promise<ServiceStatusResponse>;
67
- /**
68
- * 检查单个服务状态
69
- */
70
- private checkServiceStatus;
71
- /**
72
- * 检查服务是否可用
73
- */
74
- private isServiceAvailable;
75
- /**
76
- * 检查服务是否已配置
77
- */
78
- private isServiceConfigured;
79
- /**
80
- * 获取安装命令
81
- */
82
- private getInstallCommand;
83
- /**
84
- * 获取配置命令
85
- */
86
- private getConfigCommand;
87
135
  }
88
136
  //# sourceMappingURL=coderocket.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"coderocket.d.ts","sourceRoot":"","sources":["../src/coderocket.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,EACzB,YAAY,EACZ,qBAAqB,EACrB,eAAe,EAGhB,MAAM,YAAY,CAAC;AAKpB;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,iBAAiB,CAAc;;YAMzB,iBAAiB;IAS/B;;OAEG;YACW,qBAAqB;IA4BnC;;OAEG;YACW,mBAAmB;IAgCjC;;OAEG;YACW,oBAAoB;IAoBlC;;OAEG;YACW,oBAAoB;IA2BlC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA8BxB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA2CzB;;OAEG;IACG,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC;IA8DnE;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAsBxB;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IAoCvE;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAA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