dsh-bailinghub 0.2.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.
@@ -1,38 +1,88 @@
1
1
  # Compatibility
2
2
 
3
- ## Native Agent Client 0.2.0
3
+ ## Native Agent Client 0.4.0
4
+
5
+ | Component | Release pairing / requirement |
6
+ | --- | --- |
7
+ | DeepSeek Harness | `0.1.1-rc.2`; real Session, Cordis lifecycle, commands, prompt assembly, and ToolRuntime regression coverage |
8
+ | Node.js | `^22.19.0` or `>=24.0.0` |
9
+ | DSH tool presentation | Native Tool Mode; Code Mode deliberately degraded |
10
+ | Generic Agent Client SDK | Exact `bailinghub-mcp-server@0.4.0` via `./sdk` |
11
+ | BailingHub Core | Recommended `bailinghub@0.6.1`; Agent Auth v1, Agent Client Runtime v1, and conversation audit v1 |
12
+ | Visible archive acknowledgement | `bailing.agent-conversation-audit-ack.v1` |
13
+ | Selected authorization group | One Hub + Client App + workspace; no cross-system or cross-route scope |
14
+
15
+ Core `0.6.0` is the minimum API version for this contract. Use Core `0.6.1` for the
16
+ recommended release pairing; the patch does not change these business APIs.
17
+
18
+ Install only `dsh-bailinghub@0.4.0`; its ordinary dependency installs the exact SDK. A release
19
+ requires a registry-generated lockfile and a clean package/profile check. Local source and
20
+ synthetic HTTP verification are compatibility evidence, not evidence of an organization's
21
+ production use. The older 0.3 baseline is retained below for existing users, not as a claim that
22
+ 0.3 includes 0.4 features.
23
+
24
+ New conversations need explicit scope selection before the first message. Custom hosts must await
25
+ and display selection, preserve the stable conversation id, and restore the original scope before
26
+ sending on reopen. Missing started-session snapshots stay blocked. Saved drafts require fresh
27
+ confirmation. Scope restoration and archive synchronization do not recover business invocations,
28
+ approvals, or task execution after a process restart.
29
+
30
+ Temporary network failure during reopening is retryable on the same runtime under the complete
31
+ original scope. Confirmed revocation, replaced identity, or storage/CAS conflict stays blocked.
32
+ Archived event ids and payloads remain stable on retry; known local write errors and detectable
33
+ history gaps cannot be hidden by a connectivity failure.
34
+
35
+ The archive transport seam is optional for injected older SDKs. They report `unsupported` while
36
+ existing business methods remain usable. An older Core may leave durable events pending or
37
+ unsupported; that degradation does not establish full compatibility with this release. Empty scope
38
+ starts no business run or archive operation. No model can select a new credential or bypass the
39
+ full selected group.
40
+
41
+ Local scope and outbox files use private POSIX permissions and atomic/CAS persistence. The outbox
42
+ contains plaintext visible task text, persists after acknowledgement, and has no automatic
43
+ retention cleanup. See [Privacy](../PRIVACY.md) and the [host contract](AGENT_CLIENT_CONTRACT.md).
44
+
45
+ The CI matrix checks Ubuntu and Windows with Node.js 22.19.0 and 24. Live business/browser
46
+ acceptance still belongs to each deployment; the matrix is not a universal deployment claim.
47
+
48
+ ## Historical native Agent Client 0.3.0
4
49
 
5
50
  | Component | Verified version |
6
51
  | --- | --- |
7
- | DeepSeek Harness / Cordis lifecycle | `0.1.0-rc.7` |
52
+ | DeepSeek Harness / Cordis lifecycle | `0.1.0-rc.7`; `0.1.1-rc.2` |
8
53
  | Node.js | `22.19.0+` or `24+` |
9
54
  | DSH tool presentation | Native Tool Mode |
10
- | Generic Agent Client SDK | `bailinghub-mcp-server@0.2.0` via `./sdk` |
11
- | BailingHub Core | `bailinghub@0.5.0`; Agent Auth v1 + Agent Client Runtime v1 |
55
+ | Generic Agent Client SDK | `bailinghub-mcp-server@0.3.0` via `./sdk` |
56
+ | BailingHub Core | `bailinghub@0.5.1`; Agent Auth v1 + Agent Client Runtime v1 |
12
57
  | BailingHub turn context | `bailing.agent-turn-context.v1` |
