dsh-a2a-server 0.1.0 → 0.1.1
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 +23 -7
- package/README.zh-CN.md +22 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<a href="README.md"><b>English</b></a> · <a href="README.zh-CN.md">简体中文</a>
|
|
10
|
+
<a href="https://github.com/huangjuhua-aigc/dsh-a2a/blob/main/README.md"><b>English</b></a> · <a href="https://github.com/huangjuhua-aigc/dsh-a2a/blob/main/README.zh-CN.md">简体中文</a>
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
<p align="center"><sub>A community plugin, not an official DeepSeek product.</sub></p>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
16
|
-
<a href="
|
|
16
|
+
<a href="https://www.npmjs.com/package/dsh-a2a-server"><img src="https://img.shields.io/npm/v/dsh-a2a-server?style=flat&label=npm&color=CB3837" alt="npm version"></a>
|
|
17
|
+
<a href="https://github.com/huangjuhua-aigc/dsh-a2a/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat" alt="MIT License"></a>
|
|
17
18
|
<img src="https://img.shields.io/badge/A2A-v0.3.0%20JSON--RPC-4D6BFE?style=flat" alt="A2A v0.3.0 JSON-RPC binding">
|
|
18
19
|
<img src="https://img.shields.io/badge/DSH-0.1.0--rc.6-4493F8?style=flat" alt="Built against DSH 0.1.0-rc.6">
|
|
19
20
|
<img src="https://img.shields.io/badge/tests-129-2EA44F?style=flat" alt="129 tests">
|
|
@@ -32,12 +33,18 @@ adapter over `ctx.agents`, not a capability seam.
|
|
|
32
33
|
## Install
|
|
33
34
|
|
|
34
35
|
```sh
|
|
35
|
-
dsh plugin --profile web add
|
|
36
|
+
dsh plugin --profile web add dsh-a2a-server
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
`dsh plugin` forwards to pnpm inside the profile directory and appends this
|
|
39
40
|
bundle to `dsh.profile.bundles`, because the package declares `dsh.bundle`.
|
|
40
41
|
|
|
42
|
+
To work from a checkout instead, point it at the directory:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
dsh plugin --profile web add ./path/to/dsh-a2a-server
|
|
46
|
+
```
|
|
47
|
+
|
|
41
48
|
| Requirement | Supplied by |
|
|
42
49
|
| --- | --- |
|
|
43
50
|
| `ctx.agents` | `dsh-base` |
|
|
@@ -56,15 +63,24 @@ The bundled example composition runs a real model and a listening server.
|
|
|
56
63
|
|
|
57
64
|
```sh
|
|
58
65
|
pnpm install
|
|
59
|
-
|
|
66
|
+
A2A_PEERS="alice:demo123" A2A_PORT=9922 pnpm serve
|
|
60
67
|
```
|
|
61
68
|
|
|
62
69
|
```powershell
|
|
63
|
-
$env:
|
|
70
|
+
$env:A2A_PEERS = "alice:demo123"
|
|
64
71
|
$env:A2A_PORT = "9922"
|
|
65
72
|
pnpm serve
|
|
66
73
|
```
|
|
67
74
|
|
|
75
|
+
Peer names are arbitrary — `alice` is this demo's default, not a protocol
|
|
76
|
+
fixture. Name as many as you like, and either carry the token inline or store it
|
|
77
|
+
under the derived credential reference:
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
A2A_PEERS="ops:tok1,research:tok2" # inline
|
|
81
|
+
A2A_PEERS="ops,research" # tokens from A2A_PEER_OPS / A2A_PEER_RESEARCH
|
|
82
|
+
```
|
|
83
|
+
|
|
68
84
|
The model credential is resolved through `ctx.credentials`, so an existing
|
|
69
85
|
`DEEPSEEK_API_KEY` in the harness home, either `.env` layer, or the process
|
|
70
86
|
environment is picked up unchanged. A missing credential fails the boot.
|
|
@@ -84,7 +100,7 @@ curl -s http://127.0.0.1:9922/a2a \
|
|
|
84
100
|
|
|
85
101
|
| Variable | Default | Meaning |
|
|
86
102
|
| --- | --- | --- |
|
|
87
|
-
| `
|
|
103
|
+
| `A2A_PEERS` | `alice` | `name[:token]` list; a token is required for each |
|
|
88
104
|
| `A2A_PORT` | `9900` | Listening port |
|
|
89
105
|
| `A2A_SEND_MODE` | `block` | `block` or `immediate` |
|
|
90
106
|
| `A2A_WORKSPACE_ROOT` | temp dir | Parent of the per-peer working directories |
|
|
@@ -325,7 +341,7 @@ Scan to join the WeChat group **A2A 产品应用和探索** — discussion of A2
|
|
|
325
341
|
practice, this plugin included.
|
|
326
342
|
|
|
327
343
|
<p align="center">
|
|
328
|
-
<img src="assets/community-wechat.jpg" alt="WeChat group QR code" width="280">
|
|
344
|
+
<img src="https://raw.githubusercontent.com/huangjuhua-aigc/dsh-a2a/main/assets/community-wechat.jpg" alt="WeChat group QR code" width="280">
|
|
329
345
|
</p>
|
|
330
346
|
|
|
331
347
|
If the code has expired, open an issue and we will refresh it.
|
package/README.zh-CN.md
CHANGED
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<a href="README.md">English</a> · <a href="README.zh-CN.md"><b>简体中文</b></a>
|
|
10
|
+
<a href="https://github.com/huangjuhua-aigc/dsh-a2a/blob/main/README.md">English</a> · <a href="https://github.com/huangjuhua-aigc/dsh-a2a/blob/main/README.zh-CN.md"><b>简体中文</b></a>
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
<p align="center"><sub>社区维护的插件,并非 DeepSeek 官方产品。</sub></p>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
16
|
-
<a href="
|
|
16
|
+
<a href="https://www.npmjs.com/package/dsh-a2a-server"><img src="https://img.shields.io/npm/v/dsh-a2a-server?style=flat&label=npm&color=CB3837" alt="npm 版本"></a>
|
|
17
|
+
<a href="https://github.com/huangjuhua-aigc/dsh-a2a/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat" alt="MIT License"></a>
|
|
17
18
|
<img src="https://img.shields.io/badge/A2A-v0.3.0%20JSON--RPC-4D6BFE?style=flat" alt="A2A v0.3.0 JSON-RPC 绑定">
|
|
18
19
|
<img src="https://img.shields.io/badge/DSH-0.1.0--rc.6-4493F8?style=flat" alt="基于 DSH 0.1.0-rc.6 构建">
|
|
19
20
|
<img src="https://img.shields.io/badge/tests-129-2EA44F?style=flat" alt="129 项测试">
|
|
@@ -30,12 +31,18 @@ subagent provider。它是 `ctx.agents` 之上的传输适配层,不是能力
|
|
|
30
31
|
## 安装
|
|
31
32
|
|
|
32
33
|
```sh
|
|
33
|
-
dsh plugin --profile web add
|
|
34
|
+
dsh plugin --profile web add dsh-a2a-server
|
|
34
35
|
```
|
|
35
36
|
|
|
36
37
|
`dsh plugin` 会在 profile 目录里转发给 pnpm,并把这个 bundle 追加进
|
|
37
38
|
`dsh.profile.bundles`——因为包中声明了 `dsh.bundle`。
|
|
38
39
|
|
|
40
|
+
若想直接使用本地检出,把路径指过去即可:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
dsh plugin --profile web add ./path/to/dsh-a2a-server
|
|
44
|
+
```
|
|
45
|
+
|
|
39
46
|
| 依赖 | 由谁提供 |
|
|
40
47
|
| --- | --- |
|
|
41
48
|
| `ctx.agents` | `dsh-base` |
|
|
@@ -53,15 +60,23 @@ dsh plugin --profile web add ./path/to/dsh-a2a-server
|
|
|
53
60
|
|
|
54
61
|
```sh
|
|
55
62
|
pnpm install
|
|
56
|
-
|
|
63
|
+
A2A_PEERS="alice:demo123" A2A_PORT=9922 pnpm serve
|
|
57
64
|
```
|
|
58
65
|
|
|
59
66
|
```powershell
|
|
60
|
-
$env:
|
|
67
|
+
$env:A2A_PEERS = "alice:demo123"
|
|
61
68
|
$env:A2A_PORT = "9922"
|
|
62
69
|
pnpm serve
|
|
63
70
|
```
|
|
64
71
|
|
|
72
|
+
peer 名字是任意的——`alice` 只是这个 demo 的默认值,不是协议规定。可以声明任意多个,
|
|
73
|
+
token 既可以内联,也可以存在派生出来的凭据引用下:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
A2A_PEERS="ops:tok1,research:tok2" # 内联
|
|
77
|
+
A2A_PEERS="ops,research" # token 取自 A2A_PEER_OPS / A2A_PEER_RESEARCH
|
|
78
|
+
```
|
|
79
|
+
|
|
65
80
|
模型凭据经 `ctx.credentials` 解析,因此 harness home、任一 `.env` 层或进程环境中已有的
|
|
66
81
|
`DEEPSEEK_API_KEY` 都会被直接采用。缺少凭据时启动失败。
|
|
67
82
|
|
|
@@ -80,7 +95,7 @@ curl -s http://127.0.0.1:9922/a2a \
|
|
|
80
95
|
|
|
81
96
|
| 变量 | 默认值 | 含义 |
|
|
82
97
|
| --- | --- | --- |
|
|
83
|
-
| `
|
|
98
|
+
| `A2A_PEERS` | `alice` | `名字[:token]` 列表;每个 peer 都必须有 token |
|
|
84
99
|
| `A2A_PORT` | `9900` | 监听端口 |
|
|
85
100
|
| `A2A_SEND_MODE` | `block` | `block` 或 `immediate` |
|
|
86
101
|
| `A2A_WORKSPACE_ROOT` | 临时目录 | per-peer 工作目录的父目录 |
|
|
@@ -306,7 +321,7 @@ harness 处于 pre-release 阶段,不承诺跨重命名或重新打包的兼
|
|
|
306
321
|
扫码加入微信群 **A2A 产品应用和探索** —— 交流 A2A 的实际应用,也包括这个插件。
|
|
307
322
|
|
|
308
323
|
<p align="center">
|
|
309
|
-
<img src="assets/community-wechat.jpg" alt="微信群二维码" width="280">
|
|
324
|
+
<img src="https://raw.githubusercontent.com/huangjuhua-aigc/dsh-a2a/main/assets/community-wechat.jpg" alt="微信群二维码" width="280">
|
|
310
325
|
</p>
|
|
311
326
|
|
|
312
327
|
若二维码已过期,欢迎提 issue,我们会更新。
|
package/package.json
CHANGED