@amaster.ai/dsh-a2a 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 +2 -2
- package/lib/bridge.js +1 -1
- package/lib/executor.js +3 -1
- package/lib/translator.js +7 -5
- package/lib/types/translator.d.ts +7 -5
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ Disabled by default. Configure via the profile's `cordis.patch.yml`:
|
|
|
57
57
|
- **Agents are full preset citizens.** Each task's agent is created with the deployment's default model selection (`agentDefaultModel`) and mounts its agent preset (the web profile keeps all tools inside presets — without one the agent would see an empty tool catalog). `agent.preset` pins a specific preset.
|
|
58
58
|
- **Streaming aggregation.** Text deltas of a turn share one `messageId`, so clients accumulate them into a single message; reasoning deltas ride a separate `messageId` and are marked `metadata.dshAgent.kind: 'thought'`. The turn-final event's message carries the full assembled text, so blocking `SendMessage` clients read the answer from `result.task.status.message`. Tool calls/results are data parts marked `tool-call` / `tool-result`; token usage lands in `metadata.usage` of the final event. A2A 1.0 has no `final` flag — terminal and interrupted states close the stream.
|
|
59
59
|
- **Text-only boundary** for now: `SendMessage` rejects messages with non-text parts (file/url/data) with a failed task.
|
|
60
|
-
- **No approval bridge**: dsh
|
|
60
|
+
- **No approval bridge**: dsh 0.1.2 ships the mid-turn approval seam only as the optional `dsh-user-approval` package, which headless profiles do not compose, so tools that would ask are governed by the profile's own approval setup; the A2A side never enters a mid-turn `input-required`.
|
|
61
61
|
- **One in-flight message per task** is the supported flow (send the next message after the turn-final event). dsh serializes queued follow-ups into successive turns, but concurrent requests share one event bus — a second in-flight request may resolve with the first turn's final event.
|
|
62
62
|
- **Restart**: persisted task shells survive in Redis/GCS, but live agents do not — continuing after a restart starts a fresh session (a client-supplied `contextId` names it).
|
|
63
63
|
|
|
@@ -75,7 +75,7 @@ dsh ships **no authentication or authorization**. The server binds `127.0.0.1` b
|
|
|
75
75
|
|
|
76
76
|
## Compatibility
|
|
77
77
|
|
|
78
|
-
Pinned dsh/cordis versions live in the [root compat matrix](../../README.md#compatibility). Event payloads ride pre-release dsh APIs (`@deepseek-ai/dsh-{agent,session,llm}@0.1.
|
|
78
|
+
Pinned dsh/cordis versions live in the [root compat matrix](../../README.md#compatibility). Event payloads ride pre-release dsh APIs (`@deepseek-ai/dsh-{agent,session,llm}@0.1.2-rc.1`) — check the `TODO(verify)` markers in `src/` before upgrading dsh.
|
|
79
79
|
|
|
80
80
|
## License
|
|
81
81
|
|
package/lib/bridge.js
CHANGED
|
@@ -77,7 +77,7 @@ export class A2aBridge {
|
|
|
77
77
|
// the agent's installed model selection (dsh-agent-loop's variables read
|
|
78
78
|
// agent.options; the scoped waterfalls wire provider/model into prompt
|
|
79
79
|
// assembly and the request config). Verified against
|
|
80
|
-
// @deepseek-ai/dsh-headless@0.1.
|
|
80
|
+
// @deepseek-ai/dsh-headless@0.1.2-rc.1's run() — entry points are
|
|
81
81
|
// expected to resolve the deployment default themselves.
|
|
82
82
|
setup: selection || agentPreset
|
|
83
83
|
? async (agentCtx) => {
|
package/lib/executor.js
CHANGED
|
@@ -82,7 +82,9 @@ function taskEvent(taskId, contextId, state, extra = {}) {
|
|
|
82
82
|
}
|
|
83
83
|
// TODO(verify): non-text parts (file/raw/url/data) — dsh supports image
|
|
84
84
|
// content blocks; map them when a client needs it. The confirmation data-part
|
|
85
|
-
// protocol ({callId, outcome})
|
|
85
|
+
// protocol ({callId, outcome}) maps onto the optional dsh-user-approval
|
|
86
|
+
// service (0.1.2+, asks carry the exact tool call) — bridge it once a
|
|
87
|
+
// deployment composes that service.
|
|
86
88
|
function extractText(message) {
|
|
87
89
|
const nonText = message.parts.filter((part) => part.content?.$case !== 'text');
|
|
88
90
|
if (nonText.length > 0) {
|
package/lib/translator.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* deliberately free of cordis/HTTP concerns so the mapping is unit-testable
|
|
6
6
|
* without a harness. The mapping ports the source project's
|
|
7
7
|
* `packages/a2a-server/src/agent/task.ts` event switch onto dsh's
|
|
8
|
-
* `SessionEventMap` (verified against @deepseek-ai/dsh-session@0.1.
|
|
8
|
+
* `SessionEventMap` (verified against @deepseek-ai/dsh-session@0.1.2-rc.1),
|
|
9
9
|
* emitting the A2A 1.0 data model (@a2a-js/sdk 1.1.0):
|
|
10
10
|
*
|
|
11
11
|
* turn/start → statusUpdate(WORKING), ids rotate
|
|
@@ -30,10 +30,12 @@
|
|
|
30
30
|
* A2A 1.0 removed the `final` flag: the SDK's event queue stops on terminal
|
|
31
31
|
* and interrupted (input-required) states, which is exactly the set above.
|
|
32
32
|
*
|
|
33
|
-
* dsh
|
|
34
|
-
* dsh-user-approval package
|
|
35
|
-
*
|
|
36
|
-
* exists here. TODO(verify)
|
|
33
|
+
* dsh 0.1.2 ships the approval seam as the optional
|
|
34
|
+
* @deepseek-ai/dsh-user-approval package (the `ctx.approval` service), but
|
|
35
|
+
* headless profiles do not compose it and `tools/pre-execute`'s `ask` fails
|
|
36
|
+
* closed without one, so no approval bridge exists here. TODO(verify):
|
|
37
|
+
* bridge approval asks to A2A input-required once a deployment composes the
|
|
38
|
+
* service.
|
|
37
39
|
*/
|
|
38
40
|
import { randomUUID } from 'node:crypto';
|
|
39
41
|
import { Role, TaskState } from '@a2a-js/sdk';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* deliberately free of cordis/HTTP concerns so the mapping is unit-testable
|
|
6
6
|
* without a harness. The mapping ports the source project's
|
|
7
7
|
* `packages/a2a-server/src/agent/task.ts` event switch onto dsh's
|
|
8
|
-
* `SessionEventMap` (verified against @deepseek-ai/dsh-session@0.1.
|
|
8
|
+
* `SessionEventMap` (verified against @deepseek-ai/dsh-session@0.1.2-rc.1),
|
|
9
9
|
* emitting the A2A 1.0 data model (@a2a-js/sdk 1.1.0):
|
|
10
10
|
*
|
|
11
11
|
* turn/start → statusUpdate(WORKING), ids rotate
|
|
@@ -30,10 +30,12 @@
|
|
|
30
30
|
* A2A 1.0 removed the `final` flag: the SDK's event queue stops on terminal
|
|
31
31
|
* and interrupted (input-required) states, which is exactly the set above.
|
|
32
32
|
*
|
|
33
|
-
* dsh
|
|
34
|
-
* dsh-user-approval package
|
|
35
|
-
*
|
|
36
|
-
* exists here. TODO(verify)
|
|
33
|
+
* dsh 0.1.2 ships the approval seam as the optional
|
|
34
|
+
* @deepseek-ai/dsh-user-approval package (the `ctx.approval` service), but
|
|
35
|
+
* headless profiles do not compose it and `tools/pre-execute`'s `ask` fails
|
|
36
|
+
* closed without one, so no approval bridge exists here. TODO(verify):
|
|
37
|
+
* bridge approval asks to A2A input-required once a deployment composes the
|
|
38
|
+
* service.
|
|
37
39
|
*/
|
|
38
40
|
import { type Message } from '@a2a-js/sdk';
|
|
39
41
|
import { type AgentExecutionEvent } from '@a2a-js/sdk/server';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amaster.ai/dsh-a2a",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A2A protocol (JSON-RPC + SSE) server plugin for DeepSeek Harness: expose dsh agents as A2A agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
41
|
-
"@deepseek-ai/dsh-agent": "0.1.
|
|
42
|
-
"@deepseek-ai/dsh-llm": "0.1.
|
|
43
|
-
"@deepseek-ai/dsh-session": "0.1.
|
|
41
|
+
"@deepseek-ai/dsh-agent": "0.1.2-rc.1",
|
|
42
|
+
"@deepseek-ai/dsh-llm": "0.1.2-rc.1",
|
|
43
|
+
"@deepseek-ai/dsh-session": "0.1.2-rc.1",
|
|
44
44
|
"@google-cloud/storage": "^7.0.0",
|
|
45
45
|
"ioredis": "^5.0.0"
|
|
46
46
|
},
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
57
|
-
"@deepseek-ai/dsh-agent": "0.1.
|
|
58
|
-
"@deepseek-ai/dsh-llm": "0.1.
|
|
59
|
-
"@deepseek-ai/dsh-session": "0.1.
|
|
57
|
+
"@deepseek-ai/dsh-agent": "0.1.2-rc.1",
|
|
58
|
+
"@deepseek-ai/dsh-llm": "0.1.2-rc.1",
|
|
59
|
+
"@deepseek-ai/dsh-session": "0.1.2-rc.1",
|
|
60
60
|
"@google-cloud/storage": "^7.0.0",
|
|
61
61
|
"@types/express": "^4.17.21",
|
|
62
62
|
"@types/node": "^22.0.0",
|