dsh-bailinghub 0.4.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 +34 -0
- package/PRIVACY.md +46 -7
- package/README.md +32 -20
- package/SECURITY.md +37 -4
- package/docs/AGENT_CLIENT_CONTRACT.md +176 -11
- package/docs/COMPATIBILITY.md +49 -4
- package/docs/CROSS_SYSTEM_CONVERSATIONS.md +136 -0
- package/docs/GETTING_STARTED.md +37 -11
- package/docs/GETTING_STARTED.zh-CN.md +32 -12
- package/docs/MIGRATION_VNEXT.md +70 -7
- package/docs/PROJECT_BOUNDARIES.md +4 -1
- package/docs/README.zh-CN.md +25 -18
- package/docs/RELEASE_NOTES_v0.5.0.md +79 -0
- package/lib/authorizations.js +23 -8
- package/lib/conversation-archive-store.js +2 -2
- package/lib/conversation-outbox.js +13 -7
- package/lib/runtime.js +215 -44
- package/lib/session-scope-store.js +2 -2
- package/lib/session-scope.js +100 -26
- package/lib/subject-display.js +39 -0
- package/lib/system-info.js +76 -0
- package/lib/transport.js +15 -0
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0 - 2026-09-10
|
|
4
|
+
|
|
5
|
+
### Shop and inventory in one conversation
|
|
6
|
+
|
|
7
|
+
See [release scenarios and upgrade steps](docs/RELEASE_NOTES_v0.5.0.md): check inventory, update a shop price and follow the listing result or approval. Business tools and confirmed product mappings are prerequisites.
|
|
8
|
+
|
|
9
|
+
- Show the business-supplied name of an authorized organization, account, project or other subject
|
|
10
|
+
separately from its product's purpose. Keep local connection selectors independent and explicitly
|
|
11
|
+
identify missing names, unsupported metadata and cached display data. Renames and duplicate names
|
|
12
|
+
preserve original scope, Session, invocation and archive identities and historical labels.
|
|
13
|
+
- Understand each selected system's purpose before searching its tools. Read administrator-managed
|
|
14
|
+
descriptions using the original authorization binding, consistently for one account, multiple
|
|
15
|
+
accounts in one system, or multiple systems. Descriptions grant no permissions and create no runs.
|
|
16
|
+
- Distinguish unknown or not-yet-loaded capabilities from unavailable services. Missing metadata
|
|
17
|
+
and older metadata APIs preserve existing business flows; identity failures still block the whole
|
|
18
|
+
scope. Cancelled description requests cannot replace a newer turn's directory.
|
|
19
|
+
- Select authorized targets from different applications or workspaces on one Hub in the same
|
|
20
|
+
conversation. The Agent discovers each target's capabilities only when needed; unrelated
|
|
21
|
+
targets do not automatically receive the full user turn or load their context.
|
|
22
|
+
- Keep same-named capabilities from different systems separate. Each call and recovery retains
|
|
23
|
+
its original connection, application, workspace, Session, run and invocation.
|
|
24
|
+
- Keep one visible conversation archive with independently verified target members. Persist
|
|
25
|
+
cross-system scope/outbox v2 while retaining same-system v1 snapshots and APIs.
|
|
26
|
+
- Require explicit SDK/Core capability support for cross-system scope. Older combinations
|
|
27
|
+
refuse the new mode while retaining existing same-system behavior.
|
|
28
|
+
- Pair with Core 0.7.0 and pin exact SDK 0.5.0. Preserve existing credentials, v1 scopes and original
|
|
29
|
+
archive events; open a new conversation when choosing targets from different systems.
|
|
30
|
+
- Keep the same-Hub, same-audit-domain boundary. This is not a durable task scheduler, automatic
|
|
31
|
+
product mapping, stock synchronization, cross-system transaction or business rollback engine.
|
|
32
|
+
- Retain the transitive Hono 4.13.7 update for upstream fixes.
|
|
33
|
+
|
|
34
|
+
See the [migration guide](docs/MIGRATION_VNEXT.md) for upgrading from 0.4.0 or an older native
|
|
35
|
+
version. Maintainer and synthetic compatibility checks are not independent production adoption.
|
|
36
|
+
|
|
3
37
|
## 0.4.0 - 2026-09-08
|
|
4
38
|
|
|
5
39
|
### For users
|
package/PRIVACY.md
CHANGED
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
# Privacy
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Cross-system conversations in 0.5.0
|
|
4
|
+
|
|
5
|
+
The 0.5.0 cross-system mode is opt-in through an explicit selected target set on one Hub.
|
|
6
|
+
Before business execution, the original members and the Hub's capability support are verified.
|
|
7
|
+
The Agent initially receives only a directory of authorization references, business subject display
|
|
8
|
+
names, controlled system descriptions, opaque system references and workspace names. Descriptions
|
|
9
|
+
and names are read under the original selection without sending user text or creating a run. A target starts its run only after an explicit capability
|
|
10
|
+
search or recovery selecting that target. The search query becomes that target's task input;
|
|
11
|
+
the full original user message is retained in the independent conversation archive instead of
|
|
12
|
+
automatically being sent to every target's run. Other selected targets may receive authorization
|
|
13
|
+
checks and archive membership confirmation, but no automatic business context request.
|
|
14
|
+
|
|
15
|
+
Query text is model-authored. Minimal disclosure is instructed, not an automatic redaction or
|
|
16
|
+
field-level data-flow policy: the local model can see all activated target context and the visible
|
|
17
|
+
conversation. Only use a shared conversation where that sharing is allowed. Cross-system object
|
|
18
|
+
relationships must come from verified mappings or explicit user confirmation, not matching names.
|
|
19
|
+
Original system/workspace bindings stay attached to tools, results and execution records.
|
|
20
|
+
|
|
21
|
+
Cross-system scope and outbox v2 persist each member's public Hub/app/workspace and original
|
|
22
|
+
Session with the same storage protections and plaintext archive boundary below. Same-system v1
|
|
23
|
+
records remain unchanged. The full transcript belongs to the independent Hub management audit;
|
|
24
|
+
holding one target's authorization does not grant full-transcript reading. This release does
|
|
25
|
+
not upload hidden reasoning or provide cross-process business-task recovery.
|
|
26
|
+
|
|
27
|
+
The following sections describe the retained same-system flow introduced in 0.4.0, and common
|
|
28
|
+
storage/archiving behavior. The cross-system target-query rules above take precedence for v2 scopes.
|
|
29
|
+
|
|
30
|
+
This bundle adds no telemetry and stores no BailingHub credentials. The native plugin
|
|
4
31
|
persists session-scope metadata and, when the SDK supports conversation archives, a separate
|
|
5
32
|
private outbox containing visible task text as described below.
|
|
6
33
|
|
|
@@ -12,9 +39,9 @@ using personal, confidential, or regulated data.
|
|
|
12
39
|
Do not include tokens, private URLs, personal information, or production payloads in public
|
|
13
40
|
issues, screenshots, or compatibility reports.
|
|
14
41
|
|
|
15
|
-
## Native Agent Client
|
|
42
|
+
## Native Agent Client: retained same-system data flow
|
|
16
43
|
|
|
17
|
-
After explicit nonempty scope selection, the
|
|
44
|
+
After explicit nonempty same-system scope selection, the plugin sends each direct human user turn
|
|
18
45
|
to BailingHub Core and receives model-visible instructions, memory, reference-only knowledge, governance, and active tool schemas.
|
|
19
46
|
Business tool arguments and governed results cross the same boundary. At completion it sends a
|
|
20
47
|
hash-aliased message id, legal status, optional model/runtime labels, and numeric public usage. A single-authorization run receives the visible final answer;
|
|
@@ -30,9 +57,19 @@ The multi-connection registry contains public connection name, Hub URL, client a
|
|
|
30
57
|
timestamps, and current-selection state. It does not contain access tokens, refresh tokens, model
|
|
31
58
|
keys, business cookies, prompts, tool arguments, or business results.
|
|
32
59
|
|
|
60
|
+
## Authorization display metadata
|
|
61
|
+
|
|
62
|
+
The SDK may cache the business-supplied subject name in a separate private display-only record
|
|
63
|
+
bound to the original connection and Session. A connection list can read that cache without a
|
|
64
|
+
network request; `cache` does not claim the name or authorization was freshly verified. Credential
|
|
65
|
+
storage and the registry are independent. The plugin retains current metadata in memory for
|
|
66
|
+
presentation; a refresh does not rewrite scope, archive events or frozen historical labels.
|
|
67
|
+
Controlled system descriptions are fetched for each selected member and are not persisted by
|
|
68
|
+
this adapter. See the [host contract](docs/AGENT_CLIENT_CONTRACT.md#authorization-subject-display-050).
|
|
69
|
+
|
|
33
70
|
## Same-system authorization selection
|
|
34
71
|
|
|
35
|
-
|
|
72
|
+
The same-system scope introduced in 0.4.0 includes only the authorization keys explicitly selected for a DSH
|
|
36
73
|
conversation, restricted to the same Hub/client/workspace binding. Unset or empty scope means
|
|
37
74
|
ordinary chat: no BailingHub run starts, no BailingHub business tool is registered, and the plugin
|
|
38
75
|
does not send that conversation's user input to a business system. Logging in or selecting a
|
|
@@ -42,7 +79,9 @@ DSH, the configured model provider, or unrelated host tools.
|
|
|
42
79
|
The host snapshots the selected connection bindings and exposes only session-local authorization
|
|
43
80
|
references, local display names, and availability as the selection directory. It does not expose
|
|
44
81
|
the raw registry, credentials, connection keys, or Session inspection responses to the model.
|
|
45
|
-
|
|
82
|
+
In 0.5.0, current business-supplied subject names are display metadata, separate from system
|
|
83
|
+
descriptions, frozen historical labels and fixed authorization references. Neither a name nor a
|
|
84
|
+
cached display record proves current identity. Names do not grant permission or rewrite history.
|
|
46
85
|
|
|
47
86
|
After the full selection is validated, each user turn is sent to a separate Core run under each
|
|
48
87
|
selected authorization to obtain its instructions, governance, memory, and reference-only
|
|
@@ -58,7 +97,7 @@ default or silently retaining a subset.
|
|
|
58
97
|
Each business call uses only its selected authorization. Recovery retains the original
|
|
59
98
|
authorization and invocation. At completion, multi-authorization runs receive separate
|
|
60
99
|
deterministic summaries of their own governed calls, not the combined visible final answer or
|
|
61
|
-
another authorization's results. SDK 0.
|
|
100
|
+
another authorization's results. SDK 0.5.0 with Core 0.7.0 also sends the combined visible
|
|
62
101
|
conversation through the independent archive boundary below. Single-authorization conversations
|
|
63
102
|
retain the existing visible-answer completion flow.
|
|
64
103
|
Hidden reasoning is never uploaded by the adapter.
|
|
@@ -89,7 +128,7 @@ tasks across a process restart.
|
|
|
89
128
|
|
|
90
129
|
## Visible conversation archive
|
|
91
130
|
|
|
92
|
-
For a nonempty frozen scope, SDK 0.
|
|
131
|
+
For a nonempty frozen scope, SDK 0.5.0 with Core 0.7.0 sends the claimed user messages,
|
|
93
132
|
visible assistant text, turn boundaries, and original run links as one conversation audit owned
|
|
94
133
|
by the complete selected authorization set. Visible text may itself contain personal or business
|
|
95
134
|
data; the adapter does not claim to redact arbitrary secrets pasted into that text. It never adds
|
package/README.md
CHANGED
|
@@ -6,14 +6,21 @@ Ask your local DeepSeek Harness Agent to work with a business system connected t
|
|
|
6
6
|
find records, update allowed fields, and follow the system's existing approval rules.
|
|
7
7
|
BailingHub records which authorization was used and what each business action returned.
|
|
8
8
|
|
|
9
|
-
**Version 0.
|
|
10
|
-
|
|
9
|
+
**Version 0.5.0 lets one conversation use authorizations from different systems on the same Hub.**
|
|
10
|
+
Authorize a shop and inventory system separately, select both for a new conversation and ask:
|
|
11
11
|
|
|
12
|
-
>
|
|
12
|
+
> Check tumbler stock. If any are available, change the corresponding shop product's price to 59
|
|
13
|
+
> and list it; otherwise leave it unlisted.
|
|
13
14
|
|
|
14
|
-
The Agent
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
The Agent reads stock with the inventory authorization, then uses the shop authorization for the
|
|
16
|
+
permitted price and listing actions. Those capabilities must already exist, and the product mapping
|
|
17
|
+
must be confirmed. A stock read does not reserve or synchronize stock. Price changes, listing
|
|
18
|
+
results and approvals are tracked separately.
|
|
19
|
+
|
|
20
|
+
The 0.4.0 same-system flow remains available: select Store A and Store B to compare sales without
|
|
21
|
+
switching a global connection. New system descriptions explain each selected system's purpose
|
|
22
|
+
before tool search, and business-supplied names identify the approved organization, account or
|
|
23
|
+
other subject. See [what changed and how to upgrade](docs/RELEASE_NOTES_v0.5.0.md).
|
|
17
24
|
|
|
18
25
|
It also keeps the visible conversation together with links to its business actions. If uploading
|
|
19
26
|
that record fails, it can retry after reconnecting or restarting without repeating those actions.
|
|
@@ -25,15 +32,15 @@ recommended by DeepSeek.
|
|
|
25
32
|
|
|
26
33
|
You need Node.js `22.19.0+` or `24+`, pnpm, and a compatible DeepSeek Harness release. Your
|
|
27
34
|
administrator must first connect the business system to BailingHub. The matched release set is
|
|
28
|
-
**BailingHub Core 0.
|
|
35
|
+
**BailingHub Core 0.7.0 → BailingHub MCP/SDK 0.5.0 → this plugin 0.5.0**.
|
|
29
36
|
|
|
30
37
|
```bash
|
|
31
38
|
npm install --global pnpm @deepseek-ai/dsh@0.1.1-rc.2
|
|
32
|
-
dsh plugin --profile web add dsh-bailinghub@0.
|
|
39
|
+
dsh plugin --profile web add dsh-bailinghub@0.5.0
|
|
33
40
|
```
|
|
34
41
|
|
|
35
|
-
The plugin installs its exact `bailinghub-mcp-server@0.
|
|
36
|
-
For an existing installation, read the [
|
|
42
|
+
The plugin installs its exact `bailinghub-mcp-server@0.5.0` dependency automatically.
|
|
43
|
+
For an existing installation, read the [migration steps from 0.4.0 and earlier](docs/MIGRATION_VNEXT.md).
|
|
37
44
|
|
|
38
45
|
Follow the [getting started guide](docs/GETTING_STARTED.md) to enter your administrator's four
|
|
39
46
|
public connection values and authorize in the browser. Do not put a business password, Client
|
|
@@ -41,21 +48,26 @@ Token, signing secret, or model-provider key into this plugin's settings or chat
|
|
|
41
48
|
|
|
42
49
|
## Choose the accounts for each conversation
|
|
43
50
|
|
|
44
|
-
Authorize each account separately through
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
Authorize each account separately through its original business authorization page and verify the
|
|
52
|
+
approved subject. A compatible business backend supplies its display name automatically, such as
|
|
53
|
+
“Brand flagship store” or “Main warehouse”. A missing name is shown as “Authorization name pending
|
|
54
|
+
sync”; the plugin does not guess it from a local alias.
|
|
55
|
+
|
|
56
|
+
Names are for display only. Duplicate names and renames do not merge or recreate credentials,
|
|
57
|
+
change an original Session, or rewrite history. Keep the local connection selector and fixed key
|
|
58
|
+
independent from both the current business name and the system description.
|
|
48
59
|
|
|
49
60
|
In a **new conversation, before the first message**, run:
|
|
50
61
|
|
|
51
62
|
```text
|
|
52
63
|
/bailinghub connections list
|
|
53
|
-
/bailinghub scope set <
|
|
64
|
+
/bailinghub scope set <shop-connection-key> <inventory-connection-key>
|
|
54
65
|
/bailinghub scope
|
|
55
66
|
```
|
|
56
67
|
|
|
57
68
|
Replace the placeholders with the fixed keys from the list, not connection names. You can select
|
|
58
|
-
just one account
|
|
69
|
+
just one account, several accounts in one system, or several systems on the same Hub and audit
|
|
70
|
+
domain. Each selected target must have its own original Agent Session.
|
|
59
71
|
Wait for the command to confirm the selection, then send your request.
|
|
60
72
|
|
|
61
73
|
**New conversations start as ordinary chat until you select their business scope.** Logging in or
|
|
@@ -63,8 +75,8 @@ changing the default connection does not enable business tools. `/bailinghub sco
|
|
|
63
75
|
chooses ordinary chat. The first user message freezes the selection; start a new conversation to
|
|
64
76
|
change accounts or move from ordinary chat to business access.
|
|
65
77
|
|
|
66
|
-
|
|
67
|
-
call; it does not receive credentials. Every action still uses that account's own permissions and
|
|
78
|
+
Matching tools within one system are shared; same-named tools from different systems remain
|
|
79
|
+
separate. The Agent chooses the authorization for each call; it does not receive credentials. Every action still uses that account's own permissions and
|
|
68
80
|
approval rules. An approval-required action continues the original call after approval while that
|
|
69
81
|
conversation is still running.
|
|
70
82
|
|
|
@@ -75,7 +87,7 @@ A confirmed revocation or identity change requires a new conversation with a val
|
|
|
75
87
|
|
|
76
88
|
## Follow the conversation and its actions
|
|
77
89
|
|
|
78
|
-
With Core 0.
|
|
90
|
+
With Core 0.7.0 and SDK 0.5.0, BailingHub can show the visible user and assistant messages, turn
|
|
79
91
|
boundaries, and links to the original business runs as one conversation record. Each authorization
|
|
80
92
|
also keeps its own business-call record; the combined reply is not copied into every account's
|
|
81
93
|
memory.
|
|
@@ -164,7 +176,7 @@ current-turn dynamic schemas. See the [compatibility matrix](docs/COMPATIBILITY.
|
|
|
164
176
|
|
|
165
177
|
Public `dsh-bailinghub@0.1.1` remains the separate static MCP compatibility path. It starts
|
|
166
178
|
`bailinghub-mcp-server@0.1.1`, uses one operator-provided route-scoped Client Token, and leaves
|
|
167
|
-
orchestration in BailingHub.
|
|
179
|
+
orchestration in BailingHub. The native plugin does not read or convert that credential. Keep the exact
|
|
168
180
|
legacy version when using that path and follow the [migration guide](docs/MIGRATION_VNEXT.md).
|
|
169
181
|
|
|
170
182
|
Report issues at [GitHub Issues](https://github.com/bailinghub/bailinghub-dsh-plugin/issues) with
|
package/SECURITY.md
CHANGED
|
@@ -4,6 +4,39 @@ Report vulnerabilities through a private GitHub Security Advisory in this reposi
|
|
|
4
4
|
Do not put tokens, private deployment URLs, personal information, or raw business payloads
|
|
5
5
|
in a public issue.
|
|
6
6
|
|
|
7
|
+
## Cross-system scope in 0.5.0
|
|
8
|
+
|
|
9
|
+
Different applications/workspaces may participate only through a frozen same-Hub target set,
|
|
10
|
+
with a distinct original Session per target. Capability support must be explicitly negotiated;
|
|
11
|
+
unsupported Core/SDK combinations cannot start cross-system business runs. Each member keeps
|
|
12
|
+
its own app/workspace binding, credential checks, approval rules and original invocations.
|
|
13
|
+
The SDK verifies the full expected binding before target HTTP dispatch, including refresh.
|
|
14
|
+
|
|
15
|
+
Capability search requires an explicit target and sends a model-authored, task-specific query;
|
|
16
|
+
it cannot fan out to all systems by omitting a selector. Identical tool names or schemas in
|
|
17
|
+
different systems do not establish shared semantics. Scoped aliases map back to an immutable
|
|
18
|
+
original capability and an allowed authorization set. The host enforces target membership;
|
|
19
|
+
it does not automatically prove the business meaning of model-generated queries or arguments.
|
|
20
|
+
|
|
21
|
+
All original members must remain valid. Temporary validation failure closes a retryable gate;
|
|
22
|
+
confirmed identity replacement or revocation blocks the complete selection. Cancellation and
|
|
23
|
+
late responses cannot reactivate ended-turn tools. Scope/outbox v2 retains original membership,
|
|
24
|
+
event IDs and CAS; a downgrade cannot reinterpret that state as v1. Full transcript reading
|
|
25
|
+
remains in the Hub's management audit boundary, not an individual member's Agent bearer.
|
|
26
|
+
|
|
27
|
+
## System descriptions and authorization names
|
|
28
|
+
|
|
29
|
+
System purpose comes from controlled Client/route metadata and is read only for selected original
|
|
30
|
+
bindings before capability search. It is descriptive data, not executable instructions or a grant
|
|
31
|
+
of tools. Business backends supply subject display names for the actual approved identity; names
|
|
32
|
+
remain separate from internal keys, original Sessions and the system description. Only the name
|
|
33
|
+
field is projected, with bounded length, valid Unicode and no control or line-separator characters.
|
|
34
|
+
|
|
35
|
+
A duplicate or changed name cannot merge authorizations, replace scope members or rewrite archived
|
|
36
|
+
labels. SDK display-cache data is auxiliary and cannot validate credentials or mask a scope/archive
|
|
37
|
+
storage error. Missing or unsupported display metadata leaves existing tools unchanged; a confirmed
|
|
38
|
+
identity failure still blocks the complete selection.
|
|
39
|
+
|
|
7
40
|
## Public legacy 0.1.x boundary
|
|
8
41
|
|
|
9
42
|
This bundle contributes configuration only. It has no custom runtime JavaScript, production
|
|
@@ -19,9 +52,9 @@ configuration and are never model tool arguments.
|
|
|
19
52
|
|
|
20
53
|
Non-loopback HTTP is denied by default. Do not enable insecure HTTP on an untrusted network.
|
|
21
54
|
|
|
22
|
-
## Native 0.
|
|
55
|
+
## Native 0.5.0 boundary
|
|
23
56
|
|
|
24
|
-
The native 0.
|
|
57
|
+
The native 0.5.0 plugin accepts only `hubUrl`, `clientAppId`, `workspace`, and
|
|
25
58
|
`connectionName`. The generic SDK owns browser authorization, refresh, and secure credential
|
|
26
59
|
storage; business endpoints and final authorization remain Core/business-system concerns. The
|
|
27
60
|
Hub Client App owns one business authorization entry. That business page, not the plugin or model,
|
|
@@ -41,7 +74,7 @@ falsely report a complete logout.
|
|
|
41
74
|
Tools are Agent/run scoped. Message ids are replaced by Core-safe hash aliases, invocation ids are
|
|
42
75
|
stable 64-character digests, and an `accepted_unknown` outcome must resume that exact invocation
|
|
43
76
|
instead of creating a replacement. Completion retries are bounded and reuse one frozen,
|
|
44
|
-
visible-only payload. Version 0.
|
|
77
|
+
visible-only payload. Version 0.5.0 installs `bailinghub-mcp-server@0.5.0` as an exact ordinary
|
|
45
78
|
dependency and resolves its `./sdk` export. It does not depend on ambient modules, an optional
|
|
46
79
|
peer, a range, a dist-tag, or a local path. Public `0.1.1` does not provide that facade.
|
|
47
80
|
|
|
@@ -52,7 +85,7 @@ plugin never receives the credential value and never writes one into Cordis conf
|
|
|
52
85
|
|
|
53
86
|
## Same-system authorization selection
|
|
54
87
|
|
|
55
|
-
|
|
88
|
+
The same-system path introduced in 0.4.0 lets the model select a session-local `authorization_ref` from the current
|
|
56
89
|
conversation's directory. This is a constrained per-call selector, not a connection-management
|
|
57
90
|
tool or authority to supply a Hub, route, raw connection key, credential, or business identity.
|
|
58
91
|
The host must first explicitly select fixed connection keys for this conversation through
|
|
@@ -1,17 +1,178 @@
|
|
|
1
1
|
# Agent Client Host Adapter Contract
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
## Authorization subject display (0.5.0)
|
|
4
|
+
|
|
5
|
+
The business backend may supply `subject_display: { name }` for the subject actually approved by
|
|
6
|
+
the user. A subject can be an organization, account, project, department, workspace or another
|
|
7
|
+
business entity; the upstream contract does not prescribe a store or any particular product.
|
|
8
|
+
The name is display data, separate from both trusted authorization identity and `system_info`
|
|
9
|
+
(the product's purpose). Only the trusted business backend supplies this name; the DSH model,
|
|
10
|
+
local alias, device label and principal identifiers are not sources for it.
|
|
11
|
+
|
|
12
|
+
The matched SDK exposes these additive fields on `login`, `status` and every `connectionsList`
|
|
13
|
+
entry, and the plugin passes them to its host:
|
|
14
|
+
|
|
15
|
+
| Field | Meaning |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| `subjectDisplay` | `{ name: string }`, or `null` when unavailable |
|
|
18
|
+
| `subjectDisplayStatus` | `provided`, `missing`, `unsupported` or `unavailable` |
|
|
19
|
+
| `subjectDisplaySource` | `verified` after the SDK reads the original Session, `cache` for display-only local data, otherwise `none` |
|
|
20
|
+
| `subjectDisplayCacheStatus` | SDK auxiliary cache outcome: `saved`, `storage_error` or `not_cached` |
|
|
21
|
+
| `displayLabel` | Plugin presentation label: the provided name, otherwise `Authorization name pending sync` |
|
|
22
|
+
|
|
23
|
+
Names are trimmed, nonempty, at most 120 UTF-16 code units, with C0/C1 controls and Unicode line
|
|
24
|
+
separators U+2028/U+2029 and unpaired surrogate code units rejected. Valid Unicode emoji are
|
|
25
|
+
preserved. Only the `name` field enters model assembly. A matching name
|
|
26
|
+
does not establish an identity or a business relationship. Cached display data proves no current
|
|
27
|
+
authorization; a real identity-validation failure still blocks the complete original scope.
|
|
28
|
+
An old SDK without these fields yields `unsupported`; a supported response without a name yields
|
|
29
|
+
`missing`. Neither condition prevents the existing authorized tools from working. A display-cache
|
|
30
|
+
write error stays auxiliary and cannot replace a scope/archive `storage_error` or `recovery_gap`.
|
|
31
|
+
|
|
32
|
+
Custom hosts may omit a user-entered remark/name field and render the returned business name.
|
|
33
|
+
Keep the internal `connectionName` selector and fixed `connectionKey` independently; do not rename,
|
|
34
|
+
merge or recreate credentials because two subjects have the same name or an existing subject is
|
|
35
|
+
renamed. A host may combine a separately trusted product name with this subject name for display.
|
|
36
|
+
When unavailable, localize the generic pending-name message; never guess the name from a product
|
|
37
|
+
description, local alias, principal identifier or list order. Older hosts can keep their current
|
|
38
|
+
connection-management UI unchanged.
|
|
39
|
+
|
|
40
|
+
`setSessionScope`, `getSessionScope` and `restoreSessionScope` add `subjectDisplay`,
|
|
41
|
+
`subjectDisplayStatus` and `subjectDisplaySource` to each visible authorization. The legacy `label`
|
|
42
|
+
is the frozen historical value: newly selected scopes capture the supplied name (or the generic
|
|
43
|
+
pending-name label), while existing stored labels remain byte-for-byte unchanged. Hosts should
|
|
44
|
+
render the new display fields for current names, not reinterpret an old `label` as verified metadata.
|
|
45
|
+
|
|
46
|
+
After the whole scope is validated, current display fields are held separately in coordinator
|
|
47
|
+
memory. They do not enter binding comparisons, persisted v1/v2 scope records or archive identity.
|
|
48
|
+
Single, same-system and cross-system model directories include `subject_display`,
|
|
49
|
+
`subject_display_status` and `subject_display_source`, separately from `system_description` and
|
|
50
|
+
`metadata_status`. The current directory `label` and attributed tool-result label use this display
|
|
51
|
+
projection; the original `authorization_ref` remains the only model target selector.
|
|
52
|
+
Scope revalidation refreshes current names without changing the selected members, original Agent
|
|
53
|
+
Sessions, frozen scope revision, historical labels, visible events or archive context. Normal archive
|
|
54
|
+
ACK writes continue their existing CAS sequence; display refresh itself writes no archive record.
|
|
55
|
+
|
|
56
|
+
## System descriptions (0.5.0)
|
|
57
|
+
|
|
58
|
+
Core 0.7.0 and SDK 0.5.0 add optional `transport.getSystemInfo({ connectionKey,
|
|
59
|
+
workspace, expectedBinding, signal })`. After the entire selected scope has passed identity
|
|
60
|
+
validation and before first model assembly, the adapter reads one description for each original
|
|
61
|
+
selected member. Requests include the original Hub/Client/workspace/Agent Session binding and
|
|
62
|
+
never user text, tools, or a run identifier. They do not create business runs or load business
|
|
63
|
+
context. Single, same-system multi-authorization and cross-system conversations use the same
|
|
64
|
+
description projection. The existing same-system first-turn run policy remains unchanged.
|
|
65
|
+
|
|
66
|
+
The response schema is `bailing.agent-system-info.v1`. Only `system.name`, `summary`, `domains`,
|
|
67
|
+
and `boundaries`, their metadata status/revision, and availability enter the model directory.
|
|
68
|
+
System references derive from the verified binding, including for a single authorization or
|
|
69
|
+
same-system group. Product purpose describes typical use; it does not grant an action or prove
|
|
70
|
+
that any tool is enabled. `not_loaded` means not yet loaded, not no capabilities. Product purpose,
|
|
71
|
+
authorization limits, tool loading and availability remain separate fields.
|
|
72
|
+
|
|
73
|
+
Descriptions are data, not executable model instructions. Missing configuration, an absent SDK
|
|
74
|
+
method, an unsupported old Core or a temporary metadata failure degrades description fields to
|
|
75
|
+
unknown without changing existing capability search. A 401/403 or changed response binding
|
|
76
|
+
blocks the original whole scope. Scope storage errors retain their existing priority. No description
|
|
77
|
+
is persisted in the scope, Session events or archive outbox; each turn reloads against the original
|
|
78
|
+
complete binding, so mutable labels or another runtime cannot supply stale system identity.
|
|
79
|
+
Cancelled or superseded requests cannot publish late metadata or reactivate business tools.
|
|
80
|
+
|
|
81
|
+
An exact HTTP 404 `route_unavailable` is different from unknown metadata: the selected target
|
|
82
|
+
remains in the directory with `metadata_status: "unknown"`, `availability: "unavailable"` and
|
|
83
|
+
directory-only `availability_reason: "route_unavailable"`. It is not old-version unsupported or
|
|
84
|
+
an authorization grant/revocation. Other ambiguous failures stay unknown. The Core wire's
|
|
85
|
+
`unavailable_reason` still accepts only the documented runtime/direct-switch reasons. A later
|
|
86
|
+
turn retries the same original binding and clears the directory reason after successful lookup.
|
|
87
|
+
|
|
88
|
+
Hosts keep the existing scope/restore/archive interfaces. The scope view now consistently includes
|
|
89
|
+
`clientAppId` and `systemRef` for all selected authorizations; this is additive and does not change
|
|
90
|
+
stored v1/v2 records. No local hard-coded product dictionary or extra body-reporting channel is
|
|
91
|
+
required. A host may keep a separately controlled fallback when metadata is unavailable, but must
|
|
92
|
+
not infer identity from local labels or expand the selected scope.
|
|
93
|
+
|
|
94
|
+
## Cross-system extension (0.5.0)
|
|
95
|
+
|
|
96
|
+
This extension requires SDK 0.5.0 and Core 0.7.0 with migration 058 applied. Subject display
|
|
97
|
+
additionally requires migration 059. Existing same-system behavior, signatures and v1 records
|
|
98
|
+
remain supported; old selected scopes never expand to include newly available targets.
|
|
99
|
+
|
|
100
|
+
The host selects fixed connection keys from one normalized Hub. Different Client Apps or
|
|
101
|
+
workspaces form different capability sources. Each target must have a distinct original Agent
|
|
102
|
+
Session; two selected routes sharing a Session are rejected. A scope never expands to another Hub,
|
|
103
|
+
registry default, newly added connection, or surviving subset after one member is lost.
|
|
104
|
+
|
|
105
|
+
Cross-system scope uses persisted `bailing.agent-session-scope.v2` with shared `binding: { hubUrl }`
|
|
106
|
+
and `authorizations` containing `{ connectionKey, sessionId, label, workspace, clientAppId }`.
|
|
107
|
+
The host view keeps `bailing.agent-session-scope.v1` and adds `targetMode: "multi_system"` and
|
|
108
|
+
per-authorization `clientAppId`/`systemRef`. Existing `authorizationRef`, key and lifecycle fields
|
|
109
|
+
retain their meaning. System references are opaque identifiers for capability sources; labels
|
|
110
|
+
remain descriptive data, not business identity or object mappings. The subject-display extension
|
|
111
|
+
above separates current business names from historical local labels.
|
|
112
|
+
|
|
113
|
+
Selection/restoration verifies the whole original group and calls SDK
|
|
114
|
+
`getConversationArchiveCapabilities({ members })`. Support requires
|
|
115
|
+
`schema: "bailing.agent-conversation-audit-capabilities.v1"`, `cross_binding_members: true`
|
|
116
|
+
and `member_bindings: "session-client-route.v1"`. Missing support produces
|
|
117
|
+
`CROSS_SYSTEM_SCOPE_UNSUPPORTED` and no cross-system business run. Temporary discovery failures
|
|
118
|
+
remain retryable under the original selection; confirmed authorization replacement remains blocked.
|
|
119
|
+
|
|
120
|
+
Initial prompt assembly registers the target directory, capability search and known-invocation
|
|
121
|
+
recovery tools, without starting any business run. In this mode `search_business_capabilities`
|
|
122
|
+
requires `{ authorization_ref, query, limit? }`. Its bounded query (up to 500 characters) is the
|
|
123
|
+
task projection passed as `userInput` to that target's first `startTurn` in the current turn.
|
|
124
|
+
The original visible user text stays in the independent archive. Subsequent searches reuse that
|
|
125
|
+
target's run. Omission/unknown target fails before dispatch; another selected target is not
|
|
126
|
+
started merely because its authorization is available. Authorization and archive membership checks
|
|
127
|
+
may still inspect the full original set.
|
|
128
|
+
|
|
129
|
+
Tools are grouped only by capability-source binding and complete declaration. Host-issued
|
|
130
|
+
`bh_...` aliases keep same-named tools from different sources separate, even with identical schemas.
|
|
131
|
+
Each alias enumerates only its own `authorization_ref` values and wraps unchanged business
|
|
132
|
+
`arguments`. The server receives the original tool name. Revisions, invocation IDs, argument
|
|
133
|
+
snapshots and original target bindings remain fixed on replay. The SDK receives host-only
|
|
134
|
+
`expectedBinding: { hubUrl, clientAppId, workspace, sessionId }` together with an explicit key
|
|
135
|
+
on status and all business calls. Model arguments cannot replace these fields.
|
|
136
|
+
Explicit search prioritizes that target's results inside the existing twelve-tool budget;
|
|
137
|
+
same-named capabilities on earlier targets cannot permanently crowd it out.
|
|
138
|
+
|
|
139
|
+
Recovery accepts only a known original invocation. When needed in a later live turn, it opens
|
|
140
|
+
only that original target's run with a recovery-specific input and resumes the original invocation;
|
|
141
|
+
it does not call the business action again. It does not restore invocation state after process restart.
|
|
142
|
+
Cancellation and superseding turns cannot register tools or dispatch a new write from a late start.
|
|
143
|
+
Each cross-system turn owns an AbortSignal combined with the host's signal. SDK dispatch checks
|
|
144
|
+
that signal after local IO and before HTTP; an in-flight write with an unknown outcome keeps its
|
|
145
|
+
original invocation identity. Completion summaries and archive upload are separate from business
|
|
146
|
+
dispatch cancellation and may still synchronize after a turn ends.
|
|
147
|
+
|
|
148
|
+
Cross-system archives use `bailing.agent-conversation-outbox.v2`. Context binding is `{ hubUrl }`;
|
|
149
|
+
each member retains `{ connectionKey, hubUrl, clientAppId, workspace, expectedSessionId, label }`.
|
|
150
|
+
Event/ACK schemas, random archive identity, source hashes, ordering, local capture-gap reporting
|
|
151
|
+
and CAS semantics remain unchanged. The SDK uses explicit cross-binding create v2 and each
|
|
152
|
+
member's own credential to confirm; the Core verifies each original app/route/Session and run link.
|
|
153
|
+
The full transcript remains available only through the management audit read boundary.
|
|
154
|
+
|
|
155
|
+
Query minimization, object mapping and step planning are Agent responsibilities. The runtime
|
|
156
|
+
enforces target/tool/invocation authority; it does not establish a deterministic dependency DAG,
|
|
157
|
+
cross-system transaction, automatic rollback or field-level data-transfer policy. Business systems
|
|
158
|
+
continue owning their capabilities, permission checks, approvals and data semantics. See the
|
|
159
|
+
[user and host guide](CROSS_SYSTEM_CONVERSATIONS.md).
|
|
160
|
+
|
|
161
|
+
Status: native Agent Client contract for `dsh-bailinghub@0.5.0`, paired with
|
|
162
|
+
`bailinghub-mcp-server@0.5.0` and BailingHub Core `0.7.0`. The same-system scope and archive
|
|
163
|
+
baseline was introduced in plugin/SDK 0.4.0 and Core 0.6.0 (recommended historical Core 0.6.1).
|
|
164
|
+
This contract is separate from the legacy static `0.1.x` path. Version 0.3.0 supported user-managed
|
|
165
|
+
connections but did not include
|
|
6
166
|
explicit conversation scope, multi-authorization tool selection, or the visible conversation archive.
|
|
7
167
|
|
|
8
168
|
## Same-System Authorization Selection
|
|
9
169
|
|
|
10
|
-
|
|
11
|
-
`Hub + clientAppId + workspace` binding in one DSH conversation. It
|
|
12
|
-
|
|
170
|
+
The retained same-system path supports multiple independently authorized identities for one
|
|
171
|
+
public `Hub + clientAppId + workspace` binding in one DSH conversation. It uses the existing v1
|
|
172
|
+
records and shared capability declarations. The cross-system v2 path above handles different
|
|
173
|
+
sources; neither path changes Core authorization or business approval rules.
|
|
13
174
|
|
|
14
|
-
Version 0.4.0
|
|
175
|
+
Version 0.4.0 changed the default: a new conversation with no selected scope, or an explicitly
|
|
15
176
|
empty `connectionKeys: []`, is ordinary chat. It starts no BailingHub run and exposes no BailingHub
|
|
16
177
|
business tools. Browser authorization, the registry's current connection, and the four bootstrap
|
|
17
178
|
fields do not select a conversation's scope. There is no automatic discovery-and-enable fallback.
|
|
@@ -125,8 +286,10 @@ frozen scope unchanged. The host must open a new conversation, not treat that re
|
|
|
125
286
|
successful selection of the requested keys. Revision values may advance more than once
|
|
126
287
|
during selection; always use the returned value for the next compare-and-swap request.
|
|
127
288
|
|
|
128
|
-
Each
|
|
129
|
-
`{ authorizationRef, connectionKey, label, workspace }`.
|
|
289
|
+
Each `authorizations` entry retains the public host-facing fields
|
|
290
|
+
`{ authorizationRef, connectionKey, label, workspace }`. Version 0.5.0 consistently adds
|
|
291
|
+
`clientAppId`, `systemRef` and the current display fields documented above for single, same-system
|
|
292
|
+
and cross-system scopes. The selection accepts at most 64 unique
|
|
130
293
|
connection keys. The trusted host owns `sessionId`: it must remain stable when reopening the same
|
|
131
294
|
conversation and be unique within that store's namespace. Do not let the model or an untrusted
|
|
132
295
|
client choose another conversation's id, edit scope records, or control the storage namespace.
|
|
@@ -184,8 +347,10 @@ Restoring a scope does **not** restore an invocation, approval, pending completi
|
|
|
184
347
|
|
|
185
348
|
### Independent visible conversation archive
|
|
186
349
|
|
|
187
|
-
The visible archive
|
|
188
|
-
Core release is `0.6.1`.
|
|
350
|
+
The original same-system visible archive uses SDK APIs introduced in `0.4.0` and Core APIs
|
|
351
|
+
introduced in `0.6.0`; the historical recommended Core release is `0.6.1`. For this release,
|
|
352
|
+
use SDK `0.5.0` with Core `0.7.0`, including cross-system member support. Earlier `0.3.0` SDK/plugin
|
|
353
|
+
packages do not provide this contract.
|
|
189
354
|
After a nonempty scope is frozen, the adapter captures claimed user text, every durable `assistant/message` text block, turn start/end, and verified original run links. It ignores
|
|
190
355
|
`assistant/chunk`, hidden reasoning, attachments, raw provider requests, and arbitrary tool payloads.
|
|
191
356
|
The archive is one record for the complete fixed authorization set; per-authorization run summaries
|
package/docs/COMPATIBILITY.md
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
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
|
|
4
47
|
|
|
5
48
|
| Component | Release pairing / requirement |
|
|
6
49
|
| --- | --- |
|
|
@@ -15,7 +58,7 @@
|
|
|
15
58
|
Core `0.6.0` is the minimum API version for this contract. Use Core `0.6.1` for the
|
|
16
59
|
recommended release pairing; the patch does not change these business APIs.
|
|
17
60
|
|
|
18
|
-
|
|
61
|
+
For this historical pairing, install `dsh-bailinghub@0.4.0`; its ordinary dependency installs the exact SDK. A release
|
|
19
62
|
requires a registry-generated lockfile and a clean package/profile check. Local source and
|
|
20
63
|
synthetic HTTP verification are compatibility evidence, not evidence of an organization's
|
|
21
64
|
production use. The older 0.3 baseline is retained below for existing users, not as a claim that
|
|
@@ -133,11 +176,13 @@ BailingHub Core release is compatible only after a separate clean legacy profile
|
|
|
133
176
|
|
|
134
177
|
Compatibility requires independent evidence for both paths:
|
|
135
178
|
|
|
136
|
-
1. Native 0.
|
|
179
|
+
1. Native 0.5: clean install of only the exact plugin package, browser authorization, workspace
|
|
137
180
|
discovery, same-identity replacement, different-identity isolation, read, permitted mutation,
|
|
138
181
|
approval/resume, visible completion, and Hub trajectory. Additionally verify explicit single/multiple
|
|
139
182
|
scope selection, full-set archive authorization, offline reopen/retry, revocation, and no business
|
|
140
|
-
replay after a lost archive acknowledgement.
|
|
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.
|
|
141
186
|
2. Legacy 0.1.1: clean static profile, fixed Client Token route, one submit, and same-job follow-up
|
|
142
187
|
through the unchanged public Client API.
|
|
143
188
|
|