13
58
  | BailingHub capability search | `bailing.agent-capability-search.v1` |
14
59
  | BailingHub governed invocation | `bailing.agent-tool-invocation.v1` |
15
60
  | BailingHub run completion | `bailing.agent-run-completion.v1` |
16
61
 
17
- Version 0.2.0 declares `bailinghub-mcp-server@0.2.0` as an exact ordinary dependency. A clean DSH
62
+ Version 0.3.0 declares `bailinghub-mcp-server@0.3.0` as an exact ordinary dependency. A clean DSH
18
63
  profile must work after installing only the plugin; ambient `node_modules`, peer/optional
19
64
  dependencies, dist-tags, ranges, and local `file:` paths are outside the supported contract.
20
- Compatibility with Core 0.5.0 includes migrations 055/056 and the live Agent Auth/Runtime
65
+ Compatibility with Core 0.5.1 includes the live Agent Auth/Runtime
21
66
  contracts from that release.
22
67
 
23
68
  DeepSeek Harness remains a developer preview. Every Harness version change requires a new smoke
24
69
  against its real Cordis lifecycle, prompt waterfall, ToolRuntime, commands, durable session events,
25
70
  and Web profile installation before this table can change.
26
71
 
72
+ `/bailinghub doctor` validates the required host API shape at runtime and reports the releases for
73
+ which that shape has been exercised. This is a diagnostic check, not a substitute for the live
74
+ browser authorization, read/write, approval/recovery, trajectory, and revocation gates below.
75
+
27
76
  ### Tool-mode and operating-system boundaries
28
77
 
29
78
  - Native Tool Mode is required. DSH Code Mode is deliberately degraded because it cannot safely
30
- present the current-turn dynamic business schemas in 0.2.0.
79
+ present the current-turn dynamic business schemas in 0.3.0.
31
80
  - macOS Agent Session credentials use Keychain.
32
81
  - Linux and other POSIX systems require the SDK's explicit secure file-store opt-in; the file must
33
82
  remain owned by the current user with mode `0600`.
34
- - Windows Agent Session credential storage is not supported by 0.2.0. Do not describe
35
- Client Token compatibility as native Agent Session support.
83
+ - Windows Agent Session credentials use CurrentUser DPAPI. Native package installation, SDK
84
+ resolution, and host lifecycle are Windows CI gates; each deployment must still accept its own
85
+ live browser and business authorization flow.
36
86
  - Non-loopback Hub connections require HTTPS. Loopback HTTP is for local development only.
37
87
 
38
88
  ### Host configuration contract
@@ -50,6 +100,16 @@ In Agent Client v1, `workspace` is the BailingHub route id. Business endpoints,
50
100
  URLs, Client Tokens, Tool Provider signing secrets, business credentials, and model-provider keys
51
101
  are not DSH plugin configuration.
52
102
 
103
+ The public binding is the normalized Hub URL, client app id, and workspace tuple.
104
+ `connectionName` is a user-controlled local selector, not an identity claim. The Hub Client App
105
+ supplies one stable business authorization entry, and the business page
106
+ handles login, account switching, and tenant selection. After authorization, the SDK compares the
107
+ trusted `on_behalf_of` within the same public binding: the same identity replaces the older local
108
+ connection, while different identities remain independent. When a same-alias login returns a
109
+ different identity, the old alias and Session remain intact and the new identity receives a
110
+ non-conflicting alias that becomes current. A cleanup-required result keeps the new connection
111
+ authorized and must be resolved explicitly without another authorization attempt.
112
+
53
113
  ## Public legacy 0.1.x
54
114
 
55
115
  | Component | Published version |
@@ -65,7 +125,7 @@ Public `dsh-bailinghub@0.1.1` remains a configuration-only bundle. It starts the
65
125
  operator-configured Hub URL, route-scoped Client Token, and route. It does not establish an Agent
66
126
  Session, receive a dynamic capability catalog, or move orchestration into local DSH.
67
127
 
68
- The 0.2 line must not mutate the published 0.1 package or reinterpret its configuration. A new
128
+ The native line must not mutate the published 0.1 package or reinterpret its configuration. A new
69
129
  BailingHub Core release is compatible only after a separate clean legacy profile proves that the
