@deepseek-ai/dsh-sdk-protocol 0.0.1-rc.1 → 0.0.1-rc.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
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
- # pnpm run verify-translation-pairing --write packages/scaffold/protocol/README.md
5
- README.md: 88a48957d0d44cec9f776d31eab7d25bd353de5f
6
- README.zh.md: 6618d8838a00f945c79d7ec24b1e7491df08a3f1
4
+ # pnpm run verify-translation-pairing --write packages/sdk/protocol/README.md
5
+ README.md: 9024f9ca34a5467aff1b83cb9cd864c1ec06e56b
6
+ README.zh.md: ffd67552a770561320f919eec95679681fadbe0d
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [中文](README.zh.md)
4
4
 
5
- The shared wire protocol for the DeepSeek Harness SDK runtime: one newline-delimited JSON-RPC 2.0 transport class plus the named request, result, and notification types both wire ends speak. The package root enumerates the protocol consumer interface; source modules are not exported as deep imports. The server side is the [`dsh-jsonrpc`](../server/README.md) plugin; clients are [`dsh-sdk-client`](../client/README.md) (TypeScript) and the [Python SDK](../../../python/README.md) (which mirrors these shapes but does not import them). A pure library — no plugin, no Config, no registration.
5
+ The shared wire protocol for the DeepSeek Harness SDK runtime: one newline-delimited JSON-RPC 2.0 transport class plus the named request, result, and notification types both wire ends speak. The package root enumerates the protocol consumer interface; source modules are not exported as deep imports. The server side is the [`dsh-sdk-jsonrpc-server`](../server/README.md) plugin; clients are [`dsh-sdk-client`](../client/README.md) (TypeScript) and the [Python SDK](../../../python/README.md) (which mirrors these shapes but does not import them). A pure library — no plugin, no Config, no registration.
6
6
 
7
7
  ## Transport
8
8
 
@@ -10,7 +10,7 @@ The shared wire protocol for the DeepSeek Harness SDK runtime: one newline-delim
10
10
 
11
11
  ## Wire types
12
12
 
13
- `types.ts` names every payload of the protocol served by `HarnessSdkServer`:
13
+ `types.ts` names every payload of the protocol served by `HarnessSdkJsonRpcServer`:
14
14
 
15
15
  | Direction | Method | Types |
16
16
  |---|---|---|
@@ -22,11 +22,11 @@ The shared wire protocol for the DeepSeek Harness SDK runtime: one newline-delim
22
22
  | server→client | `subagent.started` | `SubagentStartedNotification` |
23
23
  | server→client | `subagent.finished` | `SubagentFinishedNotification` (in-process runs only) |
24
24
 
25
- `HarnessSdkRequestMap` and `HarnessSdkNotificationMap` index these by method name. `SessionPromptResult.messageId` identifies the queued `UserMessage`; it does not identify a later assistant message, turn ending, or prompt result. Clients combine the open-ended `session.event` stream with agent-wide `session.status` according to their own activity ownership. `InitializeParams.maxTokens` is an optional positive safe integer that caps each conversation-model output for SDK-created agents and their in-process descendants; omission allows the selected adapter's exact-model default to apply, or otherwise preserves provider behavior. The notification payload types depend on `SessionEvent` (`dsh-session`), `ContentBlock` (`dsh-llm`), and `SubagentStopReason` (`dsh-subagent`) — the protocol streams full session-log envelopes, so the session vocabulary is part of the wire contract. `serverInfo.name` stays the wire-stable `deepseek-harness-sdk-runtime`.
25
+ `HarnessSdkRequestMap` and `HarnessSdkNotificationMap` index these by method name. `SessionPromptResult.messageId` identifies the queued `UserMessage`; it does not identify a later assistant message, turn ending, or prompt result. Clients combine the open-ended `session.event` stream with agent-wide `session.status` according to their own activity ownership. `SubagentFinishedNotification.lastAssistantMessage` contains the child's last non-empty assistant message or, when no such message exists, its accumulated assistant text; the field is absent when the child produced neither. `InitializeParams.maxTokens` is an optional positive safe integer that caps each conversation-model output for SDK-created agents and their in-process descendants; omission allows the selected adapter's exact-model default to apply, or otherwise preserves provider behavior. The notification payload types depend on `SessionEvent` (`dsh-session`), `ContentBlock` (`dsh-llm`), and `SubagentStopReason` (`dsh-subagent`) — the protocol streams full session-log envelopes, so the session vocabulary is part of the wire contract. `serverInfo.name` stays the wire-stable `deepseek-harness-sdk-runtime`.
26
26
 
