dsh-bailinghub 0.1.1 → 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/CHANGELOG.md +16 -0
- package/PRIVACY.md +12 -0
- package/README.md +145 -59
- package/SECURITY.md +14 -1
- package/cordis.agent-client.patch.yml +8 -0
- package/docs/AGENT_CLIENT_CONTRACT.md +198 -0
- package/docs/COMPATIBILITY.md +71 -5
- package/docs/MIGRATION_VNEXT.md +106 -0
- package/docs/PROJECT_BOUNDARIES.md +25 -7
- package/docs/README.zh-CN.md +134 -49
- package/lib/index.js +53 -0
- package/lib/runtime.js +1394 -0
- package/lib/transport.js +93 -0
- package/package.json +16 -6
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Migration Boundary: Public 0.1.x to Native 0.2
|
|
2
|
+
|
|
3
|
+
There is no automatic credential, configuration, tool, or orchestration migration from public
|
|
4
|
+
`dsh-bailinghub@0.1.x` to the native 0.2 Agent Client.
|
|
5
|
+
|
|
6
|
+
## What remains unchanged
|
|
7
|
+
|
|
8
|
+
Public `dsh-bailinghub@0.1.1` is immutable. It remains a configuration-only DSH Bundle that starts
|
|
9
|
+
`bailinghub-mcp-server@0.1.1` through the in-box MCP client and exposes exactly:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
mcp__bailinghub__submit_governed_job
|
|
13
|
+
mcp__bailinghub__get_governed_job
|
|
14
|
+
mcp__bailinghub__wait_for_governed_job
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The operator supplies one Hub URL, route-scoped Client Token, and fixed route. BailingHub performs
|
|
18
|
+
the orchestration. Local DSH does not obtain a trusted Agent Session or dynamic capability catalog.
|
|
19
|
+
|
|
20
|
+
The retained [legacy patch](../cordis.patch.yml) documents that historical meaning. It is not
|
|
21
|
+
selected by the current native package metadata, and its presence is not a dual-mode switch.
|
|
22
|
+
|
|
23
|
+
## What changes in 0.2
|
|
24
|
+
|
|
25
|
+
| Concern | Public 0.1.1 | Native 0.2 |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| DSH integration | in-box MCP client | native Cordis host adapter |
|
|
28
|
+
| Core unit | governed job | conversation, run, and governed invocation |
|
|
29
|
+
| Authentication | operator Client Token | end-user browser authorization with PKCE |
|
|
30
|
+
| Tool surface | three fixed job tools | current-turn typed tools plus search/resume |
|
|
31
|
+
| Reasoning/orchestration | BailingHub route | local DSH Agent |
|
|
32
|
+
| Business identity | not established by DSH | Agent Session approved through the business boundary |
|
|
33
|
+
| Hub audit | job records | conversation, run, completion, and invocation trajectory |
|
|
34
|
+
|
|
35
|
+
The new plugin config is limited to `hubUrl`, `clientAppId`, `workspace`, and `connectionName`.
|
|
36
|
+
The old `BAILINGHUB_CLIENT_TOKEN` is not read, copied, exchanged, or converted into an Agent
|
|
37
|
+
Session. Browser authorization creates a new independently revocable credential in SDK-owned
|
|
38
|
+
secure storage.
|
|
39
|
+
|
|
40
|
+
## Safe evaluation before migration
|
|
41
|
+
|
|
42
|
+
Do not replace a working production profile merely to evaluate 0.2.0. Use a separate DSH home or
|
|
43
|
+
another isolated Web profile and verify that the CLI really honors that location.
|
|
44
|
+
|
|
45
|
+
1. Keep the existing `0.1.1` profile and its legacy environment unchanged.
|
|
46
|
+
2. Install the exact released 0.2 package into an isolated profile.
|
|
47
|
+
3. Configure only the four public native fields using neutral values for dry composition.
|
|
48
|
+
4. Run `/bailinghub login` and approve a dedicated non-production business identity/workspace.
|
|
49
|
+
5. Verify status, workspace discovery, one read, one permitted mutation, approval/resume, and Hub
|
|
50
|
+
trajectory.
|
|
51
|
+
6. Separately re-run the `0.1.1` submit and same-job follow-up against the newly released Core.
|
|
52
|
+
|
|
53
|
+
Passing the native path does not prove legacy compatibility, and passing the legacy path does not
|
|
54
|
+
prove the native Agent Client.
|
|
55
|
+
|
|
56
|
+
## Moving a profile to 0.2
|
|
57
|
+
|
|
58
|
+
Only after the isolated acceptance passes:
|
|
59
|
+
|
|
60
|
+
1. Record the exact old plugin, DSH, MCP, and Core versions without copying credentials into the
|
|
61
|
+
migration record.
|
|
62
|
+
2. Finish or cancel outstanding legacy jobs. A wait timeout is not a terminal failure.
|
|
63
|
+
3. Install the exact accepted 0.2 plugin version. Do not use an unpinned dist-tag.
|
|
64
|
+
4. Replace the legacy plugin configuration with the four native fields. Remove the old Client
|
|
65
|
+
Token from that process environment after confirming no remaining 0.1 integration uses it.
|
|
66
|
+
5. Start DSH, run `/bailinghub login`, inspect the business authorization page, and authorize the
|
|
67
|
+
intended workspace.
|
|
68
|
+
6. Run `/bailinghub status`, open a new conversation, and repeat the accepted read/mutation checks.
|
|
69
|
+
7. Confirm BailingHub receives visible conversation and invocation audit without hidden reasoning.
|
|
70
|
+
|
|
71
|
+
The developer or deployer supplies the Hub URL, public client app id, and initial workspace/route.
|
|
72
|
+
The end user completes browser authorization. Neither role supplies a business API secret or model
|
|
73
|
+
key to this plugin.
|
|
74
|
+
|
|
75
|
+
## Rollback
|
|
76
|
+
|
|
77
|
+
Rollback is explicit; it does not convert the Agent Session back into a Client Token.
|
|
78
|
+
|
|
79
|
+
1. Finish active native runs and use `/bailinghub sync` for any known pending completion.
|
|
80
|
+
2. Run `/bailinghub logout` if the new Agent Session should be revoked.
|
|
81
|
+
3. Reinstall exact `dsh-bailinghub@0.1.1` in the target profile.
|
|
82
|
+
4. Restore the separately retained legacy Hub URL, route-scoped Client Token, and route through the
|
|
83
|
+
original `BAILINGHUB_BASE_URL`, `BAILINGHUB_CLIENT_TOKEN`, and `BAILINGHUB_ROUTE` environment
|
|
84
|
+
names.
|
|
85
|
+
5. Verify the three fixed MCP tools and follow one stable `request_id`/`job_id` flow to terminal
|
|
86
|
+
state without resubmission.
|
|
87
|
+
|
|
88
|
+
Do not delete SDK credential files or Keychain entries manually as a substitute for logout. Do not
|
|
89
|
+
reuse, move, or republish an npm version or Git tag as a rollback mechanism.
|
|
90
|
+
|
|
91
|
+
## Release gates
|
|
92
|
+
|
|
93
|
+
Before any public 0.2 release:
|
|
94
|
+
|
|
95
|
+
1. The matching BailingHub Core Agent Auth/Agent API contracts are released.
|
|
96
|
+
2. The exact `bailinghub-mcp-server/sdk` version is publicly installable and has passed DTO,
|
|
97
|
+
credential, invoke/resume, and completion tests.
|
|
98
|
+
3. Installing only `dsh-bailinghub` into a clean DSH `0.1.0-rc.7` profile installs and resolves that
|
|
99
|
+
exact SDK dependency automatically.
|
|
100
|
+
4. Browser login, session isolation, dynamic tool replacement, approval recovery, visible
|
|
101
|
+
completion, and Hub trajectory pass from the packaged artifact.
|
|
102
|
+
5. Public `0.1.1` still works against the new Core through the unchanged Client API.
|
|
103
|
+
6. The maintainer explicitly selects the public version and migration story.
|
|
104
|
+
|
|
105
|
+
Do not tag or publish a future 0.2.x version until all gates pass, and do not describe release
|
|
106
|
+
validation as public adoption.
|
|
@@ -4,19 +4,37 @@ The dependency direction is one-way:
|
|
|
4
4
|
|
|
5
5
|
```text
|
|
6
6
|
dsh-bailinghub
|
|
7
|
-
-> DeepSeek Harness
|
|
8
|
-
-> bailinghub-mcp-server
|
|
9
|
-
-> BailingHub
|
|
10
|
-
->
|
|
7
|
+
-> DeepSeek Harness native Cordis lifecycle
|
|
8
|
+
-> bailinghub-mcp-server/sdk
|
|
9
|
+
-> BailingHub Agent Client Core
|
|
10
|
+
-> Core-selected business adapter and final business authorization
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
This repository owns only the DSH bundle and its compatibility evidence. It does not fork or
|
|
14
14
|
modify DeepSeek Harness, BailingHub Core, the generic MCP adapter, or a downstream business
|
|
15
15
|
system.
|
|
16
16
|
|
|
17
|
-
The integration does not
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
The integration does not grant permissions, make an approval decision, or replace the business
|
|
18
|
+
system's final authorization. It also does not govern DSH tools unrelated to the dynamic
|
|
19
|
+
BailingHub tool surface.
|
|
20
20
|
|
|
21
21
|
DeepSeek and DeepSeek Harness are names of their respective owners. This is an independent
|
|
22
22
|
community integration, not an official DeepSeek plugin or partnership.
|
|
23
|
+
|
|
24
|
+
## Public native 0.2.0
|
|
25
|
+
|
|
26
|
+
Version 0.2.0 adds a separate dependency path without reinterpreting the public static MCP path:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
DeepSeek Harness local Agent
|
|
30
|
+
-> dsh-bailinghub native Cordis host adapter
|
|
31
|
+
-> bailinghub-mcp-server/sdk
|
|
32
|
+
-> BailingHub Agent Client Core
|
|
33
|
+
-> Core-selected business adapter and final business authorization
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
This repository owns only the DSH host adaptation and compatibility evidence. DSH owns local
|
|
37
|
+
reasoning and tool orchestration; the SDK owns authorization/credentials and HTTP DTO mapping;
|
|
38
|
+
Core owns trusted identity, authorization, candidate trimming, approval, invoke/resume, knowledge
|
|
39
|
+
retrieval, and audit. The adapter does not copy Core governance or knowledge bases, establish a
|
|
40
|
+
business identity, govern unrelated DSH tools, or upload hidden reasoning.
|
package/docs/README.zh-CN.md
CHANGED
|
@@ -2,93 +2,178 @@
|
|
|
2
2
|
|
|
3
3
|
[English](../README.md) | 简体中文
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
让本地 DeepSeek Harness 智能体发现并调用由自托管 BailingHub 治理的业务能力。思考、工具
|
|
6
|
+
选择与编排留在本地 DSH;可信身份、运行时上下文、候选能力裁剪、审批、调用恢复与审计仍由
|
|
7
|
+
BailingHub 负责。
|
|
7
8
|
|
|
8
9
|
这是独立社区集成,不是 DeepSeek 官方开发、认证、合作、背书或推荐的插件。
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
> **当前稳定版本线:**`dsh-bailinghub@0.2.0` 使用下文说明的原生 Agent Client 流程。
|
|
12
|
+
> 公开 `0.1.1` 仅作为明确的静态 MCP 兼容路径继续保留。
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
## 0.2 Agent Client 的关系
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
```text
|
|
17
|
+
DeepSeek Harness 本地智能体
|
|
18
|
+
-> dsh-bailinghub 原生 Cordis 适配器
|
|
19
|
+
-> bailinghub-mcp-server/sdk
|
|
20
|
+
-> BailingHub Agent Auth + Agent API
|
|
21
|
+
-> 部署者选择的业务接入与最终业务授权
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
各层职责保持独立:
|
|
25
|
+
|
|
26
|
+
- **BailingHub Core** 负责 Agent Auth、可信业务身份、运行时上下文、知识库与记忆投影、
|
|
27
|
+
能力治理、审批、调用状态和审计记录。
|
|
28
|
+
- **`bailinghub-mcp-server/sdk`** 负责浏览器登录、PKCE、凭据存储与刷新,以及按
|
|
29
|
+
Hub/client/workspace 隔离连接和映射 HTTP DTO。
|
|
30
|
+
- **`dsh-bailinghub`** 只负责 DSH 会话、提示词、命令和动态工具生命周期,不保存凭据,
|
|
31
|
+
也不直接调用业务 API。
|
|
32
|
+
|
|
33
|
+
Agent Client 不是 BailingHub 现有的“执行器”。执行器接收中枢任务并处理必须靠近某台机器
|
|
34
|
+
完成的工作;Agent Client 则把交互式思考与编排循环放在用户本地 DSH 智能体中。
|
|
19
35
|
|
|
20
|
-
|
|
21
|
-
配置,不是模型参数;模型不能借工具参数切换 route,也不能提交管理员凭据、执行器凭据、
|
|
22
|
-
审批结论或业务系统密钥。
|
|
36
|
+
## 安装前准备
|
|
23
37
|
|
|
24
|
-
|
|
38
|
+
部署者和业务接入开发者需要先在自己的 BailingHub 中准备这些公开标识:
|
|
39
|
+
|
|
40
|
+
1. 一套可访问的 HTTPS BailingHub,并部署匹配版本的 Agent Auth 与 Agent API;
|
|
41
|
+
2. 一个公开 Agent Client 应用标识 `clientAppId`;
|
|
42
|
+
3. 至少一个允许授权的 workspace;在 Agent Client v1 中,workspace id 就是
|
|
43
|
+
BailingHub route id;
|
|
44
|
+
4. 该 route 后方已经接通业务授权页面,以及受治理的 ACC/Tool Provider 能力。
|
|
45
|
+
|
|
46
|
+
最终用户**不需要**在插件中填写业务 API 地址、业务账号密码、Tool Provider 签名密钥、
|
|
47
|
+
BailingHub Client Token 或模型提供方 Key。
|
|
48
|
+
|
|
49
|
+
## 安装 0.2 版本线
|
|
25
50
|
|
|
26
51
|
前置条件:
|
|
27
52
|
|
|
28
53
|
- Node.js `22.19.0+` 或 `24+`;
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
54
|
+
- `pnpm` 与 DeepSeek Harness `0.1.0-rc.7`;
|
|
55
|
+
- 已完成上面的 BailingHub 接入准备。
|
|
56
|
+
|
|
57
|
+
将精确稳定版本安装到 DSH Web Profile:
|
|
32
58
|
|
|
33
59
|
```bash
|
|
34
60
|
npm install --global pnpm @deepseek-ai/dsh@0.1.0-rc.7
|
|
35
|
-
dsh plugin --profile web add dsh-bailinghub@0.
|
|
61
|
+
dsh plugin --profile web add dsh-bailinghub@0.2.0
|
|
36
62
|
```
|
|
37
63
|
|
|
38
|
-
|
|
64
|
+
`dsh-bailinghub@0.2.0` 会自动安装精确兼容的 `bailinghub-mcp-server@0.2.0` 依赖。
|
|
65
|
+
DSH 用户不应该再自行猜测或单独安装某个 SDK 版本。
|
|
66
|
+
|
|
67
|
+
## 配置一个中枢连接
|
|
68
|
+
|
|
69
|
+
原生插件只有四个宿主配置字段:
|
|
70
|
+
|
|
71
|
+
| 插件字段 | 环境变量 | 含义 | 是否 Secret |
|
|
72
|
+
| --- | --- | --- | --- |
|
|
73
|
+
| `hubUrl` | `BAILINGHUB_HUB_URL` | 开发者自己部署的 BailingHub 公共 HTTPS 地址 | 否 |
|
|
74
|
+
| `clientAppId` | `BAILINGHUB_CLIENT_APP_ID` | 在该中枢注册的公共 Agent Client 应用标识 | 否 |
|
|
75
|
+
| `workspace` | `BAILINGHUB_WORKSPACE` | 初始已授权 workspace/route id | 否 |
|
|
76
|
+
| `connectionName` | `BAILINGHUB_CONNECTION_NAME` | 当前 SDK 隔离连接的本地别名 | 否 |
|
|
77
|
+
|
|
78
|
+
使用中性占位值的示例:
|
|
39
79
|
|
|
40
80
|
```bash
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export
|
|
81
|
+
export BAILINGHUB_HUB_URL='https://hub.example.com'
|
|
82
|
+
export BAILINGHUB_CLIENT_APP_ID='example-agent-client'
|
|
83
|
+
export BAILINGHUB_WORKSPACE='order_assistant'
|
|
84
|
+
export BAILINGHUB_CONNECTION_NAME='default'
|
|
44
85
|
```
|
|
45
86
|
|
|
46
|
-
|
|
87
|
+
也可以通过 DSH 的插件设置界面填写同样四个字段。不要在 Cordis Patch 中增加 Token、授权
|
|
88
|
+
页面地址、业务域名或任何凭据。
|
|
89
|
+
|
|
90
|
+
启动前检查最终合成配置:
|
|
47
91
|
|
|
48
92
|
```bash
|
|
49
93
|
dsh --profile web --dump-config
|
|
50
94
|
dsh web
|
|
51
95
|
```
|
|
52
96
|
|
|
53
|
-
|
|
54
|
-
查询同一个任务。
|
|
97
|
+
## 浏览器授权与使用
|
|
55
98
|
|
|
56
|
-
|
|
57
|
-
一次,保存返回的 `job_id`;有界等待超时后,只查询同一个任务,不要重新提交。
|
|
99
|
+
在 DSH 中依次执行:
|
|
58
100
|
|
|
59
|
-
|
|
101
|
+
```text
|
|
102
|
+
/bailinghub login
|
|
103
|
+
/bailinghub status
|
|
104
|
+
/bailinghub workspaces
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
`login` 会打开系统浏览器。业务侧授权页面负责确认当前已登录的业务身份和申请的
|
|
108
|
+
workspace,然后返回受 `state` 与 PKCE S256 保护的随机回环回调。Access Token 与 Refresh
|
|
109
|
+
Token 只进入 SDK 所有的安全存储,不会写入插件配置,也不会由命令输出。
|
|
110
|
+
|
|
111
|
+
常用命令:
|
|
112
|
+
|
|
113
|
+
| 命令 | 用途 |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| `/bailinghub login` | 在浏览器授权当前 Hub/client/workspace |
|
|
116
|
+
| `/bailinghub status` | 查看当前连接状态,但不输出凭据 |
|
|
117
|
+
| `/bailinghub workspaces` | 查看当前业务授权允许使用的 workspace |
|
|
118
|
+
| `/bailinghub use <workspace>` | 为新会话切换到另一个已授权 workspace |
|
|
119
|
+
| `/bailinghub sync` | 重试同步待处理的可见回复,不重复业务工具调用 |
|
|
120
|
+
| `/bailinghub logout` | 撤销并删除当前 Agent Session |
|
|
60
121
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
5. 等待超时不等于任务失败,不能因此重新提交一份替代任务。
|
|
122
|
+
标准 v1 登录只申请当前配置的 workspace。`use` 只有在当前 Agent Session 明确包含目标
|
|
123
|
+
workspace 时才会成功,不能借此任意切换中枢 route。当前命令始终使用这个插件实例配置的四个
|
|
124
|
+
字段,不接受连接别名选择器。连接另一套 Hub 或 route 时,应使用第二个 DSH Profile/插件实例,
|
|
125
|
+
或修改四字段并重新加载当前 Profile;设置新的 `connectionName` 后再完成浏览器授权。
|
|
66
126
|
|
|
67
|
-
|
|
127
|
+
首次验收时,新建一个 DSH 会话,先做一次只读查询,再做一次允许的修改。确认 BailingHub
|
|
128
|
+
后台能看到同一个会话、run、可见最终回复和工具调用轨迹。需要审批的能力必须在审批后恢复
|
|
129
|
+
原 invocation,不能生成替代业务调用。
|
|
68
130
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
下游业务系统仍需解析可信主体并执行最终授权;如果目标动作必须具备业务身份,而当前接入
|
|
72
|
-
路径无法建立该身份,该动作就应保持不可用或被拒绝。
|
|
131
|
+
本版本在 DSH Code Mode 下会明确降级,因为当前 Code Mode 无法安全呈现本轮动态 Schema。
|
|
132
|
+
需要执行受治理业务操作时应使用 Native Tool Mode。
|
|
73
133
|
|
|
74
|
-
|
|
75
|
-
其他工具。
|
|
134
|
+
## 安全与隐私边界
|
|
76
135
|
|
|
77
|
-
|
|
136
|
+
- 模型不能通过工具参数选择 Hub URL、workspace、身份、凭据、审批结论或能力版本;
|
|
137
|
+
- SDK 在 macOS 使用 Keychain;Linux 与其他 POSIX 系统必须显式启用安全文件回退;0.2.0
|
|
138
|
+
暂不支持 Windows Agent Session 凭据存储;
|
|
139
|
+
- BailingHub 对每次治理调用重新校验身份、scope、审批、幂等与调用状态,业务系统仍执行
|
|
140
|
+
最终权限判断;
|
|
141
|
+
- 适配器会发送 Agent Client 契约所需的可见用户输入、受治理工具参数/结果和可见最终回复,
|
|
142
|
+
但不会上传隐藏思考片段;
|
|
143
|
+
- 本插件只治理它注册的 BailingHub 工具,不会拦截 DSH 其他工具或模型提供方流量。
|
|
78
144
|
|
|
79
|
-
|
|
80
|
-
Client
|
|
81
|
-
|
|
82
|
-
|
|
145
|
+
生产使用前请阅读[安全策略](../SECURITY.md)、[隐私说明](../PRIVACY.md)、
|
|
146
|
+
[Agent Client 契约](AGENT_CLIENT_CONTRACT.md)和[兼容范围](COMPATIBILITY.md)。
|
|
147
|
+
|
|
148
|
+
## 公开 0.1.x 静态兼容模式
|
|
149
|
+
|
|
150
|
+
公开 `dsh-bailinghub@0.1.1` 仍是不可变的纯配置 Bundle。它通过 DSH 内置 MCP Client 启动
|
|
151
|
+
`bailinghub-mcp-server@0.1.1`,把运营者提供的一个 Client Token 固定绑定到一个 route,
|
|
152
|
+
并由 BailingHub 完成编排。
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
dsh plugin --profile web add dsh-bailinghub@0.1.1
|
|
156
|
+
|
|
157
|
+
export BAILINGHUB_BASE_URL='https://hub.example.com'
|
|
158
|
+
export BAILINGHUB_CLIENT_TOKEN='replace-with-a-route-scoped-client-token'
|
|
159
|
+
export BAILINGHUB_ROUTE='order_assistant'
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
它只暴露三个固定工具:
|
|
163
|
+
|
|
164
|
+
```text
|
|
165
|
+
mcp__bailinghub__submit_governed_job
|
|
166
|
+
mcp__bailinghub__get_governed_job
|
|
167
|
+
mcp__bailinghub__wait_for_governed_job
|
|
168
|
+
```
|
|
83
169
|
|
|
84
|
-
|
|
85
|
-
|
|
170
|
+
0.2 Agent Client 不会自动读取或迁移 0.1 Client Token。测试升级或回滚时必须显式固定版本,
|
|
171
|
+
并遵循 [0.1 到 0.2 的迁移边界](MIGRATION_VNEXT.md)。
|
|
86
172
|
|
|
87
173
|
## 兼容范围与反馈
|
|
88
174
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
执行兼容性 Smoke。
|
|
175
|
+
0.2.0 只对 [COMPATIBILITY.md](COMPATIBILITY.md) 中列出的版本完成了验证。DeepSeek
|
|
176
|
+
Harness 仍是 Developer Preview,每次 Harness 升级都必须重新执行 Native Lifecycle Smoke。
|
|
92
177
|
|
|
93
178
|
问题请提交到 [GitHub Issues](https://github.com/bailinghub/bailinghub-dsh-plugin/issues)。
|
|
94
179
|
请勿附带 Token、私有部署地址、个人信息或生产业务数据。
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import Schema from '@deepseek-ai/schemastery'
|
|
2
|
+
|
|
3
|
+
import { BailingHubAgentClientRuntime } from './runtime.js'
|
|
4
|
+
import { createTransportProvider } from './transport.js'
|
|
5
|
+
|
|
6
|
+
export const name = 'dsh-bailinghub'
|
|
7
|
+
export const inject = ['systemPrompt', 'tools', 'commands']
|
|
8
|
+
|
|
9
|
+
export const Config = Schema.object({
|
|
10
|
+
hubUrl: Schema.string()
|
|
11
|
+
.default('')
|
|
12
|
+
.description('BailingHub public HTTPS URL. Loopback HTTP is allowed for local development only.'),
|
|
13
|
+
clientAppId: Schema.string()
|
|
14
|
+
.default('')
|
|
15
|
+
.description('Public Agent Client application id issued by BailingHub.'),
|
|
16
|
+
workspace: Schema.string()
|
|
17
|
+
.default('')
|
|
18
|
+
.description('Initial BailingHub workspace/route. The Hub resolves business endpoints and authorization.'),
|
|
19
|
+
connectionName: Schema.string()
|
|
20
|
+
.default('default')
|
|
21
|
+
.description('Local SDK connection alias. Credentials remain in SDK-owned secure storage.'),
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
export function createAgentClientPlugin(options = {}) {
|
|
25
|
+
return {
|
|
26
|
+
name,
|
|
27
|
+
inject,
|
|
28
|
+
Config,
|
|
29
|
+
apply(ctx, config) {
|
|
30
|
+
const getTransport = createTransportProvider(config, options)
|
|
31
|
+
const runtime = new BailingHubAgentClientRuntime(
|
|
32
|
+
ctx,
|
|
33
|
+
config,
|
|
34
|
+
getTransport,
|
|
35
|
+
options.recovery,
|
|
36
|
+
).install()
|
|
37
|
+
ctx.provide('bailingHubAgentClient', runtime)
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function apply(ctx, config) {
|
|
43
|
+
return createAgentClientPlugin().apply(ctx, config)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { BailingHubAgentClientRuntime } from './runtime.js'
|
|
47
|
+
export {
|
|
48
|
+
DEFAULT_SDK_MODULE,
|
|
49
|
+
REQUIRED_METHODS,
|
|
50
|
+
assertTransport,
|
|
51
|
+
createLazySdkTransport,
|
|
52
|
+
createTransportProvider,
|
|
53
|
+
} from './transport.js'
|