dsh-a2a-server 0.1.0 → 0.2.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 +80 -40
- package/README.zh-CN.md +72 -37
- package/lib/config.d.ts +15 -7
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +6 -1
- package/lib/config.js.map +1 -1
- package/lib/index.d.ts +9 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +53 -20
- package/lib/index.js.map +1 -1
- package/lib/projection.d.ts +21 -19
- package/lib/projection.d.ts.map +1 -1
- package/lib/projection.js +15 -7
- package/lib/projection.js.map +1 -1
- package/lib/protocol/card.d.ts +25 -7
- package/lib/protocol/card.d.ts.map +1 -1
- package/lib/protocol/card.js +35 -14
- package/lib/protocol/card.js.map +1 -1
- package/lib/protocol/index.d.ts +10 -10
- package/lib/protocol/index.d.ts.map +1 -1
- package/lib/protocol/index.js +8 -8
- package/lib/protocol/index.js.map +1 -1
- package/lib/protocol/jsonrpc.d.ts +54 -6
- package/lib/protocol/jsonrpc.d.ts.map +1 -1
- package/lib/protocol/jsonrpc.js +70 -8
- package/lib/protocol/jsonrpc.js.map +1 -1
- package/lib/protocol/parse.d.ts +79 -0
- package/lib/protocol/parse.d.ts.map +1 -0
- package/lib/protocol/parse.js +249 -0
- package/lib/protocol/parse.js.map +1 -0
- package/lib/protocol/sse.d.ts +6 -3
- package/lib/protocol/sse.d.ts.map +1 -1
- package/lib/protocol/sse.js +4 -2
- package/lib/protocol/sse.js.map +1 -1
- package/lib/protocol/wire.d.ts +165 -54
- package/lib/protocol/wire.d.ts.map +1 -1
- package/lib/protocol/wire.js +54 -9
- package/lib/protocol/wire.js.map +1 -1
- package/lib/router.d.ts +10 -1
- package/lib/router.d.ts.map +1 -1
- package/lib/router.js +247 -107
- package/lib/router.js.map +1 -1
- package/lib/security.d.ts +33 -1
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +44 -2
- package/lib/security.js.map +1 -1
- package/lib/tasks.js +5 -5
- package/lib/tasks.js.map +1 -1
- package/lib/types.d.ts +3 -3
- package/lib/types.js +1 -1
- package/lib/version.d.ts +20 -0
- package/lib/version.d.ts.map +1 -0
- package/lib/version.js +20 -0
- package/lib/version.js.map +1 -0
- package/package.json +1 -1
- package/lib/protocol/normalize.d.ts +0 -72
- package/lib/protocol/normalize.d.ts.map +0 -1
- package/lib/protocol/normalize.js +0 -278
- package/lib/protocol/normalize.js.map +0 -1
package/README.md
CHANGED
|
@@ -7,21 +7,22 @@
|
|
|
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="
|
|
17
|
-
<img src="https://img.shields.io/badge/
|
|
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>
|
|
18
|
+
<img src="https://img.shields.io/badge/A2A-v1.0%20JSON--RPC-4D6BFE?style=flat" alt="A2A v1.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
|
-
<img src="https://img.shields.io/badge/tests-
|
|
20
|
+
<img src="https://img.shields.io/badge/tests-167-2EA44F?style=flat" alt="167 tests">
|
|
20
21
|
</p>
|
|
21
22
|
|
|
22
23
|
`dsh-a2a-server` makes a [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
23
24
|
agent reachable over the [A2A (Agent2Agent)](https://a2a-protocol.org) protocol. It
|
|
24
|
-
serves an Agent Card at a well-known URI and implements the **
|
|
25
|
+
serves an Agent Card at a well-known URI and implements the **v1.0 JSON-RPC
|
|
25
26
|
binding**, so any compliant peer that knows the deployment's URL can discover the
|
|
26
27
|
agent and submit tasks to it.
|
|
27
28
|
|
|
@@ -32,18 +33,24 @@ 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` |
|
|
44
51
|
| `ctx.credentials` | `dsh-base` |
|
|
45
52
|
| `ctx.webServer` | **`dsh-web-app`** |
|
|
46
|
-
| `ctx.sessionProjections` (optional) | composition; enables `
|
|
53
|
+
| `ctx.sessionProjections` (optional) | composition; enables `GetTask` after settlement |
|
|
47
54
|
|
|
48
55
|
The plugin stays PENDING until the three required services exist. `ctx.webServer`
|
|
49
56
|
ships in `dsh-web-app` rather than `dsh-base`, so a `headless` profile needs
|
|
@@ -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.
|
|
@@ -77,20 +93,20 @@ curl -s http://127.0.0.1:9922/.well-known/agent-card.json
|
|
|
77
93
|
curl -s http://127.0.0.1:9922/a2a \
|
|
78
94
|
-H "authorization: Bearer demo123" \
|
|
79
95
|
-H 'content-type: application/json' \
|
|
80
|
-
-d '{"jsonrpc":"2.0","id":1,"method":"
|
|
81
|
-
"message":{"
|
|
82
|
-
"parts":[{"
|
|
96
|
+
-H 'a2a-version: 1.0' -d '{"jsonrpc":"2.0","id":1,"method":"SendMessage","params":{
|
|
97
|
+
"message":{"messageId":"m1","role":"ROLE_USER",
|
|
98
|
+
"parts":[{"text":"hello"}]}}}'
|
|
83
99
|
```
|
|
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 |
|
|
91
107
|
| `DEEPSEEK_MODEL` | `deepseek-v4-flash` | Model id requested from the adapter |
|
|
92
108
|
|
|
93
|
-
A one-shot probe runs
|
|
109
|
+
A one-shot probe runs 67 checks against a live server and exits non-zero on any
|
|
94
110
|
mismatch:
|
|
95
111
|
|
|
96
112
|
```sh
|
|
@@ -106,21 +122,42 @@ node example/probe.mjs http://127.0.0.1:9922 demo123
|
|
|
106
122
|
| `/.well-known/agent.json` | GET | Public by default |
|
|
107
123
|
| `{basePath}` (default `/a2a`) | POST | Bearer required |
|
|
108
124
|
|
|
109
|
-
| JSON-RPC method |
|
|
125
|
+
| JSON-RPC method | Status |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| `SendMessage` | Waiting negotiated per request |
|
|
128
|
+
| `SendStreamingMessage` | SSE |
|
|
129
|
+
| `GetTask` | Idempotent; answers after settlement |
|
|
130
|
+
| `ListTasks` | Cursor-paginated, filterable, resident contexts only |
|
|
131
|
+
| `CancelTask` | Cancels the running turn |
|
|
132
|
+
| `SubscribeToTask` | Live stream; `-32004` on a terminal task |
|
|
133
|
+
| `GetExtendedAgentCard` | Extra skills for an authenticated peer; `-32007` when unconfigured |
|
|
134
|
+
| `*TaskPushNotificationConfig` | `-32003` |
|
|
135
|
+
|
|
136
|
+
**Only A2A v1.0 is served.** The v0.3 method names, `kind` discriminators,
|
|
137
|
+
lowercase enums, and nested `file` parts are gone rather than aliased: every
|
|
138
|
+
reply this server writes is v1.0 JSON, which a v0.3 client could not read, so
|
|
139
|
+
answering a v0.3 request would fail further from its cause than refusing it. A
|
|
140
|
+
retired method answers `-32601` naming its replacement, and an explicit
|
|
141
|
+
`A2A-Version: 0.3` answers `-32009` (`VersionNotSupportedError`). A request with
|
|
142
|
+
no `A2A-Version` header is served as 1.0 — the only version this interface
|
|
143
|
+
declares on its card.
|
|
144
|
+
|
|
145
|
+
What that means concretely, against v0.3:
|
|
146
|
+
|
|
147
|
+
| Concern | v0.3 | v1.0 as served here |
|
|
110
148
|
| --- | --- | --- |
|
|
111
|
-
|
|
|
112
|
-
| `
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
dialect the request used.
|
|
149
|
+
| Task reference | `params.taskId` | `params.id` |
|
|
150
|
+
| `SendMessage` result | bare `Task` | `{ "task": … }` |
|
|
151
|
+
| Task state | `"working"` | `"TASK_STATE_WORKING"` |
|
|
152
|
+
| Message role | `"user"` | `"ROLE_USER"` |
|
|
153
|
+
| Part | `{"kind":"text","text":…}` | `{"text":…}`; file parts flatten to `url`/`raw`/`filename`/`mediaType` |
|
|
154
|
+
| Stream frame | `{"kind":"status-update",…,"final":true}` | `{"statusUpdate":{…}}`; the stream's close is the terminal signal |
|
|
155
|
+
| Stream opening | a non-final status update | the `Task` object itself |
|
|
156
|
+
| Wait control | `configuration.blocking` | `configuration.returnImmediately` (inverted; blocking is the default) |
|
|
157
|
+
| Card endpoint | `url` + `preferredTransport` | `supportedInterfaces[]`, each carrying its own `protocolVersion` |
|
|
158
|
+
| Card auth | `securitySchemes` + `security` | schemes wrapped in `httpAuthSecurityScheme`; `securityRequirements` |
|
|
159
|
+
| Extended card | `supportsAuthenticatedExtendedCard` | `capabilities.extendedAgentCard` |
|
|
160
|
+
| A2A error detail | none | `error.data[]` carrying a `google.rpc.ErrorInfo` with `reason` and `domain` |
|
|
124
161
|
|
|
125
162
|
Inbound messages may carry text, file, and data parts. File and data parts are
|
|
126
163
|
rendered into the model's context as bracketed references. Replies are text.
|
|
@@ -137,7 +174,6 @@ another peer answers exactly as an absent one.
|
|
|
137
174
|
config:
|
|
138
175
|
basePath: /a2a
|
|
139
176
|
publicUrl: https://agents.example.com/a2a # advertised on the card
|
|
140
|
-
protocolVersion: 0.3.0
|
|
141
177
|
provider: deepseek-official
|
|
142
178
|
model: deepseek-v4-flash
|
|
143
179
|
|
|
@@ -150,6 +186,11 @@ another peer answers exactly as an absent one.
|
|
|
150
186
|
name: general
|
|
151
187
|
description: General-purpose task execution.
|
|
152
188
|
tags: [coding, research]
|
|
189
|
+
extendedSkills: # authenticated peers only
|
|
190
|
+
- id: internal
|
|
191
|
+
name: internal diagnostics
|
|
192
|
+
description: Reports harness internals.
|
|
193
|
+
tags: [internal]
|
|
153
194
|
provider:
|
|
154
195
|
organization: Example Inc.
|
|
155
196
|
url: https://example.com
|
|
@@ -180,15 +221,15 @@ another peer answers exactly as an absent one.
|
|
|
180
221
|
| --- | --- | --- |
|
|
181
222
|
| `basePath` | `/a2a` | JSON-RPC route |
|
|
182
223
|
| `publicUrl` | derived from `Host` | Routable URL published on the card |
|
|
183
|
-
| `protocolVersion` | `0.3.0` | Version advertised on the card |
|
|
184
224
|
| `provider` · `model` | — | Model route for every agent this server creates |
|
|
185
225
|
| `card.public` | `true` | Serve the card without a credential |
|
|
186
226
|
| `card.skills` | `[]` | Declared skills; falls back to one `general` entry |
|
|
227
|
+
| `card.extendedSkills` | `[]` | Skills revealed only through `GetExtendedAgentCard` |
|
|
187
228
|
| `peers` | `{}` | Identity → credential **reference name** |
|
|
188
229
|
| `trustedPeers` | all authenticated | Allow-list of identities that may run tasks |
|
|
189
230
|
| `rateLimitPerMinute` | `60` | Sliding window per identity |
|
|
190
231
|
| `maxContextTurns` | `5` | Messages accepted per context before `rejected` |
|
|
191
|
-
| `sendMode` | `block` | Default when the client
|
|
232
|
+
| `sendMode` | `block` | Default when the client sends no `returnImmediately` |
|
|
192
233
|
| `blockTimeoutMs` | `60000` | After which a blocking request is declined |
|
|
193
234
|
| `contextIdleTtlMs` | `1800000` | Idle time before a context's agent is released |
|
|
194
235
|
| `maxResidentContexts` | `64` | Ceiling on resident contexts |
|
|
@@ -241,8 +282,7 @@ single repository; under it, files written by one peer are readable by another.
|
|
|
241
282
|
- JSONRPC binding only. gRPC and HTTP+JSON are not served, and the card says so.
|
|
242
283
|
- Push notifications are not implemented. `push.enabled` selects which error the
|
|
243
284
|
push methods return; the card advertises `pushNotifications: false`.
|
|
244
|
-
- No
|
|
245
|
-
signatures.
|
|
285
|
+
- No `stateTransitionHistory`, protocol extensions, or card signatures.
|
|
246
286
|
- Streaming emits committed assistant messages. Per-chunk streaming is not
|
|
247
287
|
implemented.
|
|
248
288
|
- No orphan-task watchdog: a task wedged non-terminal stays that way.
|
|
@@ -261,8 +301,8 @@ single repository; under it, files written by one peer are readable by another.
|
|
|
261
301
|
```
|
|
262
302
|
src/
|
|
263
303
|
├── protocol/ dependency-free library: no Cordis, no HTTP, no harness
|
|
264
|
-
│ ├── wire.ts the A2A vocabulary
|
|
265
|
-
│ ├──
|
|
304
|
+
│ ├── wire.ts the A2A v1.0 vocabulary: one shape, no translation
|
|
305
|
+
│ ├── parse.ts inbound parsing and the method table
|
|
266
306
|
│ ├── jsonrpc.ts framing and the A2A error codes
|
|
267
307
|
│ ├── card.ts Agent Card construction
|
|
268
308
|
│ └── sse.ts SSE frame encoding
|
|
@@ -294,9 +334,9 @@ maps to an Activation evicted when idle, leaving the durable Session behind.
|
|
|
294
334
|
```sh
|
|
295
335
|
pnpm install
|
|
296
336
|
pnpm typecheck
|
|
297
|
-
pnpm test #
|
|
337
|
+
pnpm test # 167 tests across 10 files
|
|
298
338
|
pnpm serve # a listening server
|
|
299
|
-
pnpm probe #
|
|
339
|
+
pnpm probe # 67 checks against a running server
|
|
300
340
|
pnpm build # emit lib/
|
|
301
341
|
```
|
|
302
342
|
|
|
@@ -311,8 +351,8 @@ Built against [deepseek-ai/deepseek-harness](https://github.com/deepseek-ai/deep
|
|
|
311
351
|
The official project supplies the agent runtime, the plugin system, and the
|
|
312
352
|
capability seams this plugin consumes. This project supplies:
|
|
313
353
|
|
|
314
|
-
- The A2A
|
|
315
|
-
- Agent Card construction and
|
|
354
|
+
- The A2A v1.0 JSON-RPC binding, served inbound
|
|
355
|
+
- Agent Card construction and inbound request parsing
|
|
316
356
|
- Mapping between A2A tasks and harness turns
|
|
317
357
|
- Per-peer authentication, isolation, and workspace policy
|
|
318
358
|
|
|
@@ -325,7 +365,7 @@ Scan to join the WeChat group **A2A 产品应用和探索** — discussion of A2
|
|
|
325
365
|
practice, this plugin included.
|
|
326
366
|
|
|
327
367
|
<p align="center">
|
|
328
|
-
<img src="assets/community-wechat.jpg" alt="WeChat group QR code" width="280">
|
|
368
|
+
<img src="https://raw.githubusercontent.com/huangjuhua-aigc/dsh-a2a/main/assets/community-wechat.jpg" alt="WeChat group QR code" width="280">
|
|
329
369
|
</p>
|
|
330
370
|
|
|
331
371
|
If the code has expired, open an issue and we will refresh it.
|
package/README.zh-CN.md
CHANGED
|
@@ -7,21 +7,22 @@
|
|
|
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="
|
|
17
|
-
<img src="https://img.shields.io/badge/
|
|
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>
|
|
18
|
+
<img src="https://img.shields.io/badge/A2A-v1.0%20JSON--RPC-4D6BFE?style=flat" alt="A2A v1.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
|
-
<img src="https://img.shields.io/badge/tests-
|
|
20
|
+
<img src="https://img.shields.io/badge/tests-167-2EA44F?style=flat" alt="167 项测试">
|
|
20
21
|
</p>
|
|
21
22
|
|
|
22
23
|
`dsh-a2a-server` 让 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
23
24
|
上的 agent 可以通过 [A2A(Agent2Agent)](https://a2a-protocol.org)协议被访问。它在
|
|
24
|
-
well-known 路径发布 Agent Card,并实现 **
|
|
25
|
+
well-known 路径发布 Agent Card,并实现 **v1.0 JSON-RPC 绑定**——任何知道本部署
|
|
25
26
|
URL 的合规 peer 都能发现这个 agent 并向它提交任务。
|
|
26
27
|
|
|
27
28
|
本插件**只做入站**:从不主动连接其他 agent,没有 client、没有 peer 目录、没有 A2A
|
|
@@ -30,18 +31,24 @@ 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` |
|
|
42
49
|
| `ctx.credentials` | `dsh-base` |
|
|
43
50
|
| `ctx.webServer` | **`dsh-web-app`** |
|
|
44
|
-
| `ctx.sessionProjections`(可选) | 组合层;启用后 `
|
|
51
|
+
| `ctx.sessionProjections`(可选) | 组合层;启用后 `GetTask` 在任务结算后仍可应答 |
|
|
45
52
|
|
|
46
53
|
三个必需服务齐备之前,插件保持 PENDING。`ctx.webServer` 由 `dsh-web-app` 提供而不在
|
|
47
54
|
`dsh-base` 中,因此 `headless` profile 需要先挂载 `@deepseek-ai/dsh-host-webserver`。
|
|
@@ -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
|
|
|
@@ -73,20 +88,21 @@ curl -s http://127.0.0.1:9922/.well-known/agent-card.json
|
|
|
73
88
|
curl -s http://127.0.0.1:9922/a2a \
|
|
74
89
|
-H "authorization: Bearer demo123" \
|
|
75
90
|
-H 'content-type: application/json' \
|
|
76
|
-
-
|
|
77
|
-
|
|
78
|
-
|
|
91
|
+
-H 'a2a-version: 1.0' \
|
|
92
|
+
-d '{"jsonrpc":"2.0","id":1,"method":"SendMessage","params":{
|
|
93
|
+
"message":{"messageId":"m1","role":"ROLE_USER",
|
|
94
|
+
"parts":[{"text":"hello"}]}}}'
|
|
79
95
|
```
|
|
80
96
|
|
|
81
97
|
| 变量 | 默认值 | 含义 |
|
|
82
98
|
| --- | --- | --- |
|
|
83
|
-
| `
|
|
99
|
+
| `A2A_PEERS` | `alice` | `名字[:token]` 列表;每个 peer 都必须有 token |
|
|
84
100
|
| `A2A_PORT` | `9900` | 监听端口 |
|
|
85
101
|
| `A2A_SEND_MODE` | `block` | `block` 或 `immediate` |
|
|
86
102
|
| `A2A_WORKSPACE_ROOT` | 临时目录 | per-peer 工作目录的父目录 |
|
|
87
103
|
| `DEEPSEEK_MODEL` | `deepseek-v4-flash` | 向适配器请求的模型 id |
|
|
88
104
|
|
|
89
|
-
一次性探针会对运行中的服务执行
|
|
105
|
+
一次性探针会对运行中的服务执行 67 项检查,任何一项不符即以非零码退出:
|
|
90
106
|
|
|
91
107
|
```sh
|
|
92
108
|
pnpm probe # 默认 :9922 / demo123
|
|
@@ -101,20 +117,40 @@ node example/probe.mjs http://127.0.0.1:9922 demo123
|
|
|
101
117
|
| `/.well-known/agent.json` | GET | 默认公开 |
|
|
102
118
|
| `{basePath}`(默认 `/a2a`) | POST | 必须携带 Bearer |
|
|
103
119
|
|
|
104
|
-
| JSON-RPC 方法 |
|
|
120
|
+
| JSON-RPC 方法 | 状态 |
|
|
121
|
+
| --- | --- |
|
|
122
|
+
| `SendMessage` | 是否等待逐请求协商 |
|
|
123
|
+
| `SendStreamingMessage` | SSE |
|
|
124
|
+
| `GetTask` | 幂等;结算后仍可应答 |
|
|
125
|
+
| `ListTasks` | 游标分页、可过滤;仅覆盖常驻的 context |
|
|
126
|
+
| `CancelTask` | 取消正在执行的 turn |
|
|
127
|
+
| `SubscribeToTask` | 续订活任务;终态任务返回 `-32004` |
|
|
128
|
+
| `GetExtendedAgentCard` | 已认证 peer 可见的额外 skill;未配置时 `-32007` |
|
|
129
|
+
| `*TaskPushNotificationConfig` | `-32003` |
|
|
130
|
+
|
|
131
|
+
**只提供 A2A v1.0。** v0.3 的方法名、`kind` 判别字段、小写枚举、嵌套 `file`
|
|
132
|
+
part 是被**删除**而不是做了别名:本服务写出的每一个回包都是 v1.0 JSON,v0.3
|
|
133
|
+
客户端本就读不懂,所以“应答一个 v0.3 请求”只会让故障离成因更远。已退役的方法回
|
|
134
|
+
`-32601` 并直接告知新名字;显式的 `A2A-Version: 0.3` 回 `-32009`
|
|
135
|
+
(`VersionNotSupportedError`)。不带 `A2A-Version` 头的请求按 1.0 处理——这是本接口
|
|
136
|
+
在 Card 上声明的唯一版本。
|
|
137
|
+
|
|
138
|
+
具体到线上,与 v0.3 的差异:
|
|
139
|
+
|
|
140
|
+
| 关注点 | v0.3 | 本服务的 v1.0 |
|
|
105
141
|
| --- | --- | --- |
|
|
106
|
-
|
|
|
107
|
-
| `
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
142
|
+
| 任务引用 | `params.taskId` | `params.id` |
|
|
143
|
+
| `SendMessage` 结果 | 裸 `Task` | `{ "task": … }` |
|
|
144
|
+
| 任务状态 | `"working"` | `"TASK_STATE_WORKING"` |
|
|
145
|
+
| 消息角色 | `"user"` | `"ROLE_USER"` |
|
|
146
|
+
| Part | `{"kind":"text","text":…}` | `{"text":…}`;文件 part 展平为 `url`/`raw`/`filename`/`mediaType` |
|
|
147
|
+
| 流帧 | `{"kind":"status-update",…,"final":true}` | `{"statusUpdate":{…}}`;流关闭即终态信号 |
|
|
148
|
+
| 流首帧 | 一帧非终态 status update | `Task` 对象本身 |
|
|
149
|
+
| 等待控制 | `configuration.blocking` | `configuration.returnImmediately`(语义反转,默认等待) |
|
|
150
|
+
| Card 端点 | `url` + `preferredTransport` | `supportedInterfaces[]`,每条自带 `protocolVersion` |
|
|
151
|
+
| Card 鉴权 | `securitySchemes` + `security` | scheme 包在 `httpAuthSecurityScheme` 里;改用 `securityRequirements` |
|
|
152
|
+
| 扩展 Card | `supportsAuthenticatedExtendedCard` | `capabilities.extendedAgentCard` |
|
|
153
|
+
| A2A 错误细节 | 无 | `error.data[]` 携带 `google.rpc.ErrorInfo`,含 `reason` 与 `domain` |
|
|
118
154
|
|
|
119
155
|
入站消息可携带 text、file、data 三类 part。file 与 data 会以方括号引用的形式进入模型
|
|
120
156
|
上下文。回复为纯文本。
|
|
@@ -130,7 +166,6 @@ node example/probe.mjs http://127.0.0.1:9922 demo123
|
|
|
130
166
|
config:
|
|
131
167
|
basePath: /a2a
|
|
132
168
|
publicUrl: https://agents.example.com/a2a # 写入 Card 的对外地址
|
|
133
|
-
protocolVersion: 0.3.0
|
|
134
169
|
provider: deepseek-official
|
|
135
170
|
model: deepseek-v4-flash
|
|
136
171
|
|
|
@@ -173,10 +208,10 @@ node example/probe.mjs http://127.0.0.1:9922 demo123
|
|
|
173
208
|
| --- | --- | --- |
|
|
174
209
|
| `basePath` | `/a2a` | JSON-RPC 路由 |
|
|
175
210
|
| `publicUrl` | 由 `Host` 推导 | 写入 Card 的可路由地址 |
|
|
176
|
-
| `protocolVersion` | `0.3.0` | Card 上声明的协议版本 |
|
|
177
211
|
| `provider` · `model` | — | 本服务创建的每个 agent 使用的模型路由 |
|
|
178
212
|
| `card.public` | `true` | 无需凭据即可获取 Card |
|
|
179
213
|
| `card.skills` | `[]` | 声明的 skills;为空时回退到一条 `general` |
|
|
214
|
+
| `card.extendedSkills` | `[]` | 只对已认证 peer 经 `GetExtendedAgentCard` 公开的 skills |
|
|
180
215
|
| `peers` | `{}` | 身份 → 凭据**引用名** |
|
|
181
216
|
| `trustedPeers` | 全部已认证身份 | 允许执行任务的身份白名单 |
|
|
182
217
|
| `rateLimitPerMinute` | `60` | 按身份的滑动窗口 |
|
|
@@ -231,7 +266,7 @@ A2A_PEER_ALICE: <32-byte-hex-from-openssl-rand>
|
|
|
231
266
|
- 只提供 JSONRPC 绑定。不提供 gRPC 与 HTTP+JSON,Card 上如实声明。
|
|
232
267
|
- 未实现推送通知。`push.enabled` 仅决定推送方法返回哪个错误码,Card 上声明
|
|
233
268
|
`pushNotifications: false`。
|
|
234
|
-
-
|
|
269
|
+
- 不支持 `stateTransitionHistory`、协议扩展与 Card 签名。
|
|
235
270
|
- 流式只推送已提交的 assistant 消息,未实现逐 chunk 推送。
|
|
236
271
|
- 无孤儿任务看门狗:卡在非终态的任务会一直保持该状态。
|
|
237
272
|
- 未实现跨会话工具拒绝;隔离依赖 `workspaceMode`。
|
|
@@ -247,8 +282,8 @@ A2A_PEER_ALICE: <32-byte-hex-from-openssl-rand>
|
|
|
247
282
|
```
|
|
248
283
|
src/
|
|
249
284
|
├── protocol/ 零依赖库:不碰 Cordis、不碰 HTTP、不碰 harness
|
|
250
|
-
│ ├── wire.ts A2A
|
|
251
|
-
│ ├──
|
|
285
|
+
│ ├── wire.ts A2A v1.0 词汇表:只有一种形状,不需要翻译
|
|
286
|
+
│ ├── parse.ts 入站解析与方法表
|
|
252
287
|
│ ├── jsonrpc.ts 信封框架与 A2A 错误码
|
|
253
288
|
│ ├── card.ts Agent Card 构造
|
|
254
289
|
│ └── sse.ts SSE 帧编码
|
|
@@ -278,9 +313,9 @@ src/
|
|
|
278
313
|
```sh
|
|
279
314
|
pnpm install
|
|
280
315
|
pnpm typecheck
|
|
281
|
-
pnpm test #
|
|
316
|
+
pnpm test # 10 个文件共 167 项测试
|
|
282
317
|
pnpm serve # 启动监听服务
|
|
283
|
-
pnpm probe # 对运行中的服务执行
|
|
318
|
+
pnpm probe # 对运行中的服务执行 67 项检查
|
|
284
319
|
pnpm build # 产出 lib/
|
|
285
320
|
```
|
|
286
321
|
|
|
@@ -293,8 +328,8 @@ pnpm build # 产出 lib/
|
|
|
293
328
|
|
|
294
329
|
官方项目提供 agent 运行时、插件系统,以及本插件所消费的各个能力接缝。本项目提供:
|
|
295
330
|
|
|
296
|
-
- 入站的 A2A
|
|
297
|
-
- Agent Card
|
|
331
|
+
- 入站的 A2A v1.0 JSON-RPC 绑定
|
|
332
|
+
- Agent Card 构造与入站请求解析
|
|
298
333
|
- A2A task 与 harness turn 之间的映射
|
|
299
334
|
- 按 peer 的认证、隔离与工作目录策略
|
|
300
335
|
|
|
@@ -306,7 +341,7 @@ harness 处于 pre-release 阶段,不承诺跨重命名或重新打包的兼
|
|
|
306
341
|
扫码加入微信群 **A2A 产品应用和探索** —— 交流 A2A 的实际应用,也包括这个插件。
|
|
307
342
|
|
|
308
343
|
<p align="center">
|
|
309
|
-
<img src="assets/community-wechat.jpg" alt="微信群二维码" width="280">
|
|
344
|
+
<img src="https://raw.githubusercontent.com/huangjuhua-aigc/dsh-a2a/main/assets/community-wechat.jpg" alt="微信群二维码" width="280">
|
|
310
345
|
</p>
|
|
311
346
|
|
|
312
347
|
若二维码已过期,欢迎提 issue,我们会更新。
|
package/lib/config.d.ts
CHANGED
|
@@ -37,18 +37,27 @@ export interface IsolationConfig {
|
|
|
37
37
|
/** Per-peer cwd overrides, e.g. pointing one trusted peer at a real repo. */
|
|
38
38
|
peerWorkspaces: Record<string, string>;
|
|
39
39
|
}
|
|
40
|
+
/** One declared skill, as it appears on the Agent Card. */
|
|
41
|
+
export interface SkillConfig {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
description: string;
|
|
45
|
+
tags: string[];
|
|
46
|
+
}
|
|
40
47
|
/** Agent Card content and exposure. */
|
|
41
48
|
export interface CardConfig {
|
|
42
49
|
name: string;
|
|
43
50
|
description: string;
|
|
44
51
|
/** Serve the card without a credential, as discovery expects. */
|
|
45
52
|
public: boolean;
|
|
46
|
-
skills:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
skills: SkillConfig[];
|
|
54
|
+
/**
|
|
55
|
+
* Skills revealed only through `GetExtendedAgentCard`, after a peer has
|
|
56
|
+
* authenticated. Declaring any turns on `capabilities.extendedAgentCard`;
|
|
57
|
+
* leaving this empty means the deployment has no extended card, and the
|
|
58
|
+
* method answers with the spec's own ExtendedAgentCardNotConfiguredError.
|
|
59
|
+
*/
|
|
60
|
+
extendedSkills: SkillConfig[];
|
|
52
61
|
provider?: {
|
|
53
62
|
organization: string;
|
|
54
63
|
url: string;
|
|
@@ -77,7 +86,6 @@ export interface PushConfig {
|
|
|
77
86
|
export interface A2AServerConfig {
|
|
78
87
|
basePath: string;
|
|
79
88
|
publicUrl?: string;
|
|
80
|
-
protocolVersion: string;
|
|
81
89
|
/**
|
|
82
90
|
* Provider route for every agent this server creates. Optional so another
|
|
83
91
|
* `agent/request` listener may supply the target instead; a runnable
|
package/lib/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAQ7C,6DAA6D;AAC7D,MAAM,WAAW,UAAU;IACzB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,aAAa,EAAE,UAAU,GAAG,QAAQ,CAAA;IACpC,4EAA4E;IAC5E,aAAa,EAAE,MAAM,CAAA;IACrB,6EAA6E;IAC7E,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACvC;AAED,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAQ7C,6DAA6D;AAC7D,MAAM,WAAW,U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AkB,EAAE,MAAM,CAAA;IAC1B,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,OAAO,GAAG,WAAW,CAAA;IAC/B,cAAc,EAAE,MAAM,CAAA;IACtB,gBAAgB,EAAE,MAAM,CAAA;IACxB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,SAAS,EAAE,eAAe,CAAA;IAC1B,IAAI,EAAE,UAAU,CAAA;CACjB;AAcD,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,eAAe,CAoDzC,CAAA;AAEF,oEAAoE;AACpE,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CA4BlE"}
|
package/lib/config.js
CHANGED
|
@@ -28,7 +28,6 @@ const PEER_NAME = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
|
|
|
28
28
|
export const Config = Schema.object({
|
|
29
29
|
basePath: Schema.string().default('/a2a'),
|
|
30
30
|
publicUrl: Schema.string(),
|
|
31
|
-
protocolVersion: Schema.string().default('0.3.0'),
|
|
32
31
|
provider: Schema.string(),
|
|
33
32
|
model: Schema.string(),
|
|
34
33
|
card: Schema.object({
|
|
@@ -41,6 +40,12 @@ export const Config = Schema.object({
|
|
|
41
40
|
description: Schema.string().default(''),
|
|
42
41
|
tags: Schema.array(Schema.string()).default([]),
|
|
43
42
|
})).default([]),
|
|
43
|
+
extendedSkills: Schema.array(Schema.object({
|
|
44
|
+
id: Schema.string().required(),
|
|
45
|
+
name: Schema.string().required(),
|
|
46
|
+
description: Schema.string().default(''),
|
|
47
|
+
tags: Schema.array(Schema.string()).default([]),
|
|
48
|
+
})).default([]),
|
|
44
49
|
// Both members default rather than being required: schemastery instantiates
|
|
45
50
|
// a nested object even when the deployment omits it, so a `required()` here
|
|
46
51
|
// would make an absent `provider` a validation failure.
|
package/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAE7C,0EAA0E;AAC1E,MAAM,cAAc,GAAG,0BAA0B,CAAA;AAEjD,6EAA6E;AAC7E,MAAM,SAAS,GAAG,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAE7C,0EAA0E;AAC1E,MAAM,cAAc,GAAG,0BAA0B,CAAA;AAEjD,6EAA6E;AAC7E,MAAM,SAAS,GAAG,6BAA6B,CAAA;AAqG/C;;;;;;;;;;GAUG;AAEH,MAAM,CAAC,MAAM,MAAM,GAA4B,MAAM,CAAC,MAAM,CAAC;IAC3D,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;IACzC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE;IAC1B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;IACzB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE;IAEtB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC;QAC5C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,8CAA8C,CAAC;QACpF,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;QACtC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;YACjC,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;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-
*
|
|
4
|
+
* Publishes an Agent Card at a well-known URI and serves the A2A v1.0 JSON-RPC
|
|
5
|
+
* binding, so any compliant peer that knows this deployment's URL can discover
|
|
6
|
+
* it and submit tasks to a harness agent. There is no outbound client: this
|
|
7
|
+
* plugin never connects to another agent.
|
|
8
|
+
*
|
|
9
|
+
* v1.0 is the ONLY protocol version served. The v0.3 method names, `kind`
|
|
10
|
+
* discriminators, and lowercase enums are gone rather than aliased: a reply
|
|
11
|
+
* this server produces is v1.0 JSON, and a v0.3 client could not read it, so
|
|
12
|
+
* answering a v0.3 request would fail further from its cause than refusing it.
|
|
8
13
|
*
|
|
9
14
|
* It is a TRANSPORT ADAPTER, not a capability seam — the same self-limitation
|
|
10
15
|
* `dsh-acp` states. It exposes no editor navigation, transcript replay,
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAelD,OAAO,EAAwB,MAAM,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAA;AAehF,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,YAAY,EAAE,eAAe,EAAE,CAAA;AAE/B,eAAO,MAAM,IAAI,eAAe,CAAA;AAEhC;;;;;GAKG;AACH,eAAO,MAAM,MAAM,UAAyC,CAAA;AAW5D;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,CA6gBjE"}
|