@devflow-tools/adapters 0.8.9 → 0.8.11
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/README.md +26 -17
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @devflow-tools/adapters
|
|
2
2
|
|
|
3
|
-
IDE Agent
|
|
3
|
+
DevFlow IDE Agent 适配器 — 自动配置 MCP 连接,支持 Claude Code、Cursor、Codex、Cline 和 RooCode。
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -10,32 +10,41 @@ npm install @devflow-tools/adapters
|
|
|
10
10
|
|
|
11
11
|
## Supported Agents
|
|
12
12
|
|
|
13
|
-
| Adapter | Agent |
|
|
14
|
-
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
13
|
+
| Adapter | Agent | 导出 |
|
|
14
|
+
|---------|-------|------|
|
|
15
|
+
| Claude Code | Anthropic Claude Code | `claudeAdapter` |
|
|
16
|
+
| Cursor | Cursor IDE | `cursorAdapter` |
|
|
17
|
+
| Codex | OpenAI Codex CLI | `codexAdapter` |
|
|
18
|
+
| Cline | Cline (VS Code) | `clineAdapter` |
|
|
19
|
+
| RooCode | RooCode | `rooCodeAdapter` |
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
23
|
```typescript
|
|
24
|
-
import { getAdapter,
|
|
24
|
+
import { getAdapter, connect, detectAll } from '@devflow-tools/adapters';
|
|
25
25
|
|
|
26
|
-
//
|
|
27
|
-
const
|
|
28
|
-
|
|
26
|
+
// 检测所有可用 agent
|
|
27
|
+
const agents = await detectAll();
|
|
28
|
+
console.log(agents); // ['claude', 'cursor']
|
|
29
29
|
|
|
30
|
-
//
|
|
31
|
-
await
|
|
30
|
+
// 连接指定 agent
|
|
31
|
+
await connect('claude', {
|
|
32
|
+
projectRoot: '/path/to/project',
|
|
33
|
+
serverCommand: 'npx @devflow-tools/mcp-server',
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// 连接所有检测到的 agent
|
|
37
|
+
await connectAll('/path/to/project');
|
|
32
38
|
```
|
|
33
39
|
|
|
34
40
|
## API
|
|
35
41
|
|
|
36
|
-
- `getAdapter(name
|
|
37
|
-
- `
|
|
38
|
-
- `
|
|
42
|
+
- `getAdapter(name)` — 按名称获取适配器实例
|
|
43
|
+
- `detectAll()` — 检测系统上所有可用 agent
|
|
44
|
+
- `connect(agentName, options)` — 配置单个 agent 的 MCP 连接
|
|
45
|
+
- `connectAll(projectRoot)` — 配置所有检测到的 agent
|
|
46
|
+
- `listAdapters()` — 列出所有支持的 agent 名称
|
|
47
|
+
- `claudeAdapter` / `cursorAdapter` / `codexAdapter` / `clineAdapter` / `rooCodeAdapter` — 直接导出
|
|
39
48
|
|
|
40
49
|
## License
|
|
41
50
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devflow-tools/adapters",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"clean": "rm -rf dist"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@devflow-tools/sdk": "^0.8.
|
|
20
|
+
"@devflow-tools/sdk": "^0.8.11"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"typescript": "^5.5.0",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "a0a0b61377aa88ebbd380f50a5d532f63175ef45"
|
|
30
30
|
}
|