dsh-bailinghub 0.3.0 → 0.4.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 +46 -1
- package/PRIVACY.md +101 -7
- package/README.md +128 -199
- package/SECURITY.md +95 -3
- package/docs/AGENT_CLIENT_CONTRACT.md +268 -23
- package/docs/COMPATIBILITY.md +51 -4
- package/docs/GETTING_STARTED.md +95 -61
- package/docs/GETTING_STARTED.zh-CN.md +82 -52
- package/docs/MIGRATION_VNEXT.md +79 -17
- package/docs/PROJECT_BOUNDARIES.md +3 -2
- package/docs/README.zh-CN.md +98 -174
- package/lib/authorizations.js +61 -0
- package/lib/conversation-archive-store.js +265 -0
- package/lib/conversation-outbox.js +230 -0
- package/lib/index.js +3 -0
- package/lib/runtime.js +657 -47
- package/lib/session-scope-store.js +265 -0
- package/lib/session-scope.js +319 -0
- package/lib/transport.js +11 -1
- package/package.json +2 -2
package/docs/GETTING_STARTED.md
CHANGED
|
@@ -1,92 +1,126 @@
|
|
|
1
|
-
# Get started
|
|
1
|
+
# Get started with 0.4.0
|
|
2
2
|
|
|
3
|
-
This guide is for
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
This guide is for users whose business system is already connected to BailingHub. Your
|
|
4
|
+
administrator must prepare Core 0.6.1, a public Client App ID, a workspace, and the business
|
|
5
|
+
browser-authorization entry first. You do not need to change business capability declarations.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 1. Install and configure
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
```text
|
|
12
|
-
Hub URL
|
|
13
|
-
Client App ID
|
|
14
|
-
Workspace
|
|
15
|
-
Connection Name
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
They identify the BailingHub application and starting workspace. They are not credentials. Do not
|
|
19
|
-
ask the administrator to send you a Client Token, Tool Provider secret, business password, model
|
|
20
|
-
API key, authorization code, browser session cookie, business URL, or tenant-specific login URL.
|
|
21
|
-
|
|
22
|
-
## 1. Install the plugin
|
|
23
|
-
|
|
24
|
-
Install the exact public version into the DSH Web profile:
|
|
9
|
+
Use Node.js `22.19.0+` or `24+` and the compatible DSH version:
|
|
25
10
|
|
|
26
11
|
```bash
|
|
27
|
-
|
|
12
|
+
npm install --global pnpm @deepseek-ai/dsh@0.1.1-rc.2
|
|
13
|
+
dsh plugin --profile web add dsh-bailinghub@0.4.0
|
|
28
14
|
```
|
|
29
15
|
|
|
30
|
-
The plugin installs the
|
|
31
|
-
|
|
32
|
-
## 2. Enter the four connection values
|
|
33
|
-
|
|
34
|
-
Use the DSH plugin settings page or these environment names:
|
|
16
|
+
The plugin installs SDK 0.4.0 automatically. Enter the four public values in DSH plugin settings,
|
|
17
|
+
or use their environment names. The example values below are placeholders:
|
|
35
18
|
|
|
36
19
|
```bash
|
|
37
20
|
export BAILINGHUB_HUB_URL='https://hub.example.com'
|
|
38
21
|
export BAILINGHUB_CLIENT_APP_ID='example-agent-client'
|
|
39
|
-
export BAILINGHUB_WORKSPACE='
|
|
40
|
-
export BAILINGHUB_CONNECTION_NAME='
|
|
22
|
+
export BAILINGHUB_WORKSPACE='order_assistant'
|
|
23
|
+
export BAILINGHUB_CONNECTION_NAME='Store A'
|
|
24
|
+
dsh --profile web --dump-config
|
|
25
|
+
dsh web
|
|
41
26
|
```
|
|
42
27
|
|
|
43
|
-
|
|
44
|
-
|
|
28
|
+
Use your administrator's Hub URL, Client App ID, and workspace. `Connection Name` is your local
|
|
29
|
+
label. None of these fields is a credential. Never put passwords, Client Tokens, signing secrets,
|
|
30
|
+
model keys, or business API/authorization URLs into the plugin settings or chat.
|
|
45
31
|
|
|
46
|
-
##
|
|
32
|
+
## 2. Authorize each account
|
|
47
33
|
|
|
48
|
-
|
|
34
|
+
In DSH, authorize the first account:
|
|
49
35
|
|
|
50
36
|
```text
|
|
51
37
|
/bailinghub login
|
|
38
|
+
/bailinghub doctor
|
|
52
39
|
/bailinghub status
|
|
53
|
-
/bailinghub workspaces
|
|
54
40
|
```
|
|
55
41
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
business
|
|
59
|
-
system's own login; it does not send the business password or business URL to the plugin.
|
|
42
|
+
The browser opens the original business authorization page. Sign in or switch accounts there,
|
|
43
|
+
select the intended store/tenant when asked, and check the actual identity before approving.
|
|
44
|
+
The business page determines the identity; the local label `Store A` does not.
|
|
60
45
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
trusted identity remains separate. When the selected name already belongs to the old identity,
|
|
64
|
-
the SDK preserves it and assigns the new identity an available alias such as `default-2`; the new
|
|
65
|
-
alias becomes current. Run `/bailinghub connections list` to see both and
|
|
66
|
-
`/bailinghub connections use <name-or-key>` to switch. If login says cleanup is required, the new
|
|
67
|
-
connection is already authorized, but an existing connection may still need inspection or
|
|
68
|
-
removal: do not authorize again; list connections and remove the reported old entry.
|
|
46
|
+
For another account in the **same system and workspace**, register a clearly named connection,
|
|
47
|
+
using the same three administrator-provided values, then authorize it separately:
|
|
69
48
|
|
|
70
|
-
|
|
49
|
+
```text
|
|
50
|
+
/bailinghub connections add "Store B" https://hub.example.com example-agent-client order_assistant
|
|
51
|
+
/bailinghub login
|
|
52
|
+
/bailinghub connections list
|
|
53
|
+
```
|
|
71
54
|
|
|
72
|
-
|
|
73
|
-
|
|
55
|
+
Confirm Store B on the business page. If you approve the same trusted identity again, the SDK
|
|
56
|
+
replaces its old connection and Session instead of creating a second identity. If an existing
|
|
57
|
+
name returns a different identity, the original connection remains and the new identity receives
|
|
58
|
+
an available alias. Names such as `default-2` do not prove which store was authorized. Check the
|
|
59
|
+
mapping before use. If login reports cleanup required, the new connection is already authorized;
|
|
60
|
+
inspect and remove the reported old entry rather than authorizing again.
|
|
61
|
+
|
|
62
|
+
## 3. Choose this conversation's business scope
|
|
63
|
+
|
|
64
|
+
Start a **new conversation before sending any message**, then run:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
/bailinghub connections list
|
|
68
|
+
/bailinghub scope set <store-a-connection-key> <store-b-connection-key>
|
|
69
|
+
/bailinghub scope
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Copy the fixed connection keys from the list; the scope command does not accept names. Select
|
|
73
|
+
one key for one account, or several for the same Hub/Client App/workspace. Wait for the successful
|
|
74
|
+
confirmation before sending. For example, when the reporting capability is available:
|
|
74
75
|
|
|
75
76
|
```text
|
|
76
|
-
|
|
77
|
+
Compare today's sales at Store A and Store B. Show each store separately.
|
|
77
78
|
```
|
|
78
79
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
The Agent chooses which selected authorization to use for each call. The system still decides
|
|
81
|
+
which data and actions that authorization permits. Test a read first, then a reversible permitted
|
|
82
|
+
update in a development workspace. Approval-required work follows the original approval flow.
|
|
83
|
+
|
|
84
|
+
Without a selection, or with `/bailinghub scope none`, the conversation is ordinary chat and
|
|
85
|
+
starts no BailingHub business runs. The first message freezes this choice. Start a new conversation
|
|
86
|
+
to change accounts or enable business access after ordinary chat. Changing the registry's default
|
|
87
|
+
connection does not change a conversation's scope.
|
|
88
|
+
|
|
89
|
+
## 4. Check results and the visible conversation
|
|
83
90
|
|
|
84
|
-
|
|
91
|
+
Check the actual business result and its original invocation trail in BailingHub. With the matching
|
|
92
|
+
Core 0.6.1, you can also follow visible user/assistant messages, turns, and the linked runs as one
|
|
93
|
+
conversation record. Multi-authorization runs keep their own call summaries separately.
|
|
85
94
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
95
|
+
```text
|
|
96
|
+
/bailinghub archive status
|
|
97
|
+
/bailinghub archive sync
|
|
98
|
+
```
|
|
89
99
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
100
|
+
The first command shows upload status; the second retries the saved record. It never repeats a
|
|
101
|
+
business action. `synced` means saved events were acknowledged, not that an action succeeded.
|
|
102
|
+
`pending` means upload is unfinished; `blocked` means the original authorizations cannot currently
|
|
103
|
+
permit it; `unsupported` means the SDK or Hub lacks the archive contract. `storage_error` or
|
|
104
|
+
`recovery_gap` means capture itself may be incomplete. Missing host history is unverified.
|
|
105
|
+
|
|
106
|
+
## 5. Reconnect or reopen
|
|
107
|
+
|
|
108
|
+
A saved business conversation restores its original selected accounts only after they all pass
|
|
109
|
+
validation. If it was reopened offline, reconnect and run `/bailinghub archive sync` or
|
|
110
|
+
`/bailinghub scope` in that same conversation. Temporary uncertainty can recover; a revoked or
|
|
111
|
+
replaced authorization, corrupt snapshot, or storage conflict remains blocked for the whole scope.
|
|
112
|
+
There is no automatic fallback to another account.
|
|
113
|
+
|
|
114
|
+
Restoring scope and retrying uploads does **not** restore unfinished business invocations or
|
|
115
|
+
approvals after a process restart. A never-started saved draft needs selection again. An older
|
|
116
|
+
started conversation with no valid scope snapshot must be left as history; begin a new one.
|
|
117
|
+
Use `/bailinghub sync` only to retry a pending run completion in the still-running conversation.
|
|
118
|
+
|
|
119
|
+
All selected accounts' context shares the local model conversation. The private local archive
|
|
120
|
+
contains plaintext visible task text and stays on disk until manually removed; it does not capture
|
|
121
|
+
hidden reasoning, attachments, or all past history. Read [Privacy](../PRIVACY.md), and use separate
|
|
122
|
+
conversations when account data must remain separate. Do not paste secrets into visible messages.
|
|
123
|
+
|
|
124
|
+
If setup fails, include versions, operating system, failed command, and redacted error text in a
|
|
125
|
+
[GitHub Issue](https://github.com/bailinghub/bailinghub-dsh-plugin/issues). Never attach credentials,
|
|
126
|
+
private URLs, authorization codes, personal data, or production payloads.
|
|
@@ -1,83 +1,113 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 开始使用 0.4.0
|
|
2
2
|
|
|
3
|
-
这份指南面向业务系统已经接入 BailingHub
|
|
4
|
-
|
|
3
|
+
这份指南面向业务系统已经接入 BailingHub 的用户。管理员需要先准备 Core 0.6.1、公开的 Client
|
|
4
|
+
App ID、workspace 和浏览器业务授权入口;已有业务能力无需为多账号重新声明。
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## 第一步:安装与配置
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
```text
|
|
11
|
-
Hub URL
|
|
12
|
-
Client App ID
|
|
13
|
-
Workspace
|
|
14
|
-
Connection Name
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
它们用于定位 BailingHub 应用和初始业务空间,不是凭据。不要让管理员把 Client Token、Tool
|
|
18
|
-
Provider 密钥、业务密码、模型 API Key、授权码、浏览器 Cookie、业务地址或租户专属登录地址
|
|
19
|
-
发给你。
|
|
20
|
-
|
|
21
|
-
## 第一步:安装插件
|
|
22
|
-
|
|
23
|
-
把精确公开版本安装到 DSH Web Profile:
|
|
8
|
+
使用 Node.js `22.19.0+` 或 `24+`,并安装兼容的 DSH:
|
|
24
9
|
|
|
25
10
|
```bash
|
|
26
|
-
|
|
11
|
+
npm install --global pnpm @deepseek-ai/dsh@0.1.1-rc.2
|
|
12
|
+
dsh plugin --profile web add dsh-bailinghub@0.4.0
|
|
27
13
|
```
|
|
28
14
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## 第二步:填写四项连接信息
|
|
32
|
-
|
|
33
|
-
可以在 DSH 插件设置页面填写,也可以使用对应环境变量:
|
|
15
|
+
插件会自动安装 SDK 0.4.0。通过插件设置填写四项公开信息,或使用对应环境变量。下面都是
|
|
16
|
+
占位值,需要替换成管理员提供的中枢地址、Client App ID 和 workspace:
|
|
34
17
|
|
|
35
18
|
```bash
|
|
36
19
|
export BAILINGHUB_HUB_URL='https://hub.example.com'
|
|
37
20
|
export BAILINGHUB_CLIENT_APP_ID='example-agent-client'
|
|
38
|
-
export BAILINGHUB_WORKSPACE='
|
|
39
|
-
export BAILINGHUB_CONNECTION_NAME='
|
|
21
|
+
export BAILINGHUB_WORKSPACE='order_assistant'
|
|
22
|
+
export BAILINGHUB_CONNECTION_NAME='A 店'
|
|
23
|
+
dsh --profile web --dump-config
|
|
24
|
+
dsh web
|
|
40
25
|
```
|
|
41
26
|
|
|
42
|
-
|
|
43
|
-
|
|
27
|
+
`Connection Name` 是你设置的本机名称。这四项都不是凭据;不要把业务密码、Client Token、签名
|
|
28
|
+
密钥、模型 Key、业务 API 地址或授权页面地址写入插件设置或聊天消息。
|
|
44
29
|
|
|
45
|
-
##
|
|
30
|
+
## 第二步:分别授权账号
|
|
46
31
|
|
|
47
|
-
|
|
32
|
+
在 DSH 中为第一家店执行:
|
|
48
33
|
|
|
49
34
|
```text
|
|
50
35
|
/bailinghub login
|
|
36
|
+
/bailinghub doctor
|
|
51
37
|
/bailinghub status
|
|
52
|
-
/bailinghub workspaces
|
|
53
38
|
```
|
|
54
39
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
40
|
+
浏览器会打开原业务授权页面。在那里登录、切换账号,并按业务系统要求选择门店或租户;同意前
|
|
41
|
+
核对实际业务身份。可信身份由业务授权页面决定,本机名称 `A 店` 不证明身份。
|
|
42
|
+
|
|
43
|
+
如需使用**同一系统、同一 workspace** 的 B 店,用同样的三项公开信息创建清晰命名的新连接,
|
|
44
|
+
再分别授权:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
/bailinghub connections add "B 店" https://hub.example.com example-agent-client order_assistant
|
|
48
|
+
/bailinghub login
|
|
49
|
+
/bailinghub connections list
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
请在业务页确认选中了 B 店。如果实际再次同意的是同一可信身份,SDK 会替换它的旧连接和 Session,
|
|
53
|
+
不会凭名称造出第二个身份。从已有名称授权另一身份时,原连接保留,新身份会获得可用别名。
|
|
54
|
+
`default-2` 之类的名称不能证明是哪家店,使用前应核对对应关系。若登录提示需要清理,新连接
|
|
55
|
+
已经授权成功;请检查并删除提示的旧条目,不要重复授权。
|
|
56
|
+
|
|
57
|
+
## 第三步:选择本次会话的业务范围
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
SDK 会覆盖旧的本机连接;不同可信身份继续相互独立。如果当前名称已经属于旧身份,SDK 会保留
|
|
61
|
-
它,并给新身份分配一个可用名称(例如 `default-2`),同时把新名称设为当前连接。使用
|
|
62
|
-
`/bailinghub connections list` 可以查看两者,再用
|
|
63
|
-
`/bailinghub connections use <名称或连接键>` 显式切换。如果登录提示需要清理,新连接其实已经
|
|
64
|
-
授权成功,但某个旧连接可能仍需检查或删除:不要再次授权,应先列出连接,再删除提示的旧连接。
|
|
59
|
+
**新建会话,在发送任何消息前**执行:
|
|
65
60
|
|
|
66
|
-
|
|
61
|
+
```text
|
|
62
|
+
/bailinghub connections list
|
|
63
|
+
/bailinghub scope set <A店连接键> <B店连接键>
|
|
64
|
+
/bailinghub scope
|
|
65
|
+
```
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
从列表复制固定连接键替换占位符,不能直接填写连接名称。只操作一家店就选一个键;多份授权
|
|
68
|
+
必须属于相同中枢、Client App 和 workspace。等待设置成功回显后,再发送请求。例如,业务系统
|
|
69
|
+
已开放报表能力时可以说:
|
|
69
70
|
|
|
70
71
|
```text
|
|
71
|
-
|
|
72
|
+
对比今天 A 店和 B 店的营业情况,按门店分别说明。
|
|
72
73
|
```
|
|
73
74
|
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
智能体自行选择每次调用使用哪份选中授权;实际数据和操作范围仍由业务权限决定。先验证一次
|
|
76
|
+
查询,再在开发空间尝试一次可回滚且允许的修改。需要审批的操作继续沿用原规则。
|
|
77
|
+
|
|
78
|
+
未选择范围,或执行 `/bailinghub scope none` 时,只进行普通聊天,不启动 BailingHub 业务执行。
|
|
79
|
+
第一条消息会固定这个选择。之后要增减账号,或从普通聊天开启业务访问,需要新建会话;切换
|
|
80
|
+
连接管理的默认连接不会改变会话范围。
|
|
81
|
+
|
|
82
|
+
## 第四步:核对业务结果与沟通过程
|
|
83
|
+
|
|
84
|
+
在业务后台核对最终结果,在 BailingHub 查看原调用轨迹。配合 Core 0.6.1,还能把可见用户消息、
|
|
85
|
+
助手回复、轮次与相关执行记录放在同一份沟通记录里查看。多授权的各份执行记录仍分别保留自身
|
|
86
|
+
调用摘要。
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
/bailinghub archive status
|
|
90
|
+
/bailinghub archive sync
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
第一条查看上传状态,第二条补传已保存记录,不会重做业务操作。`synced` 表示已保存事件获中枢
|
|
94
|
+
确认,不代表业务成功;`pending` 表示尚未传完;`blocked` 表示原授权当前无法允许上传;
|
|
95
|
+
`unsupported` 表示 SDK 或中枢不支持归档。`storage_error`、`recovery_gap` 表示采集本身可能
|
|
96
|
+
不完整;宿主没有历史可供核对时,覆盖度为未验证。
|
|
97
|
+
|
|
98
|
+
## 第五步:断网或重开后继续
|
|
99
|
+
|
|
100
|
+
重开已保存的业务会话时,核验全部原授权后才恢复原账号范围。若离线重开,联网后可以在同一
|
|
101
|
+
会话执行 `/bailinghub archive sync` 或 `/bailinghub scope` 再试一次。临时网络不确定可以恢复;
|
|
102
|
+
已撤销、被替换的授权,损坏的范围快照或存储冲突仍会阻断整组,不会自动换账号。
|
|
76
103
|
|
|
77
|
-
|
|
104
|
+
恢复范围与补传记录,**不等于恢复进程重启前未完成的业务调用或审批**。未开始的保存草稿需要
|
|
105
|
+
重新选择;旧版已开始但没有有效范围快照的会话只能保留为历史,请另开新会话。
|
|
106
|
+
`/bailinghub sync` 只用于当前仍运行会话的待同步执行结尾记录。
|
|
78
107
|
|
|
79
|
-
|
|
80
|
-
|
|
108
|
+
所选账号的上下文会共用本地模型会话;本机私有归档含明文任务正文,直到手动清理才删除。它不
|
|
109
|
+
采集隐藏思考、附件或全部历史。启用前请看[隐私说明](../PRIVACY.md);数据需要隔离的账号应分开
|
|
110
|
+
会话,不要在可见消息里粘贴秘密。
|
|
81
111
|
|
|
82
|
-
|
|
83
|
-
|
|
112
|
+
初始化失败时,可向 [GitHub Issues](https://github.com/bailinghub/bailinghub-dsh-plugin/issues)
|
|
113
|
+
提供版本、操作系统、失败命令和脱敏错误,不附带凭据、私有地址、授权码、个人信息或生产载荷。
|
package/docs/MIGRATION_VNEXT.md
CHANGED
|
@@ -1,7 +1,67 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
# Migrate to 0.4.0
|
|
2
|
+
|
|
3
|
+
## From 0.3.0: choose the conversation scope explicitly
|
|
4
|
+
|
|
5
|
+
Version 0.4.0 keeps the four public configuration fields and existing SDK-owned authorizations.
|
|
6
|
+
It changes how a conversation gets business access: logging in or selecting a default no longer
|
|
7
|
+
automatically enables it. A new conversation is ordinary chat until you select its scope.
|
|
8
|
+
|
|
9
|
+
1. Ask the administrator to upgrade the Hub to Core 0.6.1. The plugin installs exact SDK 0.4.0.
|
|
10
|
+
2. Before restarting, finish active business work and retry known pending run completions with
|
|
11
|
+
`/bailinghub sync`. Do not assume a process restart resumes an invocation or approval.
|
|
12
|
+
3. Upgrade the plugin and restart DSH:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
dsh plugin --profile web add dsh-bailinghub@0.4.0
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
4. Run `/bailinghub doctor` and `/bailinghub connections list`. Existing valid authorizations can
|
|
19
|
+
be selected; you do not need to authorize them again merely because the plugin was upgraded.
|
|
20
|
+
5. Start a new conversation. Before its first message, run
|
|
21
|
+
`/bailinghub scope set <connection-key> [<another-connection-key> ...]`, using fixed keys from
|
|
22
|
+
the list, then `/bailinghub scope`. Wait for successful confirmation. Select only this task's
|
|
23
|
+
accounts; several accounts must share one Hub/Client App/workspace.
|
|
24
|
+
6. Try a read, then a reversible permitted update. Check the actual result and original business
|
|
25
|
+
calls in BailingHub. Use `/bailinghub archive status` to inspect the separate visible record.
|
|
26
|
+
|
|
27
|
+
Keep old started conversations as history: if they have no valid locked scope snapshot, they
|
|
28
|
+
cannot automatically adopt today's selected connection. A stored draft that never started needs
|
|
29
|
+
explicit selection again. Existing 0.4 saved business conversations can reopen with their original
|
|
30
|
+
scope after every member is revalidated. An offline reopen can retry in the same conversation
|
|
31
|
+
with `/bailinghub scope` or `/bailinghub archive sync` once connectivity returns.
|
|
32
|
+
|
|
33
|
+
The new archive uploads visible user/assistant text, turn boundaries, and original run links for
|
|
34
|
+
the full frozen member set. Local pending events survive restart and upload without replaying
|
|
35
|
+
business work. It does not backfill all pre-upgrade history or restore unfinished invocations.
|
|
36
|
+
A detectable gap stays `recovery_gap`; missing host history is unverified. Review [Privacy](../PRIVACY.md):
|
|
37
|
+
the local outbox retains plaintext visible text, including acknowledged events, until removed by
|
|
38
|
+
the host/operator. There is no automatic retention cleanup.
|
|
39
|
+
|
|
40
|
+
### 0.3 用户升级摘要
|
|
41
|
+
|
|
42
|
+
先由管理员升级 Core 0.6.1;结束当前业务任务并用 `/bailinghub sync` 收口待同步结尾记录,再安装
|
|
43
|
+
`dsh-bailinghub@0.4.0` 并重启 DSH。已有有效授权可继续使用,不必仅因插件升级重新授权。
|
|
44
|
+
执行 `/bailinghub connections list` 后,**新建会话,在首条消息前**用
|
|
45
|
+
`/bailinghub scope set <连接键> [<另一连接键> ...]` 选择账号,并等待 `/bailinghub scope`
|
|
46
|
+
确认。未选范围就只是普通聊天;旧版已开始会话没有范围快照时不能直接恢复业务访问。
|
|
47
|
+
|
|
48
|
+
上传状态用 `/bailinghub archive status` 查看,联网后用 `/bailinghub archive sync` 补传。
|
|
49
|
+
这会恢复原范围并上传已保存文本,不会恢复重启前的业务调用或待审批操作,也不代表全部旧历史已
|
|
50
|
+
归档。更多步骤见[中文上手指南](GETTING_STARTED.zh-CN.md)与[隐私说明](../PRIVACY.md)。
|
|
51
|
+
|
|
52
|
+
## Downgrading from 0.4 to 0.3
|
|
53
|
+
|
|
54
|
+
Finish current business work and synchronize pending completions and archives before an explicit
|
|
55
|
+
downgrade. Keep the old profile and its scope/outbox files intact. Version 0.3.0 does not provide
|
|
56
|
+
0.4's explicit scope gate, multi-authorization conversation, or archive retries; its new conversations
|
|
57
|
+
use its selected default connection. Use a separate profile and new conversation if reverting.
|
|
58
|
+
Do not delete credential or archive files as a downgrade shortcut. A downgrade does not cancel an
|
|
59
|
+
accepted business action or delete its Hub audit.
|
|
60
|
+
|
|
61
|
+
## Legacy 0.1.x to the native Agent Client
|
|
62
|
+
|
|
63
|
+
There is no automatic credential, configuration, tool, or orchestration migration from the legacy
|
|
64
|
+
static MCP path. The following boundary remains separate from the 0.3 to 0.4 upgrade above.
|
|
5
65
|
|
|
6
66
|
## What remains unchanged
|
|
7
67
|
|
|
@@ -47,9 +107,9 @@ switch account, and select a tenant.
|
|
|
47
107
|
|
|
48
108
|
## Safe evaluation before migration
|
|
49
109
|
|
|
50
|
-
Do not replace a working production profile merely to evaluate 0.
|
|
51
|
-
another isolated Web profile and verify that the CLI really honors that location.
|
|
52
|
-
`0.3.0` creates a separate credential for each name registered through
|
|
110
|
+
Do not replace a working production profile merely to evaluate 0.4.0. Use a separate DSH home or
|
|
111
|
+
another isolated Web profile and verify that the CLI really honors that location. The named
|
|
112
|
+
connection lifecycle introduced in `0.3.0` creates a separate credential for each name registered through
|
|
53
113
|
`connections add` while authorization is pending. After authorization, the SDK replaces an older
|
|
54
114
|
same-binding connection when its trusted `on_behalf_of` is the same; different trusted identities
|
|
55
115
|
remain independent. A different identity returned from a same-alias login keeps the original
|
|
@@ -57,30 +117,31 @@ alias and Session and receives a non-conflicting alias that becomes current. Use
|
|
|
57
117
|
SDK installed by the DSH package when evaluating that behavior.
|
|
58
118
|
|
|
59
119
|
1. Keep the existing `0.1.1` profile and its legacy environment unchanged.
|
|
60
|
-
2. Install the exact released 0.
|
|
120
|
+
2. Install the exact released 0.4.0 package into an isolated profile.
|
|
61
121
|
3. Configure only the four public native fields using neutral values for dry composition.
|
|
62
122
|
4. Run `/bailinghub login` and approve a dedicated non-production client app/workspace whose
|
|
63
123
|
credential can be revoked without affecting a maintainer's existing profile.
|
|
64
|
-
5. Verify status
|
|
65
|
-
trajectory.
|
|
124
|
+
5. Verify status and workspace discovery. In a new conversation explicitly select its scope, then
|
|
125
|
+
verify one read, one permitted mutation, approval/resume, and the Hub trajectory.
|
|
66
126
|
6. Separately re-run the `0.1.1` submit and same-job follow-up against the newly released Core.
|
|
67
127
|
|
|
68
128
|
Passing the native path does not prove legacy compatibility, and passing the legacy path does not
|
|
69
129
|
prove the native Agent Client.
|
|
70
130
|
|
|
71
|
-
## Moving a profile to 0.
|
|
131
|
+
## Moving a legacy 0.1 profile to 0.4
|
|
72
132
|
|
|
73
133
|
Only after the isolated acceptance passes:
|
|
74
134
|
|
|
75
135
|
1. Record the exact old plugin, DSH, MCP, and Core versions without copying credentials into the
|
|
76
136
|
migration record.
|
|
77
137
|
2. Finish or cancel outstanding legacy jobs. A wait timeout is not a terminal failure.
|
|
78
|
-
3. Install the exact accepted 0.
|
|
138
|
+
3. Install the exact accepted 0.4.0 plugin version. Do not use an unpinned dist-tag.
|
|
79
139
|
4. Replace the legacy plugin configuration with the four native fields. Remove the old Client
|
|
80
140
|
Token from that process environment after confirming no remaining 0.1 integration uses it.
|
|
81
141
|
5. Start DSH, run `/bailinghub login`, use the business page to log in or switch account and select
|
|
82
142
|
a tenant if required, then authorize the intended workspace.
|
|
83
|
-
6. Run `/bailinghub status`, open a new conversation,
|
|
143
|
+
6. Run `/bailinghub status`, open a new conversation, explicitly select its scope before the first
|
|
144
|
+
message, and repeat the accepted read/mutation checks.
|
|
84
145
|
7. Confirm BailingHub receives visible conversation and invocation audit without hidden reasoning.
|
|
85
146
|
|
|
86
147
|
The developer or deployer supplies the Hub URL, public client app id, and initial workspace/route.
|
|
@@ -111,7 +172,7 @@ reuse, move, or republish an npm version or Git tag as a rollback mechanism.
|
|
|
111
172
|
|
|
112
173
|
## Release gates
|
|
113
174
|
|
|
114
|
-
Before
|
|
175
|
+
Before a public 0.4 release:
|
|
115
176
|
|
|
116
177
|
1. The matching BailingHub Core Agent Auth/Agent API contracts are released.
|
|
117
178
|
2. The exact `bailinghub-mcp-server/sdk` version is publicly installable and has passed DTO,
|
|
@@ -119,10 +180,11 @@ Before any public 0.3 release:
|
|
|
119
180
|
3. Installing only `dsh-bailinghub` into a clean DSH `0.1.1-rc.2` profile installs and resolves that
|
|
120
181
|
exact SDK dependency automatically.
|
|
121
182
|
4. Browser login, session isolation, dynamic tool replacement, approval recovery, visible
|
|
122
|
-
completion, same-identity replacement, different-identity isolation,
|
|
123
|
-
from the packaged artifact.
|
|
183
|
+
completion, same-identity replacement, different-identity isolation, explicit one/many-account
|
|
184
|
+
scope, visible archive, offline reopen/retry, and Hub trajectory pass from the packaged artifact.
|
|
185
|
+
Revocation must block the complete original selection, and archive retries must not replay business work.
|
|
124
186
|
5. Public `0.1.1` still works against the new Core through the unchanged Client API.
|
|
125
187
|
6. The maintainer explicitly selects the public version and migration story.
|
|
126
188
|
|
|
127
|
-
Do not tag or publish a future
|
|
189
|
+
Do not tag or publish a future version until all gates pass, and do not describe release
|
|
128
190
|
validation as public adoption.
|
|
@@ -23,8 +23,9 @@ community integration, not an official DeepSeek plugin or partnership.
|
|
|
23
23
|
|
|
24
24
|
## Public native line (0.2.0 onward)
|
|
25
25
|
|
|
26
|
-
Version 0.2.0 introduced this dependency path
|
|
27
|
-
|
|
26
|
+
Version 0.2.0 introduced this dependency path; 0.3.0 added the named connection lifecycle.
|
|
27
|
+
Version 0.4.0 adds explicit same-system conversation scope and visible conversation archiving.
|
|
28
|
+
All remain separate from the public static MCP path:
|
|
28
29
|
|
|
29
30
|
```text
|
|
30
31
|
DeepSeek Harness local Agent
|