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/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,85 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
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
|
+
|
|
37
|
+
## 0.4.0 - 2026-09-08
|
|
38
|
+
|
|
39
|
+
### For users
|
|
40
|
+
|
|
41
|
+
- Use independently authorized accounts for the same system in one conversation. Select Store A,
|
|
42
|
+
Store B, or both before the first message; the Agent chooses the correct authorization for each
|
|
43
|
+
available business tool without changing the global connection. Existing permissions and approvals
|
|
44
|
+
still apply. Different Hubs, Client Apps, and workspaces are outside this release.
|
|
45
|
+
- **New conversations now default to ordinary chat.** Login and connection defaults no longer enable
|
|
46
|
+
business access. Use `/bailinghub scope set <connection-key>...` and wait for confirmation before
|
|
47
|
+
the first message; later selection changes require a new conversation. See the [migration guide](docs/MIGRATION_VNEXT.md).
|
|
48
|
+
- Follow visible user/assistant messages, turn boundaries, and links to original business runs in
|
|
49
|
+
a separate conversation archive with Core 0.6.1. Multi-account runs keep their own call summaries;
|
|
50
|
+
the combined reply is not broadcast into each account's memory. Hidden reasoning is excluded.
|
|
51
|
+
- Check `/bailinghub archive status` and retry `/bailinghub archive sync` after a failed upload or
|
|
52
|
+
restart. Saved events retain their original identity; retries do not execute business actions again.
|
|
53
|
+
- Recover the original saved scope after an offline reopen on the same runtime once connectivity
|
|
54
|
+
returns and every original authorization is valid. Revocation, identity replacement, and storage
|
|
55
|
+
conflicts still block the whole scope. Scope restoration does not restore unfinished invocations,
|
|
56
|
+
approvals, or tasks after a process restart.
|
|
57
|
+
|
|
58
|
+
### Reliability and integration
|
|
59
|
+
|
|
60
|
+
- Persist non-secret scope snapshots and a separate private visible-text outbox with revision checks,
|
|
61
|
+
cross-process locks, and atomic file replacement. Expose host selection, restore, archive status,
|
|
62
|
+
and archive sync APIs. Reopened unlocked drafts require explicit confirmation; started conversations
|
|
63
|
+
without valid locked scope cannot adopt current defaults. Metadata alone does not lock a draft.
|
|
64
|
+
- Share matching typed business tools once. Multi-authorization calls use a host-issued reference
|
|
65
|
+
outside the unchanged business arguments; single-authorization arguments remain unchanged. Keep
|
|
66
|
+
the 12-tool total budget, reject conflicting declarations, and retain original invocation bindings
|
|
67
|
+
across turns of the same live conversation.
|
|
68
|
+
- Preserve stable archive event ids, original run links, and acknowledgement cursors through ambiguous
|
|
69
|
+
network retries. Report detectable missing history as `recovery_gap`, and unavailable history as
|
|
70
|
+
unverified. Local write failures and unsaved events remain visible while uploads are blocked.
|
|
71
|
+
Archive capability network failures report pending, not a false storage error.
|
|
72
|
+
- Recheck the original scope after asynchronous archive capability discovery and opening, so a
|
|
73
|
+
revocation confirmed during that work cannot return a misleading synchronized status or allow upload.
|
|
74
|
+
Concurrent business and archive callers wait for the current whole-scope validation.
|
|
75
|
+
- Keep cancelled turns ended when their original run response arrives late. Retain only the original
|
|
76
|
+
audit link, without reactivating tools, dispatching remaining members, or replacing a newer turn.
|
|
77
|
+
- Pin exact `bailinghub-mcp-server@0.4.0`. Injected older SDKs retain business operations with an
|
|
78
|
+
explicit unsupported archive status. Keep the separate public `0.1.1` static MCP path unchanged.
|
|
79
|
+
|
|
80
|
+
The archive stores plaintext visible task text locally, including acknowledged events, until the
|
|
81
|
+
host/operator removes it. It does not export all past conversations or attachments. Review
|
|
82
|
+
[Privacy](PRIVACY.md) before enabling business scope; release verification is not production adoption.
|
|
4
83
|
|
|
5
84
|
## 0.3.0 - 2026-09-01
|
|
6
85
|
|
package/PRIVACY.md
CHANGED
|
@@ -1,6 +1,35 @@
|
|
|
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
|
|
31
|
+
persists session-scope metadata and, when the SDK supports conversation archives, a separate
|
|
32
|
+
private outbox containing visible task text as described below.
|
|
4
33
|
|
|
5
34
|
Task text submitted through the installed tools is sent to the BailingHub deployment chosen
|
|
6
35
|
by the operator. DeepSeek Harness, the configured model provider, BailingHub, and the target
|
|
@@ -10,13 +39,14 @@ using personal, confidential, or regulated data.
|
|
|
10
39
|
Do not include tokens, private URLs, personal information, or production payloads in public
|
|
11
40
|
issues, screenshots, or compatibility reports.
|
|
12
41
|
|
|
13
|
-
## Native Agent Client
|
|
42
|
+
## Native Agent Client: retained same-system data flow
|
|
14
43
|
|
|
15
|
-
|
|
16
|
-
model-visible instructions, memory, reference-only knowledge, governance, and active tool schemas.
|
|
17
|
-
Business tool arguments and governed results cross the same boundary. At completion it sends
|
|
18
|
-
|
|
19
|
-
|
|
44
|
+
After explicit nonempty same-system scope selection, the plugin sends each direct human user turn
|
|
45
|
+
to BailingHub Core and receives model-visible instructions, memory, reference-only knowledge, governance, and active tool schemas.
|
|
46
|
+
Business tool arguments and governed results cross the same boundary. At completion it sends a
|
|
47
|
+
hash-aliased message id, legal status, optional model/runtime labels, and numeric public usage. A single-authorization run receives the visible final answer;
|
|
48
|
+
multi-authorization runs receive only their own deterministic call summaries. It ignores
|
|
49
|
+
`assistant/chunk` and never uploads hidden reasoning.
|
|
20
50
|
|
|
21
51
|
Browser authorization, refresh, and credential storage remain SDK-owned; this adapter stores no
|
|
22
52
|
BailingHub credential. The SDK uses macOS Keychain, Windows CurrentUser DPAPI, or an explicitly
|
|
@@ -26,3 +56,106 @@ business-system retention boundaries before enabling the plugin.
|
|
|
26
56
|
The multi-connection registry contains public connection name, Hub URL, client app id, workspace,
|
|
27
57
|
timestamps, and current-selection state. It does not contain access tokens, refresh tokens, model
|
|
28
58
|
keys, business cookies, prompts, tool arguments, or business results.
|
|
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
|
+
|
|
70
|
+
## Same-system authorization selection
|
|
71
|
+
|
|
72
|
+
The same-system scope introduced in 0.4.0 includes only the authorization keys explicitly selected for a DSH
|
|
73
|
+
conversation, restricted to the same Hub/client/workspace binding. Unset or empty scope means
|
|
74
|
+
ordinary chat: no BailingHub run starts, no BailingHub business tool is registered, and the plugin
|
|
75
|
+
does not send that conversation's user input to a business system. Logging in or selecting a
|
|
76
|
+
registry default does not select a conversation scope. This does not change the data boundary of
|
|
77
|
+
DSH, the configured model provider, or unrelated host tools.
|
|
78
|
+
|
|
79
|
+
The host snapshots the selected connection bindings and exposes only session-local authorization
|
|
80
|
+
references, local display names, and availability as the selection directory. It does not expose
|
|
81
|
+
the raw registry, credentials, connection keys, or Session inspection responses to the model.
|
|
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.
|
|
85
|
+
|
|
86
|
+
After the full selection is validated, each user turn is sent to a separate Core run under each
|
|
87
|
+
selected authorization to obtain its instructions, governance, memory, and reference-only
|
|
88
|
+
knowledge. The local Agent and its model
|
|
89
|
+
provider therefore receive context from multiple authorized identities in the same conversation.
|
|
90
|
+
Authorization labels preserve attribution; they do not create isolation from the local model.
|
|
91
|
+
Use separate conversations when those identities' data must not share that boundary.
|
|
92
|
+
The host must await and display scope confirmation before sending the first message. That first
|
|
93
|
+
user message freezes the selection. A failed selection or any unavailable selected
|
|
94
|
+
authorization pauses all BailingHub business access for the conversation, without switching to a
|
|
95
|
+
default or silently retaining a subset.
|
|
96
|
+
|
|
97
|
+
Each business call uses only its selected authorization. Recovery retains the original
|
|
98
|
+
authorization and invocation. At completion, multi-authorization runs receive separate
|
|
99
|
+
deterministic summaries of their own governed calls, not the combined visible final answer or
|
|
100
|
+
another authorization's results. SDK 0.5.0 with Core 0.7.0 also sends the combined visible
|
|
101
|
+
conversation through the independent archive boundary below. Single-authorization conversations
|
|
102
|
+
retain the existing visible-answer completion flow.
|
|
103
|
+
Hidden reasoning is never uploaded by the adapter.
|
|
104
|
+
|
|
105
|
+
The host checks the captured connection key, workspace, and original Agent Session id before
|
|
106
|
+
transport operations without projecting those inspection fields into the model's directory.
|
|
107
|
+
Invocation bindings are local to the running conversation; a new conversation or process restart
|
|
108
|
+
does not recover unknown invocation ids from that map.
|
|
109
|
+
|
|
110
|
+
The default file adapter saves scope schema/version, DSH session id, revision, lock/state, public
|
|
111
|
+
Hub/client/workspace binding, and the selected connection keys, sanitized labels, workspace, and
|
|
112
|
+
original Agent Session ids. These identifiers stay host-side; the snapshot contains no access or
|
|
113
|
+
refresh token, browser credential, prompt, business argument/result, or invocation state. Files
|
|
114
|
+
are stored under `$DSH_HOME/plugins/dsh-bailinghub/session-scopes` (`~/.dsh` is the default home),
|
|
115
|
+
with hashed session filenames and, on POSIX, mode-0600 files and mode-0700 directories. They remain local until
|
|
116
|
+
removed by the host/operator; the adapter does not upload them. An embedded host may inject its
|
|
117
|
+
own durable store and retention policy. The explicit memory store is not persistent, and storage
|
|
118
|
+
failure never causes an automatic switch to it.
|
|
119
|
+
|
|
120
|
+
On reopening a conversation, only a valid locked scope is restored after its binding and original
|
|
121
|
+
Agent Sessions are rechecked. A stored unlocked draft needs explicit scope confirmation again;
|
|
122
|
+
loading it does not query its old authorizations or send them user input. A failed replacement
|
|
123
|
+
write can leave that draft on disk, but it still cannot reactivate automatically in a new runtime.
|
|
124
|
+
Configuration or metadata history alone does not lock a never-started draft. Missing or invalid
|
|
125
|
+
scope snapshots on started conversations do not adopt current registry connections.
|
|
126
|
+
Restoring that scope does not recover pending business invocations, approvals, completions, or
|
|
127
|
+
tasks across a process restart.
|
|
128
|
+
|
|
129
|
+
## Visible conversation archive
|
|
130
|
+
|
|
131
|
+
For a nonempty frozen scope, SDK 0.5.0 with Core 0.7.0 sends the claimed user messages,
|
|
132
|
+
visible assistant text, turn boundaries, and original run links as one conversation audit owned
|
|
133
|
+
by the complete selected authorization set. Visible text may itself contain personal or business
|
|
134
|
+
data; the adapter does not claim to redact arbitrary secrets pasted into that text. It never adds
|
|
135
|
+
SDK credentials, hidden reasoning, raw provider requests, attachments, or arbitrary tool payloads.
|
|
136
|
+
The combined conversation is not broadcast to each authorization's memory. Empty scope remains
|
|
137
|
+
outside this archive boundary. Review the whole selected group's data-sharing permission before
|
|
138
|
+
sending the first message.
|
|
139
|
+
If an original run response arrives after cancellation, only its audit link is retained for that
|
|
140
|
+
ended turn; it does not reactivate business tools, dispatch remaining members, or replace a newer turn.
|
|
141
|
+
|
|
142
|
+
The independent outbox lives under `$DSH_HOME/plugins/dsh-bailinghub/conversation-outbox` by default.
|
|
143
|
+
It contains a random persistent archive id, frozen public bindings/original Session ids, visible
|
|
144
|
+
events, hashes, and synchronization cursor. POSIX directories use `0700` and files `0600`; text is
|
|
145
|
+
not encrypted by this adapter. Outboxes remain on disk, including acknowledged events, until the
|
|
146
|
+
host/operator removes them. Hosts may inject a different durable store and retention policy;
|
|
147
|
+
there is no automatic retention cleanup or deletion of the separate Hub audit. Removing a local
|
|
148
|
+
outbox loses retry identity/history and must not be treated as deleting the remote record.
|
|
149
|
+
|
|
150
|
+
Network failures preserve successfully written events for later upload. Local write failures do
|
|
151
|
+
not prove durable capture. Reopened DSH history is checked for detectable missing visible events,
|
|
152
|
+
reported as `recovery_gap`; unavailable host history is marked unverified. Previously unarchived
|
|
153
|
+
messages, attachments, and hidden content are not claimed as a complete transcript. The archive
|
|
154
|
+
does not restore business invocation or approval execution after restart. An older SDK reports
|
|
155
|
+
unsupported without creating an outbox, and business calls remain available.
|
|
156
|
+
|
|
157
|
+
An offline reopen keeps the original frozen scope closed until every member can be revalidated.
|
|
158
|
+
A later retry on the same runtime may recover a temporary network failure, but cannot recover
|
|
159
|
+
confirmed revocation, replacement identity, or a storage conflict. Archive status retains known
|
|
160
|
+
unsaved events and history gaps while upload is blocked. Revocation confirmed during asynchronous
|
|
161
|
+
archive capability discovery or opening is rechecked before reporting availability or uploading.
|