dsh-bailinghub 0.3.0 → 0.5.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 +80 -1
- package/PRIVACY.md +140 -7
- package/README.md +139 -198
- package/SECURITY.md +128 -3
- package/docs/AGENT_CLIENT_CONTRACT.md +433 -23
- package/docs/COMPATIBILITY.md +96 -4
- package/docs/CROSS_SYSTEM_CONVERSATIONS.md +136 -0
- package/docs/GETTING_STARTED.md +120 -60
- package/docs/GETTING_STARTED.zh-CN.md +101 -51
- package/docs/MIGRATION_VNEXT.md +142 -17
- package/docs/PROJECT_BOUNDARIES.md +6 -2
- package/docs/README.zh-CN.md +104 -173
- package/docs/RELEASE_NOTES_v0.5.0.md +79 -0
- package/lib/authorizations.js +76 -0
- package/lib/conversation-archive-store.js +265 -0
- package/lib/conversation-outbox.js +236 -0
- package/lib/index.js +3 -0
- package/lib/runtime.js +830 -49
- package/lib/session-scope-store.js +265 -0
- package/lib/session-scope.js +393 -0
- package/lib/subject-display.js +39 -0
- package/lib/system-info.js +76 -0
- package/lib/transport.js +26 -1
- package/package.json +4 -2
package/docs/COMPATIBILITY.md
CHANGED
|
@@ -1,6 +1,94 @@
|
|
|
1
1
|
# Compatibility
|
|
2
2
|
|
|
3
|
-
## Native Agent Client 0.
|
|
3
|
+
## Native Agent Client 0.5.0
|
|
4
|
+
|
|
5
|
+
| Component | Release pairing / requirement |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| DeepSeek Harness | `0.1.1-rc.2`; real Session and native Cordis lifecycle |
|
|
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.5.0` via `./sdk` |
|
|
11
|
+
| BailingHub Core | `bailinghub@0.7.0`, with outstanding migrations through 059 applied |
|
|
12
|
+
| Selected scope | Single account, same-system multiple accounts, or different Client Apps/workspaces on one Hub and audit domain |
|
|
13
|
+
| Original authorization | A distinct original Agent Session for every selected target |
|
|
14
|
+
| Persistence | Existing same-system v1 scope/outbox and cross-system v2 records |
|
|
15
|
+
|
|
16
|
+
Install `dsh-bailinghub@0.5.0`; its ordinary dependency installs the exact SDK automatically.
|
|
17
|
+
Core 0.6.1 and SDK/plugin 0.4.0 remain the historical same-system baseline, not an alternative
|
|
18
|
+
pairing for new cross-system features. See the [upgrade steps](MIGRATION_VNEXT.md) and
|
|
19
|
+
[release scenario](RELEASE_NOTES_v0.5.0.md).
|
|
20
|
+
|
|
21
|
+
### Authorization subject display
|
|
22
|
+
|
|
23
|
+
Core 0.7.0, SDK 0.5.0 and plugin 0.5.0 support business-supplied authorization names. New
|
|
24
|
+
names are optional: an old SDK reports `unsupported`, a missing business name reports `missing`,
|
|
25
|
+
and neither blocks the existing tools. A list may show cached display data without claiming it
|
|
26
|
+
is fresh identity evidence. Current names and cache-write status remain separate from scope,
|
|
27
|
+
credential, archive and business errors. Existing v1/v2 records need no conversion or new labels;
|
|
28
|
+
names never replace their original key, binding or Session. See the
|
|
29
|
+
[display contract](AGENT_CLIENT_CONTRACT.md#authorization-subject-display-050).
|
|
30
|
+
|
|
31
|
+
### Cross-system scope
|
|
32
|
+
|
|
33
|
+
Requires Core 0.7.0, SDK 0.5.0 and plugin 0.5.0. Core must advertise
|
|
34
|
+
`cross_binding_members: true` and `member_bindings: "session-client-route.v1"` through
|
|
35
|
+
`bailing.agent-conversation-audit-capabilities.v1`, with its additive target-member migration ready.
|
|
36
|
+
The SDK must implement `getConversationArchiveCapabilities` and the `expectedBinding` dispatch guard.
|
|
37
|
+
Cross-system selection refuses missing support before creating any business run. Existing
|
|
38
|
+
same-system scope and archive interfaces continue using their v1 behavior.
|
|
39
|
+
|
|
40
|
+
One Hub may contain different Client Apps and workspaces; every target must have a distinct
|
|
41
|
+
original Agent Session. Multiple routes sharing a single Agent Session and cross-Hub conversations
|
|
42
|
+
are outside this release. Hosts using custom stores must preserve scope/outbox v2 records with
|
|
43
|
+
their original bindings and CAS revisions; do not convert v2 into v1 or reconstruct missing state.
|
|
44
|
+
See [the cross-system guide](CROSS_SYSTEM_CONVERSATIONS.md) for usage and limits.
|
|
45
|
+
|
|
46
|
+
## Historical native Agent Client 0.4.0
|
|
47
|
+
|
|
48
|
+
| Component | Release pairing / requirement |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| DeepSeek Harness | `0.1.1-rc.2`; real Session, Cordis lifecycle, commands, prompt assembly, and ToolRuntime regression coverage |
|
|
51
|
+
| Node.js | `^22.19.0` or `>=24.0.0` |
|
|
52
|
+
| DSH tool presentation | Native Tool Mode; Code Mode deliberately degraded |
|
|
53
|
+
| Generic Agent Client SDK | Exact `bailinghub-mcp-server@0.4.0` via `./sdk` |
|
|
54
|
+
| BailingHub Core | Recommended `bailinghub@0.6.1`; Agent Auth v1, Agent Client Runtime v1, and conversation audit v1 |
|
|
55
|
+
| Visible archive acknowledgement | `bailing.agent-conversation-audit-ack.v1` |
|
|
56
|
+
| Selected authorization group | One Hub + Client App + workspace; no cross-system or cross-route scope |
|
|
57
|
+
|
|
58
|
+
Core `0.6.0` is the minimum API version for this contract. Use Core `0.6.1` for the
|
|
59
|
+
recommended release pairing; the patch does not change these business APIs.
|
|
60
|
+
|
|
61
|
+
For this historical pairing, install `dsh-bailinghub@0.4.0`; its ordinary dependency installs the exact SDK. A release
|
|
62
|
+
requires a registry-generated lockfile and a clean package/profile check. Local source and
|
|
63
|
+
synthetic HTTP verification are compatibility evidence, not evidence of an organization's
|
|
64
|
+
production use. The older 0.3 baseline is retained below for existing users, not as a claim that
|
|
65
|
+
0.3 includes 0.4 features.
|
|
66
|
+
|
|
67
|
+
New conversations need explicit scope selection before the first message. Custom hosts must await
|
|
68
|
+
and display selection, preserve the stable conversation id, and restore the original scope before
|
|
69
|
+
sending on reopen. Missing started-session snapshots stay blocked. Saved drafts require fresh
|
|
70
|
+
confirmation. Scope restoration and archive synchronization do not recover business invocations,
|
|
71
|
+
approvals, or task execution after a process restart.
|
|
72
|
+
|
|
73
|
+
Temporary network failure during reopening is retryable on the same runtime under the complete
|
|
74
|
+
original scope. Confirmed revocation, replaced identity, or storage/CAS conflict stays blocked.
|
|
75
|
+
Archived event ids and payloads remain stable on retry; known local write errors and detectable
|
|
76
|
+
history gaps cannot be hidden by a connectivity failure.
|
|
77
|
+
|
|
78
|
+
The archive transport seam is optional for injected older SDKs. They report `unsupported` while
|
|
79
|
+
existing business methods remain usable. An older Core may leave durable events pending or
|
|
80
|
+
unsupported; that degradation does not establish full compatibility with this release. Empty scope
|
|
81
|
+
starts no business run or archive operation. No model can select a new credential or bypass the
|
|
82
|
+
full selected group.
|
|
83
|
+
|
|
84
|
+
Local scope and outbox files use private POSIX permissions and atomic/CAS persistence. The outbox
|
|
85
|
+
contains plaintext visible task text, persists after acknowledgement, and has no automatic
|
|
86
|
+
retention cleanup. See [Privacy](../PRIVACY.md) and the [host contract](AGENT_CLIENT_CONTRACT.md).
|
|
87
|
+
|
|
88
|
+
The CI matrix checks Ubuntu and Windows with Node.js 22.19.0 and 24. Live business/browser
|
|
89
|
+
acceptance still belongs to each deployment; the matrix is not a universal deployment claim.
|
|
90
|
+
|
|
91
|
+
## Historical native Agent Client 0.3.0
|
|
4
92
|
|
|
5
93
|
| Component | Verified version |
|
|
6
94
|
| --- | --- |
|
|
@@ -80,7 +168,7 @@ Public `dsh-bailinghub@0.1.1` remains a configuration-only bundle. It starts the
|
|
|
80
168
|
operator-configured Hub URL, route-scoped Client Token, and route. It does not establish an Agent
|
|
81
169
|
Session, receive a dynamic capability catalog, or move orchestration into local DSH.
|
|
82
170
|
|
|
83
|
-
The
|
|
171
|
+
The native line must not mutate the published 0.1 package or reinterpret its configuration. A new
|
|
84
172
|
BailingHub Core release is compatible only after a separate clean legacy profile proves that the
|
|
85
173
|
0.1.1 `/run` and `/jobs/{job_id}` flow still works.
|
|
86
174
|
|
|
@@ -88,9 +176,13 @@ BailingHub Core release is compatible only after a separate clean legacy profile
|
|
|
88
176
|
|
|
89
177
|
Compatibility requires independent evidence for both paths:
|
|
90
178
|
|
|
91
|
-
1. Native 0.
|
|
179
|
+
1. Native 0.5: clean install of only the exact plugin package, browser authorization, workspace
|
|
92
180
|
discovery, same-identity replacement, different-identity isolation, read, permitted mutation,
|
|
93
|
-
approval/resume, visible completion, and Hub trajectory.
|
|
181
|
+
approval/resume, visible completion, and Hub trajectory. Additionally verify explicit single/multiple
|
|
182
|
+
scope selection, full-set archive authorization, offline reopen/retry, revocation, and no business
|
|
183
|
+
replay after a lost archive acknowledgement. Verify cross-system routing and same-named tools,
|
|
184
|
+
unselected-target isolation, metadata before tool search, and duplicate/renamed subject displays.
|
|
185
|
+
Metadata reads must create no business run; subject names must not change identity or scope.
|
|
94
186
|
2. Legacy 0.1.1: clean static profile, fixed Client Token route, one submit, and same-job follow-up
|
|
95
187
|
through the unchanged public Client API.
|
|
96
188
|
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# One conversation across business systems
|
|
2
|
+
|
|
3
|
+
**Release pairing: Core 0.7.0, SDK 0.5.0 and DSH 0.5.0.** The plugin installs its exact SDK
|
|
4
|
+
dependency. Core 0.6.1 / SDK 0.4.0 / DSH 0.4.0 do not include this extension; upgrade the Hub
|
|
5
|
+
before selecting targets from different systems.
|
|
6
|
+
|
|
7
|
+
## What you can do
|
|
8
|
+
|
|
9
|
+
Select, for example, a shop account and an inventory account already authorized on the same
|
|
10
|
+
BailingHub deployment. Ask the same local Agent to check product stock, then change a corresponding shop product's price and list it using permitted actions. The Agent keeps each system's tools and authorizations distinct; you do not switch
|
|
11
|
+
the global connection between steps. Available actions still depend on each system's declared
|
|
12
|
+
capabilities and the permissions of the selected account.
|
|
13
|
+
|
|
14
|
+
The Agent initially sees the selected target directory. It searches the intended target's
|
|
15
|
+
capabilities when needed, then calls the corresponding typed tool. A capability search opens
|
|
16
|
+
that target's run with the search's minimal task description. Other systems do not automatically
|
|
17
|
+
receive the original user turn or contribute their memory. The local Agent and the independent
|
|
18
|
+
conversation audit still share the visible conversation.
|
|
19
|
+
|
|
20
|
+
## Start a conversation
|
|
21
|
+
|
|
22
|
+
### Understand the selected systems before choosing tools
|
|
23
|
+
|
|
24
|
+
An administrator can provide each connected system's name, short purpose, usual business areas
|
|
25
|
+
and boundaries in BailingHub. The Agent reads these descriptions for the selected accounts before
|
|
26
|
+
its first capability search. For example, it can distinguish online selling from inventory
|
|
27
|
+
management without a client-specific product dictionary. Business-supplied subject names identify
|
|
28
|
+
the particular organization, project or other authorized subject for display. They are separate
|
|
29
|
+
from product purpose and do not prove identity or grant permissions.
|
|
30
|
+
|
|
31
|
+
A description says what the product usually does. The actual tools and permissions still come
|
|
32
|
+
from authorized capability discovery. “Not loaded” means the tools have not been requested yet;
|
|
33
|
+
it does not mean the product has no capabilities. Missing descriptions or an older server show
|
|
34
|
+
unknown information and preserve the existing search flow. Reading a description sends no user
|
|
35
|
+
message and creates no business run. Existing same-system first-turn runs are unchanged.
|
|
36
|
+
|
|
37
|
+
If the server explicitly reports that a selected workspace is unavailable, its directory says
|
|
38
|
+
unavailable while retaining the original selection. An uncertain network failure remains unknown;
|
|
39
|
+
neither condition selects another account. A later turn reads the original target again.
|
|
40
|
+
|
|
41
|
+
### Select the accounts
|
|
42
|
+
|
|
43
|
+
1. Authorize each target separately and verify the intended subject on the business authorization
|
|
44
|
+
page. With a compatible business backend, the backend supplies its name automatically. A local
|
|
45
|
+
connection selector remains independent; missing names show “Authorization name pending sync”.
|
|
46
|
+
Names do not prove a mapping between two systems or distinguish duplicate-named subjects.
|
|
47
|
+
2. In a new conversation, use `/bailinghub connections list`, then
|
|
48
|
+
`/bailinghub scope set <shop-connection-key> <inventory-connection-key>`.
|
|
49
|
+
3. Wait for successful confirmation before sending the first message. Start with a precise
|
|
50
|
+
request identifying the intended systems, objects and allowed action.
|
|
51
|
+
4. Review the separate results and any approval requests. Use `/bailinghub archive status`
|
|
52
|
+
to check visible-record upload; `/bailinghub archive sync` retries uploads without repeating
|
|
53
|
+
business actions.
|
|
54
|
+
|
|
55
|
+
An empty scope remains ordinary chat. The first user message freezes the selected targets.
|
|
56
|
+
Reopening a conversation restores the original selection after all original members pass
|
|
57
|
+
validation; a draft that never started needs fresh confirmation. A temporary outage can be
|
|
58
|
+
retried in the same runtime. Revoked/replaced members never cause a switch to a default or subset.
|
|
59
|
+
|
|
60
|
+
## Host integration
|
|
61
|
+
|
|
62
|
+
Keep the existing `setSessionScope`, `getSessionScope`, `restoreSessionScope`,
|
|
63
|
+
`getSessionArchiveStatus` and `syncSessionArchive` flow. The returned scope view retains its v1
|
|
64
|
+
schema and gains `targetMode: "multi_system"`; authorization entries additionally include
|
|
65
|
+
`clientAppId` and `systemRef`. Use those public fields to group the selection UI if helpful.
|
|
66
|
+
Never feed raw keys, credentials or writable scope records to the model.
|
|
67
|
+
|
|
68
|
+
The built-in stores understand both v1 and v2. A custom store must retain the complete v2 record
|
|
69
|
+
without reconstructing it from today's registry, preserve the original host Session identity,
|
|
70
|
+
and provide atomic revision comparison. Persist original DSH events so incomplete capture can
|
|
71
|
+
be detected on reopen. No second body-reporting path is required.
|
|
72
|
+
|
|
73
|
+
Cross-system operation requires the matching SDK's capability negotiation, frozen-binding guard,
|
|
74
|
+
and the Core's target-member archive extension. Missing support reports
|
|
75
|
+
`CROSS_SYSTEM_SCOPE_UNSUPPORTED`; it is not a reason to send the first message with an old scope.
|
|
76
|
+
The matched Core requires an additive database migration through its own deployment process;
|
|
77
|
+
installing this plugin does not migrate or deploy the Hub.
|
|
78
|
+
|
|
79
|
+
## Limits
|
|
80
|
+
|
|
81
|
+
- One Hub, with independently authorized Sessions for every selected target. Cross-Hub scope
|
|
82
|
+
and multiple selected routes sharing one Agent Session are not supported.
|
|
83
|
+
- Task planning and step ordering are performed by the Agent. This is not a deterministic
|
|
84
|
+
dependency engine, a distributed transaction, automatic rollback, or cross-process task recovery.
|
|
85
|
+
- Original invocation recovery is available in later turns of the same live runtime. Archive
|
|
86
|
+
restoration after restart does not reconstruct pending invocations or approvals.
|
|
87
|
+
- Different systems' object IDs are unrelated unless a verified business mapping establishes
|
|
88
|
+
the relationship. The Agent must clarify an ambiguous mapping.
|
|
89
|
+
- The runtime enforces target and capability boundaries. It does not provide automatic
|
|
90
|
+
sensitive-text redaction or a field-level cross-system data-sharing policy.
|
|
91
|
+
- Complete transcript reading remains an administrator audit operation. An individual business
|
|
92
|
+
authorization does not grant an API to read the entire mixed transcript.
|
|
93
|
+
|
|
94
|
+
## 简体中文
|
|
95
|
+
|
|
96
|
+
本版配套 Core 0.7.0、SDK 0.5.0 与 DSH 0.5.0,插件会安装精确 SDK 依赖。
|
|
97
|
+
Core 0.6.1、SDK/DSH 0.4.0 不含本次扩展;选择不同系统前先升级中枢。
|
|
98
|
+
|
|
99
|
+
### 对使用者有什么变化
|
|
100
|
+
|
|
101
|
+
你可以在同一个会话里选中“商城”和“库存系统”的授权,让助手先查询保温杯库存,再使用商城允许的
|
|
102
|
+
改价、上架等动作。每一步都会使用对应系统的工具与授权,仍按该系统的权限和审批规则执行。
|
|
103
|
+
|
|
104
|
+
助手先看到你选中的目标目录,需要哪个系统时才查找它的能力、加载它的上下文。不会因为选中了两个系统,
|
|
105
|
+
就把每句话自动发送给两者。某个系统的查询结果进入本地模型后,会成为同一会话的上下文;只有允许这样共享
|
|
106
|
+
的数据才适合放在同一会话。完整可见沟通通过独立会话账本归档,各系统仍保留自己的操作记录。
|
|
107
|
+
|
|
108
|
+
### 怎样开始
|
|
109
|
+
|
|
110
|
+
接入方可以在中枢维护系统名称、简短用途、典型业务方向和边界。助手在首次搜索工具前就能看到本会话所选系统
|
|
111
|
+
的介绍,例如分清“线上售卖”和“库存管理”,不需要每个客户端分别写死产品词典。同系统的多个账号也会显示
|
|
112
|
+
相同的系统归属。授权主体展示接口单独提供业务授权主体的名称,用于表示具体的组织、账号、项目等;名称不证明身份,
|
|
113
|
+
也不增加权限。
|
|
114
|
+
|
|
115
|
+
系统介绍说明产品通常做什么,实际能做什么仍取决于此授权的能力查询和原有权限规则。“尚未加载”表示还未
|
|
116
|
+
查询工具,不表示没有能力。介绍缺失、旧版本不支持或介绍请求暂时失败时,可继续使用原有的授权工具搜索。
|
|
117
|
+
读取介绍本身不发送用户正文、不创建业务运行记录;同系统原有首轮运行机制保持不变。
|
|
118
|
+
|
|
119
|
+
如果服务端明确报告所选工作空间不可用,目录会显示“不可用”并保留原选择;无法确定的网络失败显示“未知”。
|
|
120
|
+
两者都不会自动切换授权,后续轮次仍查询原目标。
|
|
121
|
+
|
|
122
|
+
先分别授权并在业务授权页确认对象。授权主体展示接口由业务后端提供主体名称;名称缺失时明确显示“授权名称待同步”,
|
|
123
|
+
内部连接标识独立保留。再新建会话,使用上面的 scope 命令选中两份固定授权。
|
|
124
|
+
等选择成功后,再明确提出操作对象和要做的事。首次消息后范围固定;需要增减系统时新建会话。
|
|
125
|
+
|
|
126
|
+
如果库存里的商品与商城中的某个商品需要关联,应使用已经确认的业务映射,或由用户明确确认。
|
|
127
|
+
两个系统的商品名或编号看起来相同,并不能证明它们是同一对象。库存查询不等于锁库存或建立自动库存同步。
|
|
128
|
+
|
|
129
|
+
### 下游需要配合什么
|
|
130
|
+
|
|
131
|
+
宿主继续使用现有五个范围与归档接口,不需要另加一条正文上报链路。界面可以按新返回的系统字段分组展示,
|
|
132
|
+
并继续保持“选择成功才允许发首条消息”。内置持久化已支持新记录;自定义存储需要原样保留 v2 的目标绑定、
|
|
133
|
+
原会话身份、事件和修订号。Core 0.7.0 需要通过自身升级流程应用未执行的迁移(本次包括 058/059)。
|
|
134
|
+
|
|
135
|
+
业务后端只需继续声明能力、独立授权并执行原有业务规则;如果用户要做的动作尚未开放,才需要补充该业务能力。
|
|
136
|
+
本版解决跨系统选择、调用和完整追溯,不包含周年庆等长任务的持久依赖调度、跨进程恢复或自动回滚。
|
package/docs/GETTING_STARTED.md
CHANGED
|
@@ -1,92 +1,152 @@
|
|
|
1
|
-
# Get started
|
|
1
|
+
# Get started with 0.5.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.7.0, a public Client App ID, a workspace, and the business
|
|
5
|
+
browser-authorization entry first. For multiple systems, prepare one independently authorized
|
|
6
|
+
connection per target on the same Hub and audit domain. Existing business capability declarations
|
|
7
|
+
remain valid; each requested action must already be exposed by its own system.
|
|
6
8
|
|
|
7
|
-
##
|
|
9
|
+
## 1. Install and configure
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
Use Node.js `22.19.0+` or `24+` and the compatible DSH version:
|
|
10
12
|
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Workspace
|
|
15
|
-
Connection Name
|
|
13
|
+
```bash
|
|
14
|
+
npm install --global pnpm @deepseek-ai/dsh@0.1.1-rc.2
|
|
15
|
+
dsh plugin --profile web add dsh-bailinghub@0.5.0
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
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:
|
|
18
|
+
The plugin installs SDK 0.5.0 automatically. Enter the four public values in DSH plugin settings,
|
|
19
|
+
or use their environment names. The example values below are placeholders:
|
|
25
20
|
|
|
26
21
|
```bash
|
|
27
|
-
|
|
22
|
+
export BAILINGHUB_HUB_URL='https://hub.example.com'
|
|
23
|
+
export BAILINGHUB_CLIENT_APP_ID='example-agent-client'
|
|
24
|
+
export BAILINGHUB_WORKSPACE='order_assistant'
|
|
25
|
+
export BAILINGHUB_CONNECTION_NAME='Store A'
|
|
26
|
+
dsh --profile web --dump-config
|
|
27
|
+
dsh web
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
Use your administrator's Hub URL, Client App ID, and workspace. `Connection Name` is your local
|
|
31
|
+
label. None of these fields is a credential. Never put passwords, Client Tokens, signing secrets,
|
|
32
|
+
model keys, or business API/authorization URLs into the plugin settings or chat.
|
|
31
33
|
|
|
32
|
-
## 2.
|
|
34
|
+
## 2. Authorize each account
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
In DSH, authorize the first account:
|
|
35
37
|
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export BAILINGHUB_CONNECTION_NAME='default'
|
|
38
|
+
```text
|
|
39
|
+
/bailinghub login
|
|
40
|
+
/bailinghub doctor
|
|
41
|
+
/bailinghub status
|
|
41
42
|
```
|
|
42
43
|
|
|
43
|
-
The
|
|
44
|
-
|
|
44
|
+
The browser opens the original business authorization page. Sign in or switch accounts there,
|
|
45
|
+
select the intended store/tenant when asked, and check the actual identity before approving.
|
|
46
|
+
The business page determines the identity; the local label `Store A` does not. A compatible
|
|
47
|
+
backend supplies the approved subject name automatically. The current display name is separate
|
|
48
|
+
from its fixed key and the system description; missing names remain explicit. Duplicate names
|
|
49
|
+
or renames do not recreate authorization or change old conversation records.
|
|
45
50
|
|
|
46
|
-
|
|
51
|
+
For another account in the **same system and workspace**, register a clearly named connection,
|
|
52
|
+
using the same three administrator-provided values, then authorize it separately:
|
|
47
53
|
|
|
48
|
-
|
|
54
|
+
```text
|
|
55
|
+
/bailinghub connections add "Store B" https://hub.example.com example-agent-client order_assistant
|
|
56
|
+
/bailinghub login
|
|
57
|
+
/bailinghub connections list
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Confirm Store B on the business page. If you approve the same trusted identity again, the SDK
|
|
61
|
+
replaces its old connection and Session instead of creating a second identity. If an existing
|
|
62
|
+
name returns a different identity, the original connection remains and the new identity receives
|
|
63
|
+
an available alias. Names such as `default-2` do not prove which store was authorized. Check the
|
|
64
|
+
mapping before use. If login reports cleanup required, the new connection is already authorized;
|
|
65
|
+
inspect and remove the reported old entry rather than authorizing again.
|
|
66
|
+
|
|
67
|
+
To add a **different system**, use its administrator-provided Client App and workspace on the
|
|
68
|
+
same Hub, then authorize it independently. For example, an inventory target may use:
|
|
49
69
|
|
|
50
70
|
```text
|
|
71
|
+
/bailinghub connections add "Inventory" https://hub.example.com inventory-client inventory_assistant
|
|
51
72
|
/bailinghub login
|
|
52
|
-
/bailinghub
|
|
53
|
-
/bailinghub workspaces
|
|
73
|
+
/bailinghub connections list
|
|
54
74
|
```
|
|
55
75
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
business identity and requested workspace before approving. Authorization uses the business
|
|
59
|
-
system's own login; it does not send the business password or business URL to the plugin.
|
|
76
|
+
These are placeholders, not values to guess from a product name. Each selected target needs its
|
|
77
|
+
own original Agent Session. Keep the existing Store B connection if using the same-system flow.
|
|
60
78
|
|
|
61
|
-
|
|
62
|
-
same Hub/client/workspace binding again, the SDK replaces the older local connection. A different
|
|
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.
|
|
79
|
+
## 3. Choose this conversation's business scope
|
|
69
80
|
|
|
70
|
-
|
|
81
|
+
Start a **new conversation before sending any message**, then run:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
/bailinghub connections list
|
|
85
|
+
/bailinghub scope set <shop-connection-key> <inventory-connection-key>
|
|
86
|
+
/bailinghub scope
|
|
87
|
+
```
|
|
71
88
|
|
|
72
|
-
|
|
73
|
-
|
|
89
|
+
Copy the fixed connection keys from the list; the scope command does not accept names. Select
|
|
90
|
+
one key for one account, several for the same system, or several systems on one Hub and audit
|
|
91
|
+
domain. Wait for successful confirmation. With the required inventory/shop capabilities and a
|
|
92
|
+
confirmed product mapping, you can ask:
|
|
74
93
|
|
|
75
94
|
```text
|
|
76
|
-
|
|
95
|
+
Check tumbler stock. If any are available, change the corresponding shop product to 59 and list it.
|
|
96
|
+
Otherwise leave it unlisted.
|
|
77
97
|
```
|
|
78
98
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
permissions must remain unavailable.
|
|
99
|
+
The system description can explain online selling versus inventory before tool search. “Not loaded”
|
|
100
|
+
means tools have not been queried, not that none exist. A stock read does not reserve or synchronize
|
|
101
|
+
stock. Check price and listing outcomes separately, including any pending approval.
|
|
83
102
|
|
|
84
|
-
|
|
103
|
+
For the retained same-system flow, select Store A and Store B instead and compare their sales
|
|
104
|
+
when reporting tools are available. A system that was not used must not be marked as executed.
|
|
85
105
|
|
|
86
|
-
The
|
|
87
|
-
|
|
88
|
-
|
|
106
|
+
The Agent chooses which selected authorization to use for each call. The system still decides
|
|
107
|
+
which data and actions that authorization permits. Test a read first, then a reversible permitted
|
|
108
|
+
update in a development workspace. Approval-required work follows the original approval flow.
|
|
109
|
+
|
|
110
|
+
Without a selection, or with `/bailinghub scope none`, the conversation is ordinary chat and
|
|
111
|
+
starts no BailingHub business runs. The first message freezes this choice. Start a new conversation
|
|
112
|
+
to change accounts or enable business access after ordinary chat. Changing the registry's default
|
|
113
|
+
connection does not change a conversation's scope.
|
|
114
|
+
|
|
115
|
+
## 4. Check results and the visible conversation
|
|
116
|
+
|
|
117
|
+
Check the actual business result and its original invocation trail in BailingHub. With the matching
|
|
118
|
+
Core 0.7.0, you can also follow visible user/assistant messages, turns, and the linked runs as one
|
|
119
|
+
conversation record. Multi-authorization runs keep their own call summaries separately.
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
/bailinghub archive status
|
|
123
|
+
/bailinghub archive sync
|
|
124
|
+
```
|
|
89
125
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
126
|
+
The first command shows upload status; the second retries the saved record. It never repeats a
|
|
127
|
+
business action. `synced` means saved events were acknowledged, not that an action succeeded.
|
|
128
|
+
`pending` means upload is unfinished; `blocked` means the original authorizations cannot currently
|
|
129
|
+
permit it; `unsupported` means the SDK or Hub lacks the archive contract. `storage_error` or
|
|
130
|
+
`recovery_gap` means capture itself may be incomplete. Missing host history is unverified.
|
|
131
|
+
|
|
132
|
+
## 5. Reconnect or reopen
|
|
133
|
+
|
|
134
|
+
A saved business conversation restores its original selected accounts only after they all pass
|
|
135
|
+
validation. If it was reopened offline, reconnect and run `/bailinghub archive sync` or
|
|
136
|
+
`/bailinghub scope` in that same conversation. Temporary uncertainty can recover; a revoked or
|
|
137
|
+
replaced authorization, corrupt snapshot, or storage conflict remains blocked for the whole scope.
|
|
138
|
+
There is no automatic fallback to another account.
|
|
139
|
+
|
|
140
|
+
Restoring scope and retrying uploads does **not** restore unfinished business invocations or
|
|
141
|
+
approvals after a process restart. A never-started saved draft needs selection again. An older
|
|
142
|
+
started conversation with no valid scope snapshot must be left as history; begin a new one.
|
|
143
|
+
Use `/bailinghub sync` only to retry a pending run completion in the still-running conversation.
|
|
144
|
+
|
|
145
|
+
All selected accounts' context shares the local model conversation. The private local archive
|
|
146
|
+
contains plaintext visible task text and stays on disk until manually removed; it does not capture
|
|
147
|
+
hidden reasoning, attachments, or all past history. Read [Privacy](../PRIVACY.md), and use separate
|
|
148
|
+
conversations when account data must remain separate. Do not paste secrets into visible messages.
|
|
149
|
+
|
|
150
|
+
If setup fails, include versions, operating system, failed command, and redacted error text in a
|
|
151
|
+
[GitHub Issue](https://github.com/bailinghub/bailinghub-dsh-plugin/issues). Never attach credentials,
|
|
152
|
+
private URLs, authorization codes, personal data, or production payloads.
|