70
130
  0.1.1 `/run` and `/jobs/{job_id}` flow still works.
71
131
 
@@ -73,8 +133,11 @@ BailingHub Core release is compatible only after a separate clean legacy profile
73
133
 
74
134
  Compatibility requires independent evidence for both paths:
75
135
 
76
- 1. Native 0.2: clean install of only the exact plugin package, browser authorization, workspace
77
- discovery, read, permitted mutation, approval/resume, visible completion, and Hub trajectory.
136
+ 1. Native 0.4: clean install of only the exact plugin package, browser authorization, workspace
137
+ discovery, same-identity replacement, different-identity isolation, read, permitted mutation,
138
+ approval/resume, visible completion, and Hub trajectory. Additionally verify explicit single/multiple
139
+ scope selection, full-set archive authorization, offline reopen/retry, revocation, and no business
140
+ replay after a lost archive acknowledgement.
78
141
  2. Legacy 0.1.1: clean static profile, fixed Client Token route, one submit, and same-job follow-up
79
142
  through the unchanged public Client API.
80
143
 
@@ -0,0 +1,126 @@
1
+ # Get started with 0.4.0
2
+
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
+
7
+ ## 1. Install and configure
8
+
9
+ Use Node.js `22.19.0+` or `24+` and the compatible DSH version:
10
+
11
+ ```bash
12
+ npm install --global pnpm @deepseek-ai/dsh@0.1.1-rc.2
13
+ dsh plugin --profile web add dsh-bailinghub@0.4.0
14
+ ```
15
+
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:
18
+
19
+ ```bash
20
+ export BAILINGHUB_HUB_URL='https://hub.example.com'
21
+ export BAILINGHUB_CLIENT_APP_ID='example-agent-client'
22
+ export BAILINGHUB_WORKSPACE='order_assistant'
23
+ export BAILINGHUB_CONNECTION_NAME='Store A'
24
+ dsh --profile web --dump-config
25
+ dsh web
26
+ ```
27
+
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.
31
+
32
+ ## 2. Authorize each account
33
+
34
+ In DSH, authorize the first account:
35
+
36
+ ```text
37
+ /bailinghub login
38
+ /bailinghub doctor
39
+ /bailinghub status
40
+ ```
41
+
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.
45
+
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:
48
+
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
+ ```
54
+
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:
75
+
76
+ ```text
77
+ Compare today's sales at Store A and Store B. Show each store separately.
78
+ ```
79
+
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
90
+
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.
94
+
95
+ ```text
96
+ /bailinghub archive status
97
+ /bailinghub archive sync
98
+ ```
99
+
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.
@@ -0,0 +1,113 @@
1
+ # 开始使用 0.4.0
2
+
3
+ 这份指南面向业务系统已经接入 BailingHub 的用户。管理员需要先准备 Core 0.6.1、公开的 Client
4
+ App ID、workspace 和浏览器业务授权入口;已有业务能力无需为多账号重新声明。
5
+
6
+ ## 第一步:安装与配置
7
+
8
+ 使用 Node.js `22.19.0+` 或 `24+`,并安装兼容的 DSH:
9
+
10
+ ```bash
11
+ npm install --global pnpm @deepseek-ai/dsh@0.1.1-rc.2
12
+ dsh plugin --profile web add dsh-bailinghub@0.4.0
13
+ ```
14
+
15
+ 插件会自动安装 SDK 0.4.0。通过插件设置填写四项公开信息,或使用对应环境变量。下面都是
16
+ 占位值,需要替换成管理员提供的中枢地址、Client App ID 和 workspace:
17
+
18
+ ```bash
19
+ export BAILINGHUB_HUB_URL='https://hub.example.com'
20
+ export BAILINGHUB_CLIENT_APP_ID='example-agent-client'
21
+ export BAILINGHUB_WORKSPACE='order_assistant'
22
+ export BAILINGHUB_CONNECTION_NAME='A 店'
23
+ dsh --profile web --dump-config
24
+ dsh web
25
+ ```
26
+
27
+ `Connection Name` 是你设置的本机名称。这四项都不是凭据;不要把业务密码、Client Token、签名
28
+ 密钥、模型 Key、业务 API 地址或授权页面地址写入插件设置或聊天消息。
29
+
30
+ ## 第二步:分别授权账号
31
+
32
+ 在 DSH 中为第一家店执行:
33
+
34
+ ```text
35
+ /bailinghub login
36
+ /bailinghub doctor
37
+ /bailinghub status
38
+ ```
39
+
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
+
59
+ **新建会话,在发送任何消息前**执行:
60
+
61
+ ```text
62
+ /bailinghub connections list
63
+ /bailinghub scope set <A店连接键> <B店连接键>
64
+ /bailinghub scope
65
+ ```
66
+
67
+ 从列表复制固定连接键替换占位符,不能直接填写连接名称。只操作一家店就选一个键;多份授权
68
+ 必须属于相同中枢、Client App 和 workspace。等待设置成功回显后,再发送请求。例如,业务系统
69
+ 已开放报表能力时可以说:
70
+
71
+ ```text
72
+ 对比今天 A 店和 B 店的营业情况,按门店分别说明。
73
+ ```
74
+
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
+ 已撤销、被替换的授权,损坏的范围快照或存储冲突仍会阻断整组,不会自动换账号。
103
+
104
+ 恢复范围与补传记录,**不等于恢复进程重启前未完成的业务调用或审批**。未开始的保存草稿需要
105
+ 重新选择;旧版已开始但没有有效范围快照的会话只能保留为历史,请另开新会话。
106
+ `/bailinghub sync` 只用于当前仍运行会话的待同步执行结尾记录。
107
+
108
+ 所选账号的上下文会共用本地模型会话;本机私有归档含明文任务正文,直到手动清理才删除。它不
109
+ 采集隐藏思考、附件或全部历史。启用前请看[隐私说明](../PRIVACY.md);数据需要隔离的账号应分开
110
+ 会话,不要在可见消息里粘贴秘密。
111
+
112
+ 初始化失败时,可向 [GitHub Issues](https://github.com/bailinghub/bailinghub-dsh-plugin/issues)
113
+ 提供版本、操作系统、失败命令和脱敏错误,不附带凭据、私有地址、授权码、个人信息或生产载荷。
@@ -1,7 +1,67 @@
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.
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
 
@@ -20,9 +80,9 @@ the orchestration. Local DSH does not obtain a trusted Agent Session or dynamic
20
80
  The retained [legacy patch](../cordis.patch.yml) documents that historical meaning. It is not
21
81
  selected by the current native package metadata, and its presence is not a dual-mode switch.
22
82
 
23
- ## What changes in 0.2
83
+ ## What changed in 0.2
24
84
 
25
- | Concern | Public 0.1.1 | Native 0.2 |
85
+ | Concern | Public 0.1.1 | Native 0.2 and later |
26
86
  | --- | --- | --- |
27
87
  | DSH integration | in-box MCP client | native Cordis host adapter |
28
88
  | Core unit | governed job | conversation, run, and governed invocation |
@@ -32,40 +92,56 @@ selected by the current native package metadata, and its presence is not a dual-
32
92
  | Business identity | not established by DSH | Agent Session approved through the business boundary |
33
93
  | Hub audit | job records | conversation, run, completion, and invocation trajectory |
34
94
 
95
+ ## What 0.3 adds
96
+
97
+ Version 0.3 keeps the same native boundary and adds stable named multi-connection lifecycle,
98
+ same-binding trusted-identity reconciliation, and Windows CurrentUser DPAPI credential storage.
99
+ It does not reinterpret or migrate the public 0.1.x Client Token path.
100
+
35
101
  The new plugin config is limited to `hubUrl`, `clientAppId`, `workspace`, and `connectionName`.
36
102
  The old `BAILINGHUB_CLIENT_TOKEN` is not read, copied, exchanged, or converted into an Agent
37
103
  Session. Browser authorization creates a new independently revocable credential in SDK-owned
38
- secure storage.
104
+ secure storage. The plugin does not accept a business URL: the Hub Client App resolves to one
105
+ stable, account- and tenant-neutral business authorization entry, where the user can log in,
106
+ switch account, and select a tenant.
39
107
 
40
108
  ## Safe evaluation before migration
41
109
 
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.
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
113
+ `connections add` while authorization is pending. After authorization, the SDK replaces an older
114
+ same-binding connection when its trusted `on_behalf_of` is the same; different trusted identities
115
+ remain independent. A different identity returned from a same-alias login keeps the original
116
+ alias and Session and receives a non-conflicting alias that becomes current. Use the exact matching
117
+ SDK installed by the DSH package when evaluating that behavior.
44
118
 
45
119
  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.
120
+ 2. Install the exact released 0.4.0 package into an isolated profile.
47
121
  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.
122
+ 4. Run `/bailinghub login` and approve a dedicated non-production client app/workspace whose
123
+ credential can be revoked without affecting a maintainer's existing profile.
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.
51
126
  6. Separately re-run the `0.1.1` submit and same-job follow-up against the newly released Core.
52
127
 
53
128
  Passing the native path does not prove legacy compatibility, and passing the legacy path does not
54
129
  prove the native Agent Client.
55
130
 
56
- ## Moving a profile to 0.2
131
+ ## Moving a legacy 0.1 profile to 0.4
57
132
 
58
133
  Only after the isolated acceptance passes:
59
134
 
60
135
  1. Record the exact old plugin, DSH, MCP, and Core versions without copying credentials into the
61
136
  migration record.
62
137
  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.
138
+ 3. Install the exact accepted 0.4.0 plugin version. Do not use an unpinned dist-tag.
64
139
  4. Replace the legacy plugin configuration with the four native fields. Remove the old Client
65
140
  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.
141
+ 5. Start DSH, run `/bailinghub login`, use the business page to log in or switch account and select
142
+ a tenant if required, then authorize the intended workspace.
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.
69
145
  7. Confirm BailingHub receives visible conversation and invocation audit without hidden reasoning.
70
146
 
71
147
  The developer or deployer supplies the Hub URL, public client app id, and initial workspace/route.
@@ -76,6 +152,12 @@ key to this plugin.
76
152
 
77
153
  Rollback is explicit; it does not convert the Agent Session back into a Client Token.
78
154
 
155
+ Before downgrading a 0.3 profile to 0.2, first use the installed 0.3 plugin to finish active runs
156
+ and remove every named instance through `/bailinghub connections remove <name>`. The SDK returns
157
+ the registry to schema v1 after the last such instance is removed. Stable `0.2.0` fails closed on
158
+ schema v2; do not manually delete the registry, Keychain entry, DPAPI ciphertext, or secure file
159
+ credentials as a downgrade shortcut.
160
+
79
161
  1. Finish active native runs and use `/bailinghub sync` for any known pending completion.
80
162
  2. Run `/bailinghub logout` if the new Agent Session should be revoked.
81
163
  3. Reinstall exact `dsh-bailinghub@0.1.1` in the target profile.
@@ -90,17 +172,19 @@ reuse, move, or republish an npm version or Git tag as a rollback mechanism.
90
172
 
91
173
  ## Release gates
92
174
 
93
- Before any public 0.2 release:
175
+ Before a public 0.4 release:
94
176
 
95
177
  1. The matching BailingHub Core Agent Auth/Agent API contracts are released.
96
178
  2. The exact `bailinghub-mcp-server/sdk` version is publicly installable and has passed DTO,
97
179
  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
180
+ 3. Installing only `dsh-bailinghub` into a clean DSH `0.1.1-rc.2` profile installs and resolves that
99
181
  exact SDK dependency automatically.
100
182
  4. Browser login, session isolation, dynamic tool replacement, approval recovery, visible
101
- completion, and Hub trajectory pass 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.
102
186
  5. Public `0.1.1` still works against the new Core through the unchanged Client API.
103
187
  6. The maintainer explicitly selects the public version and migration story.
104
188
 
105
- Do not tag or publish a future 0.2.x version until all gates pass, and do not describe release
189
+ Do not tag or publish a future version until all gates pass, and do not describe release
106
190
  validation as public adoption.
@@ -21,9 +21,11 @@ BailingHub tool surface.
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
23
 
24
- ## Public native 0.2.0
24
+ ## Public native line (0.2.0 onward)
25
25
 
26
- Version 0.2.0 adds a separate dependency path without reinterpreting the public static MCP path:
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:
27
29
 
28
30
  ```text
29
31
  DeepSeek Harness local Agent