27
27
  ## Model Experience
28
28
 
29
- None, as this package defines the client-facing wire protocol; the model-visible surfaces belong to the runtime plugins composed behind the serving [`dsh-jsonrpc`](../server/README.md) entry.
29
+ None, as this package defines the client-facing wire protocol; the model-visible surfaces belong to the runtime plugins composed behind the serving [`dsh-sdk-jsonrpc-server`](../server/README.md) entry.
30
30
 
31
31
  #### KV Cache effect
32
32
 
@@ -35,5 +35,5 @@ None; this package neither assembles nor sends a provider request.
35
35
  ## Known Limitations and Deferred Work
36
36
 
37
37
  - **No protocol-version negotiation** — the handshake carries only `serverInfo.version` (`0.0.1`, unvalidated by clients); pre-release stance, no compatibility promise.
38
- - **No cancel or session-close methods** — a client abandons a turn by closing the runtime process; see the [`dsh-jsonrpc` README](../server/README.md).
38
+ - **No cancel or session-close methods** — a client abandons a turn by closing the runtime process; see the [`dsh-sdk-jsonrpc-server` README](../server/README.md).
39
39
  - **Server→client requests are dead capability** — the transport supports them, but the server never sends one; the Python SDK's responder surface exists for future approval flows.
package/README.zh.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](README.md) | 中文
4
4
 
5
- DeepSeek Harness SDK 运行时的共享协议格式(wire format):一个按换行分帧的 JSON-RPC 2.0 传输类,加上协议两端共同使用的具名请求、结果与通知类型。包根枚举协议消费方接口;源模块不支持深层导入。服务端是 [`dsh-jsonrpc`](../server/README.md) 插件;客户端是 [`dsh-sdk-client`](../client/README.md)(TypeScript)与 [Python SDK](../../../python/README.md)(后者复现这些结构但不导入它们)。纯库——无插件、无 Config、无注册。
5
+ DeepSeek Harness SDK 运行时的共享协议格式(wire format):一个按换行分帧的 JSON-RPC 2.0 传输类,加上协议两端共同使用的具名请求、结果与通知类型。包根枚举协议消费方接口;源模块不支持深层导入。服务端是 [`dsh-sdk-jsonrpc-server`](../server/README.md) 插件;客户端是 [`dsh-sdk-client`](../client/README.md)(TypeScript)与 [Python SDK](../../../python/README.md)(后者复现这些结构但不导入它们)。纯库——无插件、无 Config、无注册。
6
6
 
7
7
  ## 传输
8
8
 
@@ -10,7 +10,7 @@ DeepSeek Harness SDK 运行时的共享协议格式(wire format):一个按
10
10
 
11
11
  ## 协议类型
12
12
 
13
- `types.ts` 为 `HarnessSdkServer` 所服务协议的每个载荷命名:
13
+ `types.ts` 为 `HarnessSdkJsonRpcServer` 所服务协议的每个载荷命名:
14
14
 
15
15
  | 方向 | 方法 | 类型 |
16
16
  |---|---|---|
@@ -22,11 +22,11 @@ DeepSeek Harness SDK 运行时的共享协议格式(wire format):一个按
22
22
  | server→client | `subagent.started` | `SubagentStartedNotification` |
23
23
  | server→client | `subagent.finished` | `SubagentFinishedNotification`(仅进程内运行) |
24
24
 
