@deepseek-ai/dsh-sdk-jsonrpc-server 0.1.5-rc.2 → 0.1.6-alpha.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.i18n.yaml +2 -2
- package/README.md +1 -1
- package/README.zh.md +8 -8
- package/lib/index.js +1 -1
- package/package.json +22 -22
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/sdk/server/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 3598fc38c16b6c2387169c121eb88c0c0d45f7a5
|
|
6
|
+
README.zh.md: 9fb80288c1fdee5ada86a3a2a419e4466e7e54da
|
package/README.md
CHANGED
|
@@ -75,7 +75,7 @@ The plugin is a thin presentation adapter: [`HarnessSdkJsonRpcServer`](src/serve
|
|
|
75
75
|
|
|
76
76
|
### Request flow
|
|
77
77
|
|
|
78
|
-
Each protocol method validates its inputs and resolves the owning state before acting — `initialize` stores the SDK route, `session/prompt` resolves the live agent+session pair and queues the message, and `shutdown` disposes
|
|
78
|
+
Each protocol method validates its inputs and resolves the owning state before acting — `initialize` stores the SDK route, `session/prompt` resolves the live agent+session pair and queues the message, and `shutdown` flushes the response, then disposes the root context to quiescence before exiting 0 — and a shared exit task guarantees that racing `shutdown` requests never dispose or exit twice. The dispatch lives in [src/index.ts](src/index.ts) and [src/server.ts](src/server.ts).
|
|
79
79
|
|
|
80
80
|
### Teardown
|
|
81
81
|
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
`dsh-sdk-jsonrpc-server` 通过 stdio 服务 SDK
|
|
12
|
+
`dsh-sdk-jsonrpc-server` 通过 stdio 服务 SDK 协议格式(wire format),使进程外客户端能够驱动 harness agent(智能体):它为每个 `sessionId` 打开一个会话、把用户提示词排入队列,并把每个会话事件与 agent 状态转换流式发回客户端。把它作为 `jsonrpc` 插件挂载到 Loader 组合中;外围插件树提供其余一切——agent、模型适配器、持久化与工具。Stdout 只承载 JSON-RPC 帧,因此部署不得组合 stdout logger。它通过 dispose(资源释放)根运行时并以 0 退出应答 `shutdown`;EOF 与信号退出归 app bin 负责。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -29,13 +29,13 @@ kind: "package-reference"
|
|
|
29
29
|
|
|
30
30
|
### 组装
|
|
31
31
|
|
|
32
|
-
插件在首次使用时为每个 `sessionId` 创建一个 agent
|
|
32
|
+
插件在首次使用时为每个 `sessionId` 创建一个 agent。已注册的模型适配器优先用于该路由;尚无适配器负责的 `deepseek-official` 路由会挂载 DeepSeek 适配器,任何其他尚无适配器负责的提供方都会导致初始化失败。初始化成功前,所选适配器会解析确切模型与可选推理强度。
|
|
33
33
|
|
|
34
34
|
### 配置
|
|
35
35
|
|
|
36
36
|
| 字段 | 默认值 | 含义 |
|
|
37
37
|
|---|---|---|
|
|
38
|
-
| `maxTokensAsSuccess` | `false` | 把 max-token
|
|
38
|
+
| `maxTokensAsSuccess` | `false` | 把 max-token 轮次或 subagent 终止报告为成功的 SDK 结果 |
|
|
39
39
|
|
|
40
40
|
profile 组合拥有每个根 agent 的工具。`input`、`output` 与 `exit` 是仅供测试的运行时传输钩子;生产环境使用进程 stdio 与 `process.exit`。生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-sdk-jsonrpc-server)是每个受支持字段的穷尽式真源。
|
|
41
41
|
|
|
@@ -63,19 +63,19 @@ Stdout 只承载 JSON-RPC 帧,客户端可以逐字节解析;诊断信息应
|
|
|
63
63
|
|
|
64
64
|
### 设计理念
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
本插件是轻量的展示适配器:[`HarnessSdkJsonRpcServer`](src/server.ts) 负责协议方法与通知,传输与具名协议类型来自 `dsh-sdk-protocol`,与客户端 SDK 共享。它订阅会话、agent 与 subagent 生命周期事件,并把它们作为协议通知转发;只有当服务在生命周期建立快照时记录的 `local` 标志为 true 时才转发 subagent 完成事件——提供方名称、子级 id 与持久化谱系均不能证明本地性。
|
|
67
67
|
|
|
68
68
|
### 源码地图
|
|
69
69
|
|
|
70
70
|
| 文件 | 职责 |
|
|
71
71
|
|---|---|
|
|
72
|
-
| [`src/index.ts`](src/index.ts) | 插件入口:`Config` schema、stdio
|
|
72
|
+
| [`src/index.ts`](src/index.ts) | 插件入口:`Config` schema、stdio 接线、请求分发、共享关闭与退出任务 |
|
|
73
73
|
| [`src/server.ts`](src/server.ts) | `HarnessSdkJsonRpcServer`:协议方法、逐会话 agent 创建、生命周期订阅、清理 |
|
|
74
|
-
| — |
|
|
74
|
+
| — | 不发布运行时不变式伴生入口;此展示适配器不拥有包内持久事件流;边界与回放测试覆盖协议映射。 |
|
|
75
75
|
|
|
76
76
|
### 请求流程
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
每个协议方法在执行前都会校验输入并解析负责该请求的状态——`initialize` 保存 SDK 路由,`session/prompt` 解析存活的 agent 与会话配对并排入消息,`shutdown` 刷新响应,再 dispose 根上下文使其达到完全停稳,最后以 0 退出——共享退出任务确保竞争的 `shutdown` 请求绝不会重复 dispose 或退出。分发逻辑位于 [src/index.ts](src/index.ts) 与 [src/server.ts](src/server.ts)。
|
|
79
79
|
|
|
80
80
|
### 清理
|
|
81
81
|
|
|
@@ -133,6 +133,6 @@ Stdout 只承载 JSON-RPC 帧,客户端可以逐字节解析;诊断信息应
|
|
|
133
133
|
<details>
|
|
134
134
|
<summary>维护者的工作上下文——点击展开</summary>
|
|
135
135
|
|
|
136
|
-
本开发备注是维护者的工作上下文,明确不具权威性——已交付的行为与限制见上文各节与代码。单文件可执行运行时分发将本插件与打包的 `jsonrpc-demo` bin
|
|
136
|
+
本开发备注是维护者的工作上下文,明确不具权威性——已交付的行为与限制见上文各节与代码。单文件可执行运行时分发将本插件与打包的 `jsonrpc-demo` bin 配对;请让关闭与退出约定与负责 EOF 和信号退出的 app bin 保持一致。没有记录其他未解决的开放设计问题。
|
|
137
137
|
|
|
138
138
|
</details>
|
package/lib/index.js
CHANGED
|
@@ -116,7 +116,7 @@ var HarnessSdkJsonRpcServer = class {
|
|
|
116
116
|
const reasoningEffort = params.reasoningEffort === void 0 ? void 0 : ReasoningEffortId(params.reasoningEffort);
|
|
117
117
|
if (!this.hasAdapterFor(provider)) {
|
|
118
118
|
if (provider !== "deepseek-official") throw new Error(`no adapter registered for provider "${provider}"`);
|
|
119
|
-
this.llmFiber = await this.ctx.plugin(LlmDeepSeek
|
|
119
|
+
this.llmFiber = await this.ctx.plugin(LlmDeepSeek);
|
|
120
120
|
}
|
|
121
121
|
await this.ctx.get("llm").resolveCallConfig({
|
|
122
122
|
provider,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-sdk-jsonrpc-server",
|
|
3
3
|
"description": "Stdio JSON-RPC server plugin for out-of-process DeepSeek Harness SDK clients",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,34 +27,34 @@
|
|
|
27
27
|
],
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@deepseek-ai/dsh-brand": "^0.1.
|
|
30
|
+
"@deepseek-ai/dsh-brand": "^0.1.6-alpha.1",
|
|
31
31
|
"@deepseek-ai/schemastery": "^3.18.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
35
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
36
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
37
|
-
"@deepseek-ai/dsh-
|
|
38
|
-
"@deepseek-ai/dsh-
|
|
39
|
-
"@deepseek-ai/dsh-
|
|
40
|
-
"@deepseek-ai/dsh-
|
|
41
|
-
"@deepseek-ai/dsh-
|
|
42
|
-
"@deepseek-ai/dsh-
|
|
35
|
+
"@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
|
|
36
|
+
"@deepseek-ai/dsh-llm-deepseek": "^0.1.6-alpha.1",
|
|
37
|
+
"@deepseek-ai/dsh-scope": "^0.1.6-alpha.1",
|
|
38
|
+
"@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
|
|
39
|
+
"@deepseek-ai/dsh-attachment": "^0.1.6-alpha.1",
|
|
40
|
+
"@deepseek-ai/dsh-sdk-protocol": "^0.1.6-alpha.1",
|
|
41
|
+
"@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
|
|
42
|
+
"@deepseek-ai/dsh-subagent": "^0.1.6-alpha.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
46
46
|
"@deepseek-ai/cordis-plugin-loader": "^1.0.3",
|
|
47
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
48
|
-
"@deepseek-ai/dsh-agent-loop": "^0.1.
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
52
|
-
"@deepseek-ai/dsh-llm-deepseek": "^0.1.
|
|
53
|
-
"@deepseek-ai/dsh-scope": "^0.1.
|
|
54
|
-
"@deepseek-ai/dsh-sdk-protocol": "^0.1.
|
|
55
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
56
|
-
"@deepseek-ai/dsh-session-
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-
|
|
47
|
+
"@deepseek-ai/dsh-agent-loop": "^0.1.6-alpha.1",
|
|
48
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.6-alpha.1",
|
|
49
|
+
"@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
|
|
50
|
+
"@deepseek-ai/dsh-attachment": "^0.1.6-alpha.1",
|
|
51
|
+
"@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
|
|
52
|
+
"@deepseek-ai/dsh-llm-deepseek": "^0.1.6-alpha.1",
|
|
53
|
+
"@deepseek-ai/dsh-scope": "^0.1.6-alpha.1",
|
|
54
|
+
"@deepseek-ai/dsh-sdk-protocol": "^0.1.6-alpha.1",
|
|
55
|
+
"@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
|
|
56
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.6-alpha.1",
|
|
57
|
+
"@deepseek-ai/dsh-subagent": "^0.1.6-alpha.1",
|
|
58
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.1"
|
|
59
59
|
}
|
|
60
60
|
}
|