evolclaw 3.1.2 → 3.1.4
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 +38 -0
- package/README.md +2 -6
- package/assets/.env.template +4 -0
- package/assets/config.json.template +6 -0
- package/assets/wechat-group-qr.jpeg +0 -0
- package/dist/agents/claude-runner.js +1 -1
- package/dist/agents/codex-runner.js +75 -19
- package/dist/agents/gemini-runner.js +0 -2
- package/dist/agents/kit-renderer.js +85 -22
- package/dist/aun/aid/agentmd.js +67 -74
- package/dist/aun/aid/client.js +22 -7
- package/dist/aun/aid/identity.js +314 -28
- package/dist/aun/aid/index.js +2 -2
- package/dist/aun/rpc/connection.js +8 -10
- package/dist/channels/aun.js +53 -41
- package/dist/cli/agent.js +28 -28
- package/dist/cli/bench.js +8 -14
- package/dist/cli/help.js +23 -0
- package/dist/cli/index.js +398 -73
- package/dist/cli/init-channel.js +2 -3
- package/dist/cli/init.js +13 -6
- package/dist/cli/link-rules.js +2 -1
- package/dist/cli/net-check.js +10 -11
- package/dist/core/command-handler.js +621 -541
- package/dist/core/evolagent.js +31 -0
- package/dist/core/message/im-renderer.js +10 -0
- package/dist/core/message/message-bridge.js +123 -24
- package/dist/core/message/message-processor.js +61 -31
- package/dist/core/relation/peer-identity.js +64 -21
- package/dist/core/session/session-manager.js +191 -44
- package/dist/core/trigger/manager.js +37 -0
- package/dist/index.js +4 -1
- package/dist/paths.js +87 -16
- package/dist/utils/npm-ops.js +18 -11
- package/kits/eck_manifest.json +9 -9
- package/kits/rules/02-navigation.md +1 -0
- package/kits/rules/05-venue.md +2 -2
- package/kits/rules/06-channel.md +2 -18
- package/kits/templates/system-fragments/baseagent.md +8 -2
- package/kits/templates/system-fragments/channel.md +20 -8
- package/kits/templates/system-fragments/identity.md +5 -6
- package/kits/templates/system-fragments/relation.md +10 -5
- package/kits/templates/system-fragments/session.md +20 -0
- package/kits/templates/system-fragments/venue.md +5 -3
- package/package.json +4 -2
- package/dist/net-check.js +0 -640
- package/dist/watch-msg.js +0 -544
- package/kits/templates/system-fragments/runtime.md +0 -19
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
| `$KITS_RULES` | `$KITS/rules` | 自动载入部分(本目录) |
|
|
19
19
|
| `$KITS_DOCS` | `$KITS/docs` | 按需载入文档 |
|
|
20
20
|
| `$KITS_TEMPLATES` | `$KITS/templates` | prompt 模板 |
|
|
21
|
+
| `$KITS_FRAGMENTS` | `$KITS_TEMPLATES/system-fragments` | ECK 动态注入 fragment 模板 |
|
|
21
22
|
| `$ECK` | `$EVOLCLAW_HOME/eck` | 运行时配置 |
|
|
22
23
|
| `$AGENTS_DIR` | `$EVOLCLAW_HOME/agents` | per-agent 数据根 |
|
|
23
24
|
| `$AGENT_DIR` | `$AGENTS_DIR/<self-aid>` | 当前 agent 根 |
|
package/kits/rules/05-venue.md
CHANGED
package/kits/rules/06-channel.md
CHANGED
|
@@ -13,29 +13,15 @@
|
|
|
13
13
|
|
|
14
14
|
与其他主体通信时,**必须调用 CLI 命令**发消息,不要把输出当成发送给对方的内容。
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
当前渠道的发消息命令已在上下文中注入(见 `[aun]` 或对应渠道块)。
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
# 明文
|
|
20
|
-
ec msg send <self-aid> <to-aid> "<text>"
|
|
21
|
-
|
|
22
|
-
# 密文
|
|
23
|
-
ec msg send <self-aid> <to-aid> "<text>" --encrypt
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
`<self-aid>` 是注入上下文里的 selfAid,`<to-aid>` 是 peerKey 解析出的对端 AID。
|
|
27
|
-
|
|
28
|
-
### 仅在无法获取 selfAid 时才用 `ec ctl send`
|
|
18
|
+
### 仅在无法获取 self-aid 时才用 `ec ctl send`
|
|
29
19
|
|
|
30
20
|
```bash
|
|
31
21
|
ec ctl send "<text>"
|
|
32
22
|
ec ctl send --encrypt "<text>"
|
|
33
23
|
```
|
|
34
24
|
|
|
35
|
-
### 加密策略
|
|
36
|
-
|
|
37
|
-
对端发来密文消息时回复必须加密;明文消息默认明文回复。
|
|
38
|
-
|
|
39
25
|
### 命令返回值
|
|
40
26
|
|
|
41
27
|
- 成功:`ok` 或包含 `✓ 已发送 ...` 的输出(exit 0)
|
|
@@ -43,8 +29,6 @@ ec ctl send --encrypt "<text>"
|
|
|
43
29
|
|
|
44
30
|
发送成功后**继续后续处理**。一次任务可能发 0 到多条消息,不要因为看到"已发送"就反复发送同一条消息。
|
|
45
31
|
|
|
46
|
-
不同渠道有不同的命令行工具,使用方式参见各渠道文档。
|
|
47
|
-
|
|
48
32
|
## Agent 管理命令
|
|
49
33
|
|
|
50
34
|
`evolclaw agent` — agent 全生命周期管理。
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
[
|
|
2
|
-
|
|
1
|
+
[baseagent]
|
|
2
|
+
baseAgentName: {{baseAgentName}} # 底层推理引擎(Claude Code / Codex / Gemini CLI)
|
|
3
|
+
{{?baseAgentModel}}
|
|
4
|
+
baseAgentModel: {{baseAgentModel}}
|
|
5
|
+
{{/}}
|
|
6
|
+
{{?agentSessionId}}
|
|
7
|
+
agentSessionId: {{agentSessionId}} # 底层引擎的会话 ID(区别于 evolclaw sessionId)
|
|
8
|
+
{{/}}
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
[
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
{{?canSendFile}}
|
|
5
|
-
[文件发送] 当前渠道支持文件发送
|
|
6
|
-
{{/}}
|
|
7
|
-
|
|
1
|
+
[channel]
|
|
2
|
+
channel: {{channel}} # 渠道类型:aun|feishu|wechat|dingtalk|qqbot|wecom
|
|
8
3
|
{{?capabilities}}
|
|
9
|
-
|
|
4
|
+
capabilities: {{capabilities}} # 当前渠道支持的能力
|
|
5
|
+
{{/}}
|
|
6
|
+
{{?peerId}}
|
|
7
|
+
{{?channel=aun}}
|
|
8
|
+
ec msg send {{selfAid}} {{peerId}} "<text>" [--encrypt] [--file <path> --as image|video|voice|file] [--link <url> --title "<title>"] [--payload '<json>']
|
|
9
|
+
encrypt: 跟随对端消息加密状态(密文回密文,明文回明文);本端主动发时依据会话 encrypt 配置(待实现)
|
|
10
|
+
{{/}}
|
|
11
|
+
{{?channel!=aun}}
|
|
12
|
+
非 aun 渠道:回复由 evolclaw 自动完成,无需调用 CLI
|
|
13
|
+
{{/}}
|
|
14
|
+
{{/}}
|
|
15
|
+
{{?groupId}}
|
|
16
|
+
{{?channel=aun}}
|
|
17
|
+
ec group send {{selfAid}} {{groupId}} "<text>" [--file <path> --as image|video|voice|file] [--mention <aid>]
|
|
18
|
+
{{/}}
|
|
19
|
+
{{?channel!=aun}}
|
|
20
|
+
非 aun 渠道:回复由 evolclaw 自动完成,无需调用 CLI
|
|
21
|
+
{{/}}
|
|
10
22
|
{{/}}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
[
|
|
1
|
+
[identity]
|
|
2
2
|
{{?selfAid}}
|
|
3
|
-
|
|
3
|
+
selfName: {{selfName}}
|
|
4
|
+
selfAid: {{selfAid}}
|
|
4
5
|
{{/}}
|
|
5
|
-
|
|
6
6
|
{{?hasPersona}}
|
|
7
|
-
|
|
7
|
+
hasPersona: active
|
|
8
8
|
{{/}}
|
|
9
|
-
|
|
10
9
|
{{?hasWorkingMemory}}
|
|
11
|
-
|
|
10
|
+
hasWorkingMemory: active
|
|
12
11
|
{{/}}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{{?peerKey}}
|
|
2
|
-
[
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
[relation]
|
|
3
|
+
peerName: {{peerName}}
|
|
4
|
+
peerId: {{peerId}} # 对端在当前渠道内的原生 ID
|
|
5
|
+
peerRole: {{peerRole}} # owner|admin|guest|anonymous
|
|
6
|
+
{{?peerType}}
|
|
7
|
+
peerType: {{peerType}} # human 或 agent
|
|
8
|
+
{{/}}
|
|
9
|
+
peerKey: {{peerKey}} # 跨渠道唯一标识,格式 channel#urlEncode(peerId)
|
|
5
10
|
{{/}}
|
|
6
11
|
{{?groupId}}
|
|
7
|
-
[
|
|
8
|
-
|
|
12
|
+
[relation]
|
|
13
|
+
groupId: {{groupId}}
|
|
9
14
|
{{/}}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[session]
|
|
2
|
+
project: {{project}} # 项目目录名
|
|
3
|
+
CURRENT_PROJECT: {{CURRENT_PROJECT}} # 项目完整路径
|
|
4
|
+
sessionId: {{sessionId}} # evolclaw 会话 ID
|
|
5
|
+
{{?sessionName}}
|
|
6
|
+
sessionName: {{sessionName}}
|
|
7
|
+
{{/}}
|
|
8
|
+
sessionCreatedAt: {{sessionCreatedAt}}
|
|
9
|
+
chatMode: {{chatMode}} # interactive=同步对话 / proactive=主动推送(输出静默)
|
|
10
|
+
{{?threadId}}
|
|
11
|
+
threadId: {{threadId}} # 同一会话内的子话题 ID(多话题路由时)
|
|
12
|
+
{{/}}
|
|
13
|
+
{{?readonly}}
|
|
14
|
+
readonly: true — 禁止修改项目文件,如需生成文件请写入 .evolclaw/tmp/
|
|
15
|
+
{{/}}
|
|
16
|
+
{{?chatMode=proactive}}
|
|
17
|
+
# proactive 模式:文本输出静默丢弃,必须用以下命令发消息
|
|
18
|
+
proactive-send: evolclaw ctl send "<text>"
|
|
19
|
+
proactive-file: evolclaw ctl file <path>
|
|
20
|
+
{{/}}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
[
|
|
2
|
-
|
|
1
|
+
[venue]
|
|
2
|
+
chatType: {{chatType}} # private|group
|
|
3
|
+
EVOLCLAW_HOME: {{EVOLCLAW_HOME}} # 用户数据根目录(agents/sessions/logs)
|
|
4
|
+
PACKAGE_ROOT: {{PACKAGE_ROOT}} # evolclaw 安装目录(kits/rules/docs)
|
|
3
5
|
{{?venueUid}}
|
|
4
|
-
|
|
6
|
+
venueUid: {{venueUid}}
|
|
5
7
|
{{/}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "evolclaw",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"description": "Lightweight AI Agent gateway connecting Claude Agent SDK to messaging channels (Feishu, ACP) with multi-project session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist/",
|
|
13
13
|
"bin/",
|
|
14
|
+
"assets/",
|
|
14
15
|
"!dist/experimental/",
|
|
15
16
|
"kits/",
|
|
16
17
|
"!kits/.kits-version",
|
|
@@ -29,9 +30,10 @@
|
|
|
29
30
|
"prepublishOnly": "npm run build && npm test"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@agentunion/fastaun": "^0.3.
|
|
33
|
+
"@agentunion/fastaun": "^0.3.3",
|
|
33
34
|
"@anthropic-ai/claude-agent-sdk": "^0.2.100",
|
|
34
35
|
"cron-parser": "^5.5.0",
|
|
36
|
+
"dotenv": "^17.4.2",
|
|
35
37
|
"image-type": "^6.0.0",
|
|
36
38
|
"qrcode-terminal": "^0.12.0"
|
|
37
39
|
},
|