25
- `HarnessSdkRequestMap` 与 `HarnessSdkNotificationMap` 按方法名索引这些类型。`SessionPromptResult.messageId` 标识已排队的 `UserMessage`;它不标识后续的助手消息、轮次结束或提示词结果。客户端根据自己对活动区间的所有权,组合持续开放的 `session.event` 流与 agent 级的 `session.status`。`InitializeParams.maxTokens` 是可选的正的安全整数,用于限制 SDK 创建的 agent 及其进程内后代的每次对话模型输出;省略时会应用所选适配器的确切模型默认值,否则提供方行为保持不变。通知载荷类型依赖 `SessionEvent`(`dsh-session`)、`ContentBlock`(`dsh-llm`)与 `SubagentStopReason`(`dsh-subagent`)——协议以完整会话日志封套进行流式传输,因此会话词汇是协议格式约定的一部分。`serverInfo.name` 的协议值固定为 `deepseek-harness-sdk-runtime`。
25
+ `HarnessSdkRequestMap` 与 `HarnessSdkNotificationMap` 按方法名索引这些类型。`SessionPromptResult.messageId` 标识已排队的 `UserMessage`;它不标识后续的助手消息、轮次结束或提示词结果。客户端根据自己对活动区间的所有权,组合持续开放的 `session.event` 流与 agent 级的 `session.status`。`SubagentFinishedNotification.lastAssistantMessage` 包含子 agent 最后一条非空 assistant 消息;若不存在这类消息,则包含其累积的 assistant 文本;子 agent 两种输出均未产生时,该字段缺省。`InitializeParams.maxTokens` 是可选的正的安全整数,用于限制 SDK 创建的 agent 及其进程内后代的每次对话模型输出;省略时会应用所选适配器的确切模型默认值,否则提供方行为保持不变。通知载荷类型依赖 `SessionEvent`(`dsh-session`)、`ContentBlock`(`dsh-llm`)与 `SubagentStopReason`(`dsh-subagent`)——协议以完整会话日志封套进行流式传输,因此会话词汇是协议格式约定的一部分。`serverInfo.name` 的协议值固定为 `deepseek-harness-sdk-runtime`。
26
26
 
27
27
  ## 模型体验
28
28
 
29
- 无,因为此包定义面向客户端的协议格式;模型可见接口属于组合在对外服务入口 [`dsh-jsonrpc`](../server/README.md) 后方的运行时插件。
29
+ 无,因为此包定义面向客户端的协议格式;模型可见接口属于组合在对外服务入口 [`dsh-sdk-jsonrpc-server`](../server/README.md) 后方的运行时插件。
30
30
 
31
31
  #### KV Cache 影响
32
32
 
@@ -35,5 +35,5 @@ DeepSeek Harness SDK 运行时的共享协议格式(wire format):一个按
35
35
  ## 已知限制与暂缓事项
36
36
 
37
37
  - **无协议版本协商**——握手只携带 `serverInfo.version`(`0.0.1`,客户端不校验);处于预发布阶段,无兼容承诺。
38
- - **无取消与会话关闭方法**——客户端放弃轮次的方式是关闭运行时进程;见 [`dsh-jsonrpc` README](../server/README.md)。
38
+ - **无取消与会话关闭方法**——客户端放弃轮次的方式是关闭运行时进程;见 [`dsh-sdk-jsonrpc-server` README](../server/README.md)。
39
39
  - **server→client 请求是未使用的功能**——传输层支持,但服务器从不发送;Python SDK 的应答接口为未来审批流程预留。
@@ -2,7 +2,7 @@
2
2
  * Shared wire protocol for the DeepSeek Harness SDK runtime: the
3
3
  * newline-delimited JSON-RPC stdio transport plus the named request, result,
4
4
  * and notification types both wire ends speak. The runtime server plugin
5
- * (`@deepseek-ai/dsh-jsonrpc`) serves this protocol; SDK clients
5
+ * (`@deepseek-ai/dsh-sdk-jsonrpc-server`) serves this protocol; SDK clients
6
6
  * (`@deepseek-ai/dsh-sdk-client`, the Python SDK) drive it.
