@comate/zulu 0.2.1-beta.2 → 0.3.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/README.md +64 -13
- package/comate-engine/bin/comate.js +9 -0
- package/comate-engine/node_modules/@comate/plugin-engine/dist/index.js +8 -8
- package/comate-engine/node_modules/@comate/plugin-host/dist/index.js +1 -1
- package/comate-engine/node_modules/@comate/plugin-host/dist/main.js +1 -1
- package/comate-engine/node_modules/@comate/plugin-host/dist/user-DQgjkMe9.js +44 -0
- package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.d.ts +24 -6
- package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.js +8 -8
- package/comate-engine/node_modules/@comate/preview-proxy/dist/index.js +59 -72
- package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.css +1 -1
- package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.js +1 -1
- package/comate-engine/node_modules/better-sqlite3/node_modules/.bin/prebuild-install +2 -2
- package/comate-engine/plugins/demo-feature/dist/index.js +337 -30
- package/comate-engine/server.js +11 -11
- package/dist/bundle/index.js +8 -8
- package/package.json +1 -1
- package/comate-engine/node_modules/@comate/plugin-host/dist/user-Buhpnssj.js +0 -44
- package/comate-engine/plugins/aiscan/assets/icon.svg +0 -12
- package/comate-engine/plugins/aiscan/dist/index.js +0 -53861
- package/comate-engine/plugins/aiscan/package.json +0 -67
- package/comate-engine/plugins/appdev/assets/icon.png +0 -0
- package/comate-engine/plugins/appdev/dist/help.md +0 -12
- package/comate-engine/plugins/appdev/dist/index.d.ts +0 -2
- package/comate-engine/plugins/appdev/dist/index.js +0 -194
- package/comate-engine/plugins/appdev/dist/providers/err.d.ts +0 -8
- package/comate-engine/plugins/appdev/dist/providers/err.js +0 -37
- package/comate-engine/plugins/appdev/dist/providers/fallback.d.ts +0 -5
- package/comate-engine/plugins/appdev/dist/providers/fallback.js +0 -28
- package/comate-engine/plugins/appdev/dist/providers/help.d.ts +0 -8
- package/comate-engine/plugins/appdev/dist/providers/help.js +0 -19
- package/comate-engine/plugins/appdev/dist/providers/medusa.d.ts +0 -8
- package/comate-engine/plugins/appdev/dist/providers/medusa.js +0 -39
- package/comate-engine/plugins/appdev/dist/providers/qa.d.ts +0 -8
- package/comate-engine/plugins/appdev/dist/providers/qa.js +0 -33
- package/comate-engine/plugins/appdev/package.json +0 -67
- package/comate-engine/plugins/bfc/assets/bfc-icon.png +0 -0
- package/comate-engine/plugins/bfc/dist/config/config.d.ts +0 -4
- package/comate-engine/plugins/bfc/dist/config/config.js +0 -4
- package/comate-engine/plugins/bfc/dist/help.md +0 -11
- package/comate-engine/plugins/bfc/dist/index.d.ts +0 -2
- package/comate-engine/plugins/bfc/dist/index.js +0 -452
- package/comate-engine/plugins/bfc/dist/providers/bfcInstructMode.d.ts +0 -8
- package/comate-engine/plugins/bfc/dist/providers/bfcInstructMode.js +0 -77
- package/comate-engine/plugins/bfc/dist/providers/genAbnormalCode.d.ts +0 -8
- package/comate-engine/plugins/bfc/dist/providers/genAbnormalCode.js +0 -71
- package/comate-engine/plugins/bfc/dist/providers/genBfcCode.d.ts +0 -8
- package/comate-engine/plugins/bfc/dist/providers/genBfcCode.js +0 -74
- package/comate-engine/plugins/bfc/dist/providers/getBatchCases.d.ts +0 -10
- package/comate-engine/plugins/bfc/dist/providers/getBatchCases.js +0 -71
- package/comate-engine/plugins/bfc/dist/providers/help.d.ts +0 -8
- package/comate-engine/plugins/bfc/dist/providers/help.js +0 -19
- package/comate-engine/plugins/bfc/dist/service/generateService.d.ts +0 -14
- package/comate-engine/plugins/bfc/dist/service/generateService.js +0 -27
- package/comate-engine/plugins/bfc/package.json +0 -85
- package/comate-engine/plugins/bpm/assets/bpm.png +0 -0
- package/comate-engine/plugins/bpm/dist/index.js +0 -313
- package/comate-engine/plugins/bpm/package.json +0 -65
- package/comate-engine/plugins/casebuilder/assets/icon.svg +0 -1
- package/comate-engine/plugins/casebuilder/dist/help.md +0 -33
- package/comate-engine/plugins/casebuilder/dist/index.js +0 -837
- package/comate-engine/plugins/casebuilder/package.json +0 -80
- package/comate-engine/plugins/centrino/assets/icon.png +0 -0
- package/comate-engine/plugins/centrino/dist/help.md +0 -30
- package/comate-engine/plugins/centrino/dist/index.js +0 -1046
- package/comate-engine/plugins/centrino/package.json +0 -68
- package/comate-engine/plugins/cnap/assets/cnap.png +0 -0
- package/comate-engine/plugins/cnap/dist/help.md +0 -11
- package/comate-engine/plugins/cnap/dist/index.js +0 -171
- package/comate-engine/plugins/cnap/package.json +0 -65
- package/comate-engine/plugins/demo-timer/assets/icon.svg +0 -2
- package/comate-engine/plugins/demo-timer/dist/index.js +0 -463
- package/comate-engine/plugins/demo-timer/package.json +0 -73
- package/comate-engine/plugins/dev-tools/assets/icon.png +0 -0
- package/comate-engine/plugins/dev-tools/dist/help.md +0 -18
- package/comate-engine/plugins/dev-tools/dist/index.js +0 -166160
- package/comate-engine/plugins/dev-tools/package.json +0 -95
- package/comate-engine/plugins/devaux/assets/icon.svg +0 -1
- package/comate-engine/plugins/devaux/dist/help.md +0 -41
- package/comate-engine/plugins/devaux/dist/index.js +0 -74138
- package/comate-engine/plugins/devaux/dist/static/tree-sitter-cpp.wasm +0 -0
- package/comate-engine/plugins/devaux/dist/static/tree-sitter-go.wasm +0 -0
- package/comate-engine/plugins/devaux/dist/static/tree-sitter.wasm +0 -0
- package/comate-engine/plugins/devaux/dist/tree-sitter.wasm +0 -0
- package/comate-engine/plugins/devaux/package.json +0 -83
- package/comate-engine/plugins/f2c/assets/icon.svg +0 -11
- package/comate-engine/plugins/f2c/dist/help.md +0 -13
- package/comate-engine/plugins/f2c/dist/index.js +0 -81787
- package/comate-engine/plugins/f2c/package.json +0 -56
- package/comate-engine/plugins/fcnap/assets/icon.png +0 -0
- package/comate-engine/plugins/fcnap/dist/help.md +0 -9
- package/comate-engine/plugins/fcnap/dist/index.js +0 -105
- package/comate-engine/plugins/fcnap/package.json +0 -50
- package/comate-engine/plugins/front-end-skills/assets/icon.svg +0 -1
- package/comate-engine/plugins/front-end-skills/dist/help.md +0 -17
- package/comate-engine/plugins/front-end-skills/dist/index.js +0 -8172
- package/comate-engine/plugins/front-end-skills/package.json +0 -79
- package/comate-engine/plugins/gdp/assets/icon.png +0 -0
- package/comate-engine/plugins/gdp/dist/help.md +0 -11
- package/comate-engine/plugins/gdp/dist/index.js +0 -53065
- package/comate-engine/plugins/gdp/package.json +0 -79
- package/comate-engine/plugins/git/assets/git.svg +0 -1
- package/comate-engine/plugins/git/assets/icon.svg +0 -1
- package/comate-engine/plugins/git/dist/help.md +0 -7
- package/comate-engine/plugins/git/dist/index.js +0 -32675
- package/comate-engine/plugins/git/package.json +0 -91
- package/comate-engine/plugins/harmonyos/assets/harmonyos.png +0 -0
- package/comate-engine/plugins/harmonyos/dist/index.js +0 -78
- package/comate-engine/plugins/harmonyos/package.json +0 -37
- package/comate-engine/plugins/iapi/assets/icon.png +0 -0
- package/comate-engine/plugins/iapi/dist/help.md +0 -13
- package/comate-engine/plugins/iapi/dist/index.js +0 -458
- package/comate-engine/plugins/iapi/dist/static/lang/tree-sitter-go.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/static/lang/tree-sitter-java.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/static/tree-sitter-go.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/static/tree-sitter-java.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/tree-sitter.wasm +0 -0
- package/comate-engine/plugins/iapi/package.json +0 -102
- package/comate-engine/plugins/icafe/assets/icafe.svg +0 -1
- package/comate-engine/plugins/icafe/dist/help.md +0 -5
- package/comate-engine/plugins/icafe/dist/index.js +0 -885
- package/comate-engine/plugins/icafe/package.json +0 -74
- package/comate-engine/plugins/ievalue/assets/iEValue.svg +0 -10
- package/comate-engine/plugins/ievalue/dist/index.js +0 -2920
- package/comate-engine/plugins/ievalue/package.json +0 -88
- package/comate-engine/plugins/ipipe/assets/iPipePlugin.png +0 -0
- package/comate-engine/plugins/ipipe/dist/help.md +0 -15
- package/comate-engine/plugins/ipipe/dist/index.js +0 -7264
- package/comate-engine/plugins/ipipe/package.json +0 -62
- package/comate-engine/plugins/jarvis/assets/icon.svg +0 -1
- package/comate-engine/plugins/jarvis/dist/help.md +0 -17
- package/comate-engine/plugins/jarvis/dist/index.js +0 -140416
- package/comate-engine/plugins/jarvis/package.json +0 -93
- package/comate-engine/plugins/mapsearch/assets/mapsearchicon.png +0 -0
- package/comate-engine/plugins/mapsearch/dist/help.md +0 -4
- package/comate-engine/plugins/mapsearch/dist/index.js +0 -145
- package/comate-engine/plugins/mapsearch/package.json +0 -53
- package/comate-engine/plugins/paddle/assets/icon.png +0 -0
- package/comate-engine/plugins/paddle/assets/paconvert-3.0.1-py3-none-any.whl +0 -0
- package/comate-engine/plugins/paddle/dist/help.md +0 -31
- package/comate-engine/plugins/paddle/dist/index.js +0 -1011
- package/comate-engine/plugins/paddle/package.json +0 -129
- package/comate-engine/plugins/robot/assets/Robot.png +0 -0
- package/comate-engine/plugins/robot/dist/index.js +0 -288
- package/comate-engine/plugins/robot/package.json +0 -67
- package/comate-engine/plugins/security/assets/comate.png +0 -0
- package/comate-engine/plugins/security/dist/index.js +0 -18393
- package/comate-engine/plugins/security/package.json +0 -82
- package/comate-engine/plugins/smartapp/assets/icon.png +0 -0
- package/comate-engine/plugins/smartapp/dist/help.md +0 -4
- package/comate-engine/plugins/smartapp/dist/index.js +0 -113
- package/comate-engine/plugins/smartapp/package.json +0 -54
- package/comate-engine/plugins/testmate/assets/icon.svg +0 -1
- package/comate-engine/plugins/testmate/dist/help.md +0 -62
- package/comate-engine/plugins/testmate/dist/index.js +0 -21483
- package/comate-engine/plugins/testmate/package.json +0 -85
- package/comate-engine/plugins/tor/assets/TorPlugin.png +0 -0
- package/comate-engine/plugins/tor/dist/help.md +0 -22
- package/comate-engine/plugins/tor/dist/index.js +0 -807
- package/comate-engine/plugins/tor/package.json +0 -99
- package/comate-engine/plugins/weiyun/assets/icon.png +0 -0
- package/comate-engine/plugins/weiyun/dist/help.md +0 -11
- package/comate-engine/plugins/weiyun/dist/index.js +0 -100491
- package/comate-engine/plugins/weiyun/package.json +0 -55
- package/comate-engine/plugins/workcard/assets/favicon.png +0 -0
- package/comate-engine/plugins/workcard/dist/help.md +0 -30
- package/comate-engine/plugins/workcard/dist/index.js +0 -490
- package/comate-engine/plugins/workcard/package.json +0 -95
package/README.md
CHANGED
|
@@ -1,31 +1,37 @@
|
|
|
1
1
|
# Zulu CLI
|
|
2
2
|
|
|
3
3
|
## 环境
|
|
4
|
-
* nodejs >=
|
|
4
|
+
* nodejs >= 18
|
|
5
5
|
* ripgrep >= 12 需要手动安装该库
|
|
6
6
|
|
|
7
7
|
## 安装
|
|
8
|
+
|
|
9
|
+
### 安装 Zulu-CLI
|
|
10
|
+
```shell
|
|
11
|
+
npm install -g @comate/zulu
|
|
12
|
+
```
|
|
13
|
+
|
|
8
14
|
### 安装 ripgrep
|
|
9
15
|
以下是在不同操作系统和包管理器中安装`ripgrep`的常见命令:
|
|
10
16
|
#### MacOS
|
|
11
17
|
```shell
|
|
12
18
|
brew install ripgrep
|
|
13
19
|
```
|
|
14
|
-
####
|
|
15
|
-
|
|
20
|
+
#### Windows
|
|
21
|
+
```shell
|
|
22
|
+
winget install BurntSushi.ripgrep.MSVC
|
|
23
|
+
```
|
|
24
|
+
#### Ubuntu/Debian
|
|
16
25
|
```shell
|
|
17
26
|
sudo apt update
|
|
18
27
|
sudo apt install ripgrep
|
|
19
28
|
```
|
|
20
|
-
|
|
29
|
+
#### CentOS
|
|
21
30
|
```shell
|
|
22
31
|
sudo yum install epel-release
|
|
23
32
|
sudo yum install ripgrep
|
|
24
33
|
```
|
|
25
|
-
|
|
26
|
-
```shell
|
|
27
|
-
winget install BurntSushi.ripgrep.MSVC
|
|
28
|
-
```
|
|
34
|
+
|
|
29
35
|
#### 验证安装
|
|
30
36
|
安装完成后,可以使用以下命令验证:
|
|
31
37
|
```shell
|
|
@@ -33,10 +39,6 @@ rg --version
|
|
|
33
39
|
```
|
|
34
40
|
选择适合你操作系统和包管理器的命令即可。推荐使用系统自带的包管理器,这样更容易管理和更新。
|
|
35
41
|
|
|
36
|
-
### 安装 Zulu-CLI
|
|
37
|
-
```shell
|
|
38
|
-
npm install -g @comate/zulu
|
|
39
|
-
```
|
|
40
42
|
|
|
41
43
|
## 网络
|
|
42
44
|
默认请求`https://comate.baidu.com`,如果环境未知,请执行`zulu --ping`测试连通性,如果不通:
|
|
@@ -58,7 +60,13 @@ zulu run --query="你好" --license=xxxx
|
|
|
58
60
|
| run | 是 | --query | 问题的内容 |
|
|
59
61
|
| run | | --cwd | 工作路径,默认执行时所在地址 |
|
|
60
62
|
| run | | --ripgrep | ripgrep的绝对路径 |
|
|
61
|
-
| run | | --max | max模式的模型id
|
|
63
|
+
| run | | --max | max模式的模型id。注意,指定模型只能在首轮对话生效,中途无法更换模型|
|
|
64
|
+
| run | | --normal | normal模式的模型id。注意,指定模型只能在首轮对话生效,中途无法更换模型|
|
|
65
|
+
| run | | --conversation | conversation id,如果需要多轮对话,将上一轮对话的id传入此参数,详情见下文 |
|
|
66
|
+
| run | | --delay | 模型调用的延迟时间,单位毫秒 |
|
|
67
|
+
| list | 是 | --license | license的值 |
|
|
68
|
+
| list | | --max | 获取max模式支持的模型信息 |
|
|
69
|
+
| list | | --normal | 获取normal模式支持的模型信息 |
|
|
62
70
|
| | | --ping | 测试网络连通性 |
|
|
63
71
|
| | | --help | 帮助 |
|
|
64
72
|
| | | --version | 版本号 |
|
|
@@ -74,6 +82,49 @@ zulu run --query="你好" --license=xxxx
|
|
|
74
82
|
| HTTP_HOST | string | 设置服务地址,默认是 https://comate.baidu.com |
|
|
75
83
|
| DEBUG | boolean | 打开调试日志 |
|
|
76
84
|
|
|
85
|
+
## 多轮对话 Conversation 使用注意事项
|
|
86
|
+
|
|
87
|
+
1. 以一次普通的生成结果为例,`conversation`的值为`conversationInfo.id`
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"type": "partial-message-data",
|
|
92
|
+
"conversationInfo": {
|
|
93
|
+
"id": "12af9af4-xxxxxx", // 这里就是 conversation id
|
|
94
|
+
"status": "Running",
|
|
95
|
+
"type": "E2EBotConversation",
|
|
96
|
+
"utime": 1755840911964,
|
|
97
|
+
"ctime": 1755840911957
|
|
98
|
+
},
|
|
99
|
+
"messages": [
|
|
100
|
+
{
|
|
101
|
+
"id": "e884b828-xxxxxx",
|
|
102
|
+
"userMessageId": "50039910",
|
|
103
|
+
"role": "assistant",
|
|
104
|
+
"status": "completed",
|
|
105
|
+
"content": {},
|
|
106
|
+
"elements": [
|
|
107
|
+
{
|
|
108
|
+
"id": "1f89ded8-xxxxxxx",
|
|
109
|
+
"type": "TEXT",
|
|
110
|
+
"status": "success",
|
|
111
|
+
"content": "我是Zulu,专注软件工程的智能体,助力实现从需求到代码的全流程开发。请问有什么具体的开发任务需要我协助您完成吗?例如代码开发、问题调试或性能优化等。",
|
|
112
|
+
"composer": {
|
|
113
|
+
"markdown": "",
|
|
114
|
+
"tasks": []
|
|
115
|
+
},
|
|
116
|
+
"isErrorMessage": false
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
2. `conversation`指定的历史轮次必须在本地存在。历史记录在`~/.comate-engine/store`,以`chat_session_`开头,结尾即`conversation`
|
|
125
|
+
|
|
126
|
+
3. 多轮对话中途无法变更模型
|
|
127
|
+
|
|
77
128
|
|
|
78
129
|
## 调试
|
|
79
130
|
* 使用环境变量`DEBUG=true`,`STDOUT`会显示debug级别的日志
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
// ================ polyfill start ================
|
|
2
2
|
import {compare} from 'compare-versions';
|
|
3
|
+
|
|
3
4
|
if (compare(process.version, '18.0.0', '<')) {
|
|
4
5
|
await import('web-streams-polyfill/polyfill');
|
|
6
|
+
//polyfill for AbortSignal.timeout
|
|
7
|
+
if (!AbortSignal.timeout) {
|
|
8
|
+
AbortSignal.timeout = function (timeout) {
|
|
9
|
+
const controller = new AbortController();
|
|
10
|
+
setTimeout(() => controller.abort(), timeout);
|
|
11
|
+
return controller.signal;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
5
14
|
}
|
|
6
15
|
// ================= polyfill end =================
|
|
7
16
|
|