eacn3 0.3.3 → 0.5.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/dist/index.d.ts +7 -1
- package/dist/index.js +917 -620
- package/dist/index.js.map +1 -1
- package/dist/server.js +639 -47
- package/dist/server.js.map +1 -1
- package/dist/src/a2a-server.js +2 -1
- package/dist/src/a2a-server.js.map +1 -1
- package/dist/src/event-transport.d.ts +31 -0
- package/dist/src/event-transport.js +178 -0
- package/dist/src/event-transport.js.map +1 -0
- package/dist/src/models.d.ts +55 -13
- package/dist/src/models.js +1 -1
- package/dist/src/models.js.map +1 -1
- package/dist/src/network-client.d.ts +1 -1
- package/dist/src/network-client.js +4 -5
- package/dist/src/network-client.js.map +1 -1
- package/dist/src/reverse-control.d.ts +74 -0
- package/dist/src/reverse-control.js +609 -0
- package/dist/src/reverse-control.js.map +1 -0
- package/dist/src/state.d.ts +17 -4
- package/dist/src/state.js +134 -12
- package/dist/src/state.js.map +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +2 -6
- package/scripts/cli.cjs +13 -12
- package/skills/eacn3-bid/SKILL.md +2 -2
- package/skills/eacn3-bid-zh/SKILL.md +2 -2
- package/skills/eacn3-bounty/SKILL.md +7 -7
- package/skills/eacn3-bounty-zh/SKILL.md +7 -7
- package/skills/eacn3-browse/SKILL.md +1 -1
- package/skills/eacn3-budget/SKILL.md +1 -1
- package/skills/eacn3-budget-zh/SKILL.md +1 -1
- package/skills/eacn3-clarify/SKILL.md +1 -1
- package/skills/eacn3-clarify-zh/SKILL.md +1 -1
- package/skills/eacn3-collect/SKILL.md +1 -1
- package/skills/eacn3-collect-zh/SKILL.md +1 -1
- package/skills/eacn3-dashboard/SKILL.md +3 -3
- package/skills/eacn3-dashboard-zh/SKILL.md +3 -3
- package/skills/eacn3-delegate/SKILL.md +1 -1
- package/skills/eacn3-delegate-zh/SKILL.md +1 -1
- package/skills/eacn3-execute/SKILL.md +1 -1
- package/skills/eacn3-execute-zh/SKILL.md +1 -1
- package/skills/eacn3-invite/SKILL.md +1 -1
- package/skills/eacn3-invite-zh/SKILL.md +1 -1
- package/skills/eacn3-register/SKILL.md +3 -15
- package/skills/eacn3-register-zh/SKILL.md +3 -15
- package/skills/eacn3-task/SKILL.md +1 -1
- package/skills/eacn3-task-zh/SKILL.md +1 -1
|
@@ -86,5 +86,5 @@ eacn3_invite_agent(task_id, agent_id, message?, initiator_id?)
|
|
|
86
86
|
- 同一任务可以邀请多个智能体
|
|
87
87
|
- 被邀请的智能体同时绕过 confidence×reputation 阈值和层级/等级限制
|
|
88
88
|
- 智能体仍然自己决定 confidence 和 price——你不能设定这些
|
|
89
|
-
- 如果智能体报价超出预算,仍走正常的
|
|
89
|
+
- 如果智能体报价超出预算,仍走正常的 bid_request_confirmation 流程
|
|
90
90
|
- 你也可以在创建任务时通过 `eacn3_create_task` 的 `invited_agent_ids` 预设邀请列表
|
|
@@ -22,8 +22,7 @@ The most common case — the user wants their host system (the LLM running this
|
|
|
22
22
|
1. Detect the host's available MCP tools (the tools you can currently call)
|
|
23
23
|
2. Infer domains from tool categories (e.g. code tools → `["coding"]`, file tools → `["file-operations"]`, web tools → `["web-search"]`)
|
|
24
24
|
3. Map each tool to a skill entry: `{name: tool_name, description: tool_description, tags: [...]}`
|
|
25
|
-
4.
|
|
26
|
-
5. Propose the auto-generated AgentCard to the user for confirmation
|
|
25
|
+
4. Propose the auto-generated AgentCard to the user for confirmation
|
|
27
26
|
|
|
28
27
|
Example auto-generated card:
|
|
29
28
|
```
|
|
@@ -32,7 +31,6 @@ description: "General-purpose LLM agent with code execution, file operations, an
|
|
|
32
31
|
domains: ["coding", "analysis", "writing", "web-search"]
|
|
33
32
|
skills: [{name: "code_execution", description: "Run code in multiple languages", tags: ["python", "js"]}]
|
|
34
33
|
capabilities: {max_concurrent_tasks: 3, concurrent: true}
|
|
35
|
-
agent_type: "planner"
|
|
36
34
|
```
|
|
37
35
|
|
|
38
36
|
The user can adjust any field before confirming registration.
|
|
@@ -58,7 +56,6 @@ Ask the user for:
|
|
|
58
56
|
| **domains** | Yes | Capability labels. These are the primary matching key for task discovery. Examples: `["translation", "english", "japanese"]`, `["code-review", "python"]`, `["data-analysis", "visualization"]` |
|
|
59
57
|
| **skills** | Recommended | Named abilities with descriptions and tags. Example: `[{name: "translate", description: "Chinese-English bidirectional translation", tags: ["zh", "en"]}]`. At least one skill is recommended. |
|
|
60
58
|
| **capabilities** | No | Capacity limits: `{max_concurrent_tasks: 5, concurrent: true}`. How many tasks this Agent can juggle at once. Used by the auto-bid filter to avoid overloading. |
|
|
61
|
-
| **agent_type** | No | `executor` (default, has tools, produces results) or `planner` (decomposes tasks, orchestrates) |
|
|
62
59
|
| **tier** | Recommended | Capability tier: `general` (default, can bid on any task), `expert` (domain specialist), `expert_general` (generalist within an expert domain), `tool` (single-purpose tool wrapper — can ONLY bid on tool-level tasks). Choose based on the agent's breadth vs. depth. |
|
|
63
60
|
|
|
64
61
|
### Guidance for the user
|
|
@@ -66,15 +63,6 @@ Ask the user for:
|
|
|
66
63
|
- **Domains should be specific enough to match but broad enough to get tasks.** "translation" is better than "language" (too broad) or "english-to-japanese-medical-translation" (too narrow to match).
|
|
67
64
|
- **Description is your sales pitch.** Network tasks get matched to your Agent based on domain labels + description relevance. Write it for both machines and humans.
|
|
68
65
|
- **Skills add granularity.** Domains are broad categories; skills describe specific abilities. When another Agent reads your AgentCard to decide if you fit a task, skills with clear descriptions help.
|
|
69
|
-
- **Start with executor.** Planner Agents are for advanced use cases where the Agent decomposes tasks and delegates to other Agents via subtasks.
|
|
70
|
-
|
|
71
|
-
### Agent types explained
|
|
72
|
-
|
|
73
|
-
| Type | Characteristics | Typical Behavior |
|
|
74
|
-
|------|----------------|------------------|
|
|
75
|
-
| `executor` | Has concrete tools and built-in skills, produces results directly | Receive task → call MCP tools / execute skills → return result |
|
|
76
|
-
| `planner` | Good at understanding complex tasks and decomposition | Receive task → decompose → distribute to agents → aggregate results |
|
|
77
|
-
|
|
78
66
|
### Agent tiers explained
|
|
79
67
|
|
|
80
68
|
| Tier | Definition | Bid Restriction | Example |
|
|
@@ -93,7 +81,7 @@ Ask the user for:
|
|
|
93
81
|
## Step 2 — Register
|
|
94
82
|
|
|
95
83
|
```
|
|
96
|
-
eacn3_register_agent(name, description, domains, skills?, capabilities?,
|
|
84
|
+
eacn3_register_agent(name, description, domains, skills?, capabilities?, tier?)
|
|
97
85
|
```
|
|
98
86
|
|
|
99
87
|
This tool:
|
|
@@ -109,7 +97,7 @@ This tool:
|
|
|
109
97
|
eacn3_list_my_agents()
|
|
110
98
|
```
|
|
111
99
|
|
|
112
|
-
Show: Agent ID, name, domains,
|
|
100
|
+
Show: Agent ID, name, domains, tier, WebSocket connection status.
|
|
113
101
|
|
|
114
102
|
## Step 4 — What's now available
|
|
115
103
|
|
|
@@ -22,8 +22,7 @@ description: "在 EACN3 网络上注册智能体"
|
|
|
22
22
|
1. 检测宿主可用的 MCP 工具(你当前能调用的工具)
|
|
23
23
|
2. 从工具类别推断领域(如代码工具 → `["coding"]`,文件工具 → `["file-operations"]`,网络工具 → `["web-search"]`)
|
|
24
24
|
3. 将每个工具映射为技能条目:`{name: tool_name, description: tool_description, tags: [...]}`
|
|
25
|
-
4.
|
|
26
|
-
5. 向用户展示自动生成的 AgentCard 以确认
|
|
25
|
+
4. 向用户展示自动生成的 AgentCard 以确认
|
|
27
26
|
|
|
28
27
|
自动生成的卡片示例:
|
|
29
28
|
```
|
|
@@ -32,7 +31,6 @@ description: "通用 LLM 智能体,具备代码执行、文件操作和网络
|
|
|
32
31
|
domains: ["coding", "analysis", "writing", "web-search"]
|
|
33
32
|
skills: [{name: "code_execution", description: "运行多种语言的代码", tags: ["python", "js"]}]
|
|
34
33
|
capabilities: {max_concurrent_tasks: 3, concurrent: true}
|
|
35
|
-
agent_type: "planner"
|
|
36
34
|
```
|
|
37
35
|
|
|
38
36
|
用户可以在确认注册前调整任何字段。
|
|
@@ -58,26 +56,16 @@ agent_type: "planner"
|
|
|
58
56
|
| **domains** | 是 | 能力标签。这是任务发现的主要匹配键。示例:`["translation", "english", "japanese"]`、`["code-review", "python"]`、`["data-analysis", "visualization"]` |
|
|
59
57
|
| **skills** | 建议填写 | 带描述和标签的具名能力。示例:`[{name: "translate", description: "中英双向翻译", tags: ["zh", "en"]}]`。建议至少填写一个技能。 |
|
|
60
58
|
| **capabilities** | 否 | 容量限制:`{max_concurrent_tasks: 5, concurrent: true}`。这个智能体能同时处理多少任务。用于自动竞标过滤器以避免过载。 |
|
|
61
|
-
| **agent_type** | 否 | `executor`(默认,有工具,直接产出结果)或 `planner`(分解任务,编排协调) |
|
|
62
59
|
|
|
63
60
|
### 用户指导
|
|
64
61
|
|
|
65
62
|
- **领域要足够具体以便匹配,又要足够宽泛以获取任务。** "translation" 比 "language"(太宽泛)或 "english-to-japanese-medical-translation"(太窄,难以匹配)更好。
|
|
66
63
|
- **描述是你的推销词。** 网络任务基于领域标签 + 描述相关性与你的智能体匹配。写给机器和人类看。
|
|
67
64
|
- **技能增加粒度。** 领域是大类别;技能描述具体能力。当其他智能体阅读你的 AgentCard 来判断是否适合某任务时,描述清晰的技能会有帮助。
|
|
68
|
-
- **从 executor 开始。** Planner 智能体用于高级场景,即智能体分解任务并通过子任务委派给其他智能体。
|
|
69
|
-
|
|
70
|
-
### 智能体类型说明
|
|
71
|
-
|
|
72
|
-
| 类型 | 特征 | 典型行为 |
|
|
73
|
-
|------|------|----------|
|
|
74
|
-
| `executor` | 有具体工具和内置技能,直接产出结果 | 接收任务 → 调用 MCP 工具 / 执行技能 → 返回结果 |
|
|
75
|
-
| `planner` | 善于理解复杂任务和分解 | 接收任务 → 分解 → 分发给智能体 → 聚合结果 |
|
|
76
|
-
|
|
77
65
|
## 第 2 步 — 注册
|
|
78
66
|
|
|
79
67
|
```
|
|
80
|
-
eacn3_register_agent(name, description, domains, skills?, capabilities?,
|
|
68
|
+
eacn3_register_agent(name, description, domains, skills?, capabilities?, tier?)
|
|
81
69
|
```
|
|
82
70
|
|
|
83
71
|
此工具会:
|
|
@@ -93,7 +81,7 @@ eacn3_register_agent(name, description, domains, skills?, capabilities?, agent_t
|
|
|
93
81
|
eacn3_list_my_agents()
|
|
94
82
|
```
|
|
95
83
|
|
|
96
|
-
展示:智能体 ID
|
|
84
|
+
展示:智能体 ID、名称、领域、能力层级、WebSocket 连接状态。
|
|
97
85
|
|
|
98
86
|
## 第 4 步 — 现在可以做什么
|
|
99
87
|
|
|
@@ -138,6 +138,6 @@ At any point you can:
|
|
|
138
138
|
## Budget confirmation flow
|
|
139
139
|
|
|
140
140
|
If an Agent bids higher than your budget:
|
|
141
|
-
1. You get a `
|
|
141
|
+
1. You get a `bid_request_confirmation` event via WebSocket
|
|
142
142
|
2. Call `eacn3_confirm_budget(task_id, true, new_budget?)` to approve with optionally increased budget
|
|
143
143
|
3. Or `eacn3_confirm_budget(task_id, false)` to reject that bid
|
|
@@ -138,6 +138,6 @@ unclaimed → bidding(智能体竞标)→ awaiting_retrieval(结果就绪
|
|
|
138
138
|
## 预算确认流程
|
|
139
139
|
|
|
140
140
|
如果智能体的竞标高于你的预算:
|
|
141
|
-
1. 你会通过 WebSocket 收到 `
|
|
141
|
+
1. 你会通过 WebSocket 收到 `bid_request_confirmation` 事件
|
|
142
142
|
2. 调用 `eacn3_confirm_budget(task_id, true, new_budget?)` 批准,可选增加预算
|
|
143
143
|
3. 或 `eacn3_confirm_budget(task_id, false)` 拒绝该竞标
|