7
7
  *
8
8
  * @module @deepseek-ai/dsh-sdk-protocol
@@ -2,7 +2,7 @@
2
2
  * Named wire types for the DeepSeek Harness SDK runtime protocol: the three
3
3
  * request/result pairs and the four server-to-client notification payloads
4
4
  * exchanged over the newline-delimited JSON-RPC stdio transport. The server
5
- * plugin (`@deepseek-ai/dsh-jsonrpc`) and SDK clients share these shapes;
5
+ * plugin (`@deepseek-ai/dsh-sdk-jsonrpc-server`) and SDK clients share these shapes;
6
6
  * `serverInfo.name` stays the wire-stable `deepseek-harness-sdk-runtime`.
7
7
  *
8
8
  * @module @deepseek-ai/dsh-sdk-protocol/types
@@ -16,7 +16,7 @@ export interface InitializeParams {
16
16
  cwd: string;
17
17
  /** Provider route every SDK-created agent runs on. */
18
18
  provider: string;
19
- /** Model name every SDK-created agent runs on (the server may mount a fallback adapter; see `HarnessSdkServer.initialize`). */
19
+ /** Model name every SDK-created agent runs on (the server may mount a fallback adapter; see `HarnessSdkJsonRpcServer.initialize`). */
20
20
  model: string;
21
21
  /** Optional positive output-token cap inherited by SDK-created agents and their in-process descendants. */
22
22
  maxTokens?: number;
@@ -78,7 +78,7 @@ export interface SubagentFinishedNotification {
78
78
  status: SdkRunStatus;
79
79
  /** The provider-reported stop reason. */
80
80
  stopReason: SubagentStopReason;
81
- /** The child's final assistant message, when it produced one. */
81
+ /** The child's selected assistant output; absent when the child produced none. */
82
82
  lastAssistantMessage?: ContentBlock[];
83
83
  }
84
84
  /** Server-to-client notifications by JSON-RPC method name. */
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-sdk-protocol",
3
3
  "description": "Shared wire protocol for the DeepSeek Harness SDK runtime: the newline-delimited JSON-RPC stdio transport and the named request, result, and notification types spoken between the runtime server and SDK clients",
4
- "version": "0.0.1-rc.1",
4
+ "version": "0.0.1-rc.5",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
11
- "directory": "packages/scaffold/protocol"
11
+ "directory": "packages/sdk/protocol"
12
12
  },
13
13
  "type": "module",
14
14
  "main": "lib/index.js",
@@ -31,17 +31,17 @@
31
31
  ],
32
32
  "license": "BSD-3-Clause",
33
33
  "peerDependencies": {
34
- "@deepseek-ai/dsh-llm": "^0.0.1-rc.1",
35
- "@deepseek-ai/dsh-session": "^0.0.1-rc.1",
36
- "@deepseek-ai/dsh-subagent": "^0.0.1-rc.1",
37
- "@deepseek-ai/cordis": "^4.0.1-rc.1",
38
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1"
34
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.5",
35
+ "@deepseek-ai/dsh-llm": "^0.0.1-rc.5",
36
+ "@deepseek-ai/dsh-subagent": "^0.0.1-rc.5",
37
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.5",
38
+ "@deepseek-ai/cordis": "^4.0.1-rc.4"
39
39
  },
40
40
  "devDependencies": {
41
- "@deepseek-ai/dsh-session": "^0.0.1-rc.1",
42
- "@deepseek-ai/dsh-llm": "^0.0.1-rc.1",
43
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
44
- "@deepseek-ai/dsh-subagent": "^0.0.1-rc.1",
45
- "@deepseek-ai/cordis": "^4.0.1-rc.1"
41
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.5",
42
+ "@deepseek-ai/dsh-llm": "^0.0.1-rc.5",
43
+ "@deepseek-ai/dsh-subagent": "^0.0.1-rc.5",
44
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.5",
45
+ "@deepseek-ai/cordis": "^4.0.1-rc.4"
46
46
  }
47
47
  }