dsh-bailinghub 0.7.0 → 0.8.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 +5 -0
- package/README.md +7 -8
- package/docs/AGENT_CLIENT_CONTRACT.md +25 -5
- package/docs/AGENT_KNOWLEDGE.md +62 -0
- package/docs/CAPABILITY_FEEDBACK.md +32 -3
- package/docs/COMPATIBILITY.md +8 -8
- package/docs/CONTEXT_DELIVERY.md +133 -0
- package/docs/GETTING_STARTED.md +4 -4
- package/docs/GETTING_STARTED.zh-CN.md +4 -4
- package/docs/MIGRATION_VNEXT.md +2 -4
- package/docs/README.zh-CN.md +7 -8
- package/docs/RELEASE_NOTES_v0.8.0.en.md +21 -0
- package/docs/RELEASE_NOTES_v0.8.0.md +21 -0
- package/docs/SESSION_TOOL_REUSE.md +50 -0
- package/docs/UPGRADE_v0.8.0.en.md +22 -0
- package/docs/UPGRADE_v0.8.0.md +22 -0
- package/docs/USAGE_SERVICE.md +1 -1
- package/lib/capability-feedback.js +25 -4
- package/lib/context-delivery.js +135 -0
- package/lib/execution-summary.js +45 -0
- package/lib/knowledge.js +105 -0
- package/lib/runtime.js +174 -24
- package/lib/session-tool-cache.js +1 -1
- package/lib/session-tools.js +50 -15
- package/lib/tool-guidance.js +27 -0
- package/lib/transport.js +19 -0
- package/package.json +15 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.0 - 2026-10-22
|
|
4
|
+
|
|
5
|
+
Return explicit preparation receipts, read selected tool guidance, negotiate knowledge search/read and allow cooperating hosts to confirm named context delivery before omitting repeated bodies. Pin SDK 0.8.0 for bounded complete tool inputs and explicit model-budget helpers. Keep business authorization, approval and original-operation recovery unchanged; task continuation remains the host's responsibility.
|
|
6
|
+
See [changes](docs/RELEASE_NOTES_v0.8.0.en.md) and [upgrade](docs/UPGRADE_v0.8.0.en.md).
|
|
7
|
+
|
|
3
8
|
## 0.7.0 - 2026-09-23
|
|
4
9
|
|
|
5
10
|
Optional host-orchestrated model gateway, USD plan presentation and asynchronous image tools.
|
package/README.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
# BailingHub for DeepSeek Harness
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.8.0: prepare tools once and read knowledge when needed
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[Changes](docs/RELEASE_NOTES_v0.7.0.en.md) · [Upgrade](docs/UPGRADE_v0.7.0.en.md)
|
|
5
|
+
A local Agent can retain complete tool declarations, read one tool's guidance and retrieve only relevant reference knowledge. A cooperating host can confirm named context delivery before omitting repeated preparation bodies. Pair Core 0.10.0 / SDK 0.8.0 / DSH 0.8.0; existing authorization, approval and original-operation recovery remain in force.
|
|
8
6
|
|
|
7
|
+
[Changes](docs/RELEASE_NOTES_v0.8.0.en.md) · [Upgrade](docs/UPGRADE_v0.8.0.en.md)
|
|
9
8
|
|
|
10
9
|
[简体中文](docs/README.zh-CN.md) | English
|
|
11
10
|
|
|
@@ -40,14 +39,14 @@ recommended by DeepSeek.
|
|
|
40
39
|
|
|
41
40
|
You need Node.js `22.19.0+` or `24+`, pnpm, and a compatible DeepSeek Harness release. Your
|
|
42
41
|
administrator must first connect the business system to BailingHub. The matched release set is
|
|
43
|
-
**BailingHub Core 0.
|
|
42
|
+
**BailingHub Core 0.10.0 → BailingHub MCP/SDK 0.8.0 → this plugin 0.8.0**.
|
|
44
43
|
|
|
45
44
|
```bash
|
|
46
45
|
npm install --global pnpm @deepseek-ai/dsh@0.1.1-rc.2
|
|
47
|
-
dsh plugin --profile web add dsh-bailinghub@0.
|
|
46
|
+
dsh plugin --profile web add dsh-bailinghub@0.8.0
|
|
48
47
|
```
|
|
49
48
|
|
|
50
|
-
The plugin installs its exact `bailinghub-mcp-server@0.
|
|
49
|
+
The plugin installs its exact `bailinghub-mcp-server@0.8.0` dependency automatically.
|
|
51
50
|
For an existing installation, read the [migration steps from 0.4.0 and earlier](docs/MIGRATION_VNEXT.md).
|
|
52
51
|
|
|
53
52
|
Follow the [getting started guide](docs/GETTING_STARTED.md) to enter your administrator's four
|
|
@@ -95,7 +94,7 @@ A confirmed revocation or identity change requires a new conversation with a val
|
|
|
95
94
|
|
|
96
95
|
## Follow the conversation and its actions
|
|
97
96
|
|
|
98
|
-
With Core 0.
|
|
97
|
+
With Core 0.8.0 and SDK 0.5.0, BailingHub can show the visible user and assistant messages, turn
|
|
99
98
|
boundaries, and links to the original business runs as one conversation record. Each authorization
|
|
100
99
|
also keeps its own business-call record; the combined reply is not copied into every account's
|
|
101
100
|
memory.
|
|
@@ -167,8 +167,9 @@ cross-system transaction, automatic rollback or field-level data-transfer policy
|
|
|
167
167
|
continue owning their capabilities, permission checks, approvals and data semantics. See the
|
|
168
168
|
[user and host guide](CROSS_SYSTEM_CONVERSATIONS.md).
|
|
169
169
|
|
|
170
|
-
Status: native Agent Client contract for `dsh-bailinghub@0.
|
|
171
|
-
`bailinghub-mcp-server@0.
|
|
170
|
+
Status: retained native Agent Client contract for `dsh-bailinghub@0.8.0`, paired with
|
|
171
|
+
`bailinghub-mcp-server@0.8.0` and BailingHub Core `0.10.0`. The cross-system extension
|
|
172
|
+
first shipped with plugin/SDK 0.5.0 and Core 0.7.0. The same-system scope and archive
|
|
172
173
|
baseline was introduced in plugin/SDK 0.4.0 and Core 0.6.0 (recommended historical Core 0.6.1).
|
|
173
174
|
This contract is separate from the legacy static `0.1.x` path. Version 0.3.0 supported user-managed
|
|
174
175
|
connections but did not include
|
|
@@ -256,7 +257,18 @@ across process restarts, never into another conversation. Unknown IDs fail close
|
|
|
256
257
|
original-invocation recovery, not durable automatic continuation of a whole task.
|
|
257
258
|
|
|
258
259
|
On multi-authorization completion, the adapter freezes one deterministic summary of each run's
|
|
259
|
-
own governed calls and synchronizes that run separately.
|
|
260
|
+
own governed calls and synchronizes that run separately. The content is a JSON string with
|
|
261
|
+
`schema_version: "bailing.authorization-execution-summary.v1"`, `source: "agent_client"`,
|
|
262
|
+
`trust: "reference_only"`, invocation totals, omitted counts and complete invocation fact records.
|
|
263
|
+
Records contain only the original `invocation_id`, original tool name when available, and
|
|
264
|
+
`last_known_state`; uncertain originals add `next_action: "inspect_original"`. They contain no
|
|
265
|
+
business result text, arguments, credentials, invented original-output reference, or full audit
|
|
266
|
+
claim. The summary is bounded to 16,000 characters by omitting complete records, prioritizing
|
|
267
|
+
unresolved originals. It describes client-reported last-known facts, never a fresh status check;
|
|
268
|
+
inspect the original invocation before any recovery decision. The schema label is not proof of
|
|
269
|
+
authority. New Core projections keep the source/trust labels and omit whole records under a
|
|
270
|
+
smaller memory budget rather than cut JSON in the middle. Ordinary assistant text remains
|
|
271
|
+
compatible. The adapter does not send the combined visible
|
|
260
272
|
assistant answer, another authorization's results, or hidden reasoning to every run. The combined
|
|
261
273
|
answer is instead eligible for the separate conversation audit below. Single-authorization completion keeps the existing visible-answer
|
|
262
274
|
behavior. Connection add/use/remove remain user-only commands, not model tools.
|
|
@@ -358,8 +370,9 @@ Restoring a scope does **not** restore an invocation, approval, pending completi
|
|
|
358
370
|
### Independent visible conversation archive
|
|
359
371
|
|
|
360
372
|
The original same-system visible archive uses SDK APIs introduced in `0.4.0` and Core APIs
|
|
361
|
-
introduced in `0.6.0`; the historical recommended Core release is `0.6.1`.
|
|
362
|
-
|
|
373
|
+
introduced in `0.6.0`; the historical recommended Core release is `0.6.1`. Cross-system
|
|
374
|
+
member support first shipped with SDK `0.5.0` and Core `0.7.0`. The current release
|
|
375
|
+
pairs SDK `0.8.0` with Core `0.10.0`. Earlier `0.3.0` SDK/plugin
|
|
363
376
|
packages do not provide this contract.
|
|
364
377
|
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
|
|
365
378
|
`assistant/chunk`, hidden reasoning, attachments, raw provider requests, and arbitrary tool payloads.
|
|
@@ -569,6 +582,13 @@ Stable profile/instructions/governance are system-prompt sections. Memory, refer
|
|
|
569
582
|
knowledge body/refs, page context, and renderers are named runtime-context entries. Knowledge
|
|
570
583
|
content is evidence, never an instruction source.
|
|
571
584
|
|
|
585
|
+
Hosts may opt into the local [context delivery confirmation contract](CONTEXT_DELIVERY.md)
|
|
586
|
+
to omit an already delivered context body from later session preparation receipts.
|
|
587
|
+
Unknown hosts retain inline compatibility. Each final provider request requires
|
|
588
|
+
current named/system confirmation; this grants no business authority. Separately negotiated
|
|
589
|
+
knowledge search/read is defined in [AGENT_KNOWLEDGE.md](AGENT_KNOWLEDGE.md); hints never
|
|
590
|
+
acknowledge a full document read and delivery confirmation never fetches that document.
|
|
591
|
+
|
|
572
592
|
The adapter listens to durable `session/event` values:
|
|
573
593
|
|
|
574
594
|
- `assistant/message`: keep only `content` blocks whose type is `text`, plus model and the
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Agent Client on-demand knowledge
|
|
2
|
+
|
|
3
|
+
This adapter's knowledge disclosure applies only to local Agent Client sessions.
|
|
4
|
+
Core's native chat, embed and Widget retain their independent knowledge injection.
|
|
5
|
+
Instructions, governance and memory remain in their current system/runtime channels.
|
|
6
|
+
|
|
7
|
+
The optional SDK methods are `getKnowledgeCapabilities(options)`,
|
|
8
|
+
`searchKnowledge(input, options)` and `readKnowledge(input, options)`. An old SDK
|
|
9
|
+
still loads; its unsupported knowledge protocol retains complete legacy inline
|
|
10
|
+
context. A new SDK probes the current authorized Core. Only the explicit matching
|
|
11
|
+
knowledge protocol permits trusted `startTurn` option
|
|
12
|
+
`knowledgeDelivery: 'on_demand'`. This choice is pinned for the original user turn.
|
|
13
|
+
401/403, service failures and unknown schemas cannot silently remove knowledge.
|
|
14
|
+
The adapter checks Core's delivery echo; it never removes inline knowledge itself.
|
|
15
|
+
|
|
16
|
+
## Model tools
|
|
17
|
+
|
|
18
|
+
`search_business_knowledge` accepts a minimal `query` (up to 500 characters),
|
|
19
|
+
optional `limit` (1–3), and the intended `authorization_ref` when multiple targets
|
|
20
|
+
are selected. A lazy target can be prepared for a knowledge-only question without
|
|
21
|
+
searching business capabilities or dispatching a business tool. Queries are never
|
|
22
|
+
broadcast across authorizations or sent to an unselected global default.
|
|
23
|
+
|
|
24
|
+
Search returns at most three short title/summary/ref hints, `status` and an explicit
|
|
25
|
+
`trust: reference_only`. Use `read_business_knowledge` with a relevant `ref`, the
|
|
26
|
+
same authorization, optional `cursor` and optional `max_bytes` (4096–32768) to read
|
|
27
|
+
one page. The runtime supplies the original run; the model cannot redirect it.
|
|
28
|
+
Search JSON is bounded to 4 KiB, read JSON defaults to 16 KiB and is at most 32 KiB.
|
|
29
|
+
|
|
30
|
+
Read only relevant documents and follow `next_cursor` as necessary. Hints are not
|
|
31
|
+
full documents. `truncated: true` remains incomplete even when
|
|
32
|
+
`budget_exhausted: true` ends a 128 KiB content chain with no next cursor. Safe
|
|
33
|
+
`total_content_bytes`/`read_chain_max_bytes` scalars can explain that limit.
|
|
34
|
+
|
|
35
|
+
References are opaque, expire after 300 seconds, and remain bound to the original
|
|
36
|
+
Agent Session, route, run and current knowledge revision. Never reuse them across
|
|
37
|
+
accounts. Invalid/changed/expired references return `next_action: search_knowledge`.
|
|
38
|
+
Search again under the same authorization; never replay a business operation.
|
|
39
|
+
Unavailable retrieval is not an empty corpus. Empty business-tool hits do not mean
|
|
40
|
+
that knowledge is absent.
|
|
41
|
+
|
|
42
|
+
## Context and host cooperation
|
|
43
|
+
|
|
44
|
+
The prompt always explains that reference knowledge may exist and exposes these
|
|
45
|
+
two tools independently of business tool discovery. A prepared on-demand target's
|
|
46
|
+
named knowledge context contains the delivery status and light discovery hints;
|
|
47
|
+
document bodies arrive only through explicit reads. Reference text never overrides
|
|
48
|
+
system instructions, governance, identity or approval.
|
|
49
|
+
|
|
50
|
+
The first-batch `getContextDeliveryManifest` / `confirmContextDelivery` contract
|
|
51
|
+
continues unchanged. Confirm the exact named current contributions present in each
|
|
52
|
+
final provider request. Hints are not a full-body acknowledgement. Retain actual
|
|
53
|
+
read results in their current authorized conversation, with bounded pages and
|
|
54
|
+
source attribution. Do not inject a separate full knowledge corpus into new
|
|
55
|
+
on-demand sessions, and do not trim legacy inline knowledge on unknown Core/SDK.
|
|
56
|
+
|
|
57
|
+
The client should verify real final-provider request contents, not only a
|
|
58
|
+
preparation receipt. Required acceptance cases: knowledge-only question, relevant
|
|
59
|
+
hint followed by one read, empty result, unavailable retrieval, paginated/truncated
|
|
60
|
+
document, expired/changed ref, multi-account isolation, cancellation or revocation
|
|
61
|
+
during a read, old SDK/Core fallback and first-batch delivery confirmation.
|
|
62
|
+
Neither this adapter nor knowledge receipts acknowledge a business write.
|
|
@@ -24,12 +24,20 @@ This change adds no stock synchronization, cross-system transaction or rollback.
|
|
|
24
24
|
|
|
25
25
|
## Search result meanings
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
`search_business_capabilities` retains `query`, `limit` and authorization selection.
|
|
28
|
+
The optional `tool_name` supports exact known declarations in active-turn mode and
|
|
29
|
+
cached declaration preparation in opt-in session mode. A broad `query` without
|
|
30
|
+
`tool_name` still discovers capabilities. Cross-system search
|
|
30
31
|
requires the original `authorization_ref` and a minimal target-specific query.
|
|
31
32
|
Single-account and same-system selection continue to work.
|
|
32
33
|
|
|
34
|
+
An exact known `tool_name` can also be supplied in `active_turn` mode. Add
|
|
35
|
+
`include_usage_guidance=true` to explicitly fetch its bounded detail for one
|
|
36
|
+
selected authorization. `description_truncated` and `usage_guidance_available`
|
|
37
|
+
indicate when short descriptions are insufficient; full guidance is not appended
|
|
38
|
+
to every schema or fetched by broad searches. The detail remains revision-bound
|
|
39
|
+
reference evidence. See [usage guidance and preparation](SESSION_TOOL_REUSE.md).
|
|
40
|
+
|
|
33
41
|
| Field | Meaning |
|
|
34
42
|
| --- | --- |
|
|
35
43
|
| `discovery.returned_count` | Candidates actually returned for this search target |
|
|
@@ -118,6 +126,16 @@ Failures carry `bailing.agent-feedback.v1` with `category`, `code`, `origin`,
|
|
|
118
126
|
original `invocation_id` when one exists. SDK-defined feedback is projected through
|
|
119
127
|
a safe allowlist; raw transport messages and arbitrary extra fields are omitted.
|
|
120
128
|
|
|
129
|
+
For `code=arguments_too_large` only, the projection also retains known
|
|
130
|
+
`actual_bytes`, `max_bytes`, `observed_bytes` (nonnegative safe integers), and
|
|
131
|
+
`limit_scope=arguments|request_body` when provided by Core/SDK. Actual bytes refer
|
|
132
|
+
to the serialized UTF-8 JSON or body specified by that scope; observed bytes may
|
|
133
|
+
only be the stream prefix seen before stopping. These are diagnostic scalars,
|
|
134
|
+
not a second business payload. Arbitrary `details`, field paths, raw arguments,
|
|
135
|
+
credentials and transport messages never pass through this projection. Origin
|
|
136
|
+
and dispatch remain explicit; accepted-unknown recovery takes precedence over
|
|
137
|
+
any size diagnostic and still recovers only the original invocation.
|
|
138
|
+
|
|
121
139
|
`retryable` refers only to `next_action`. It never grants permission to issue a new
|
|
122
140
|
business invocation. `dispatch=not_dispatched` is used only for a known stage; a
|
|
123
141
|
transport failure after invoking cannot establish that the request was not sent.
|
|
@@ -190,6 +208,17 @@ before a new business operation; replaying the preparation's call ID does not
|
|
|
190
208
|
convert it into an operation. Do not gate these native preparation guards against
|
|
191
209
|
`active_tools` alone. Read-only tool-state methods do not prepare targets.
|
|
192
210
|
|
|
211
|
+
Preparation results additionally expose `result_type=capability_preparation`,
|
|
212
|
+
`dispatch=not_dispatched`, a preparation reason and a controlled `next_action`.
|
|
213
|
+
Do not display them as completed business operations. No invocation is fabricated
|
|
214
|
+
for a preparation-only result. Common lifecycle and recovery guidance is assembled
|
|
215
|
+
once in the public profile; each business definition still retains its own scope,
|
|
216
|
+
risk, approval/read-only/idempotency facts, target binding and a minimal original-ID
|
|
217
|
+
recovery warning. A custom host must deliver the public profile, tool declarations
|
|
218
|
+
and named contexts together. Both the returned preparation context and named
|
|
219
|
+
context paths remain available until there is an explicit host-consumption contract;
|
|
220
|
+
this change does not silently remove either path.
|
|
221
|
+
|
|
193
222
|
Tested with the public native registry `@deepseek-ai/dsh-tools@0.1.1-rc.2` and real
|
|
194
223
|
Cordis/DSH Sessions. A custom host must verify the hook and preserve the feedback
|
|
195
224
|
carrier through its own model loop. Simply adding properties to a thrown Error is
|
package/docs/COMPATIBILITY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Current 0.
|
|
1
|
+
# Current 0.8.0 pairing
|
|
2
2
|
|
|
3
|
-
Use Core 0.
|
|
3
|
+
Use Core 0.10.0, SDK 0.8.0 and DSH 0.8.0 for larger Agent tool inputs, negotiated on-demand knowledge and cooperating-host context delivery confirmation. Existing business-governance APIs retain their documented minima. The host still owns model parameter selection and bounded task continuation. See [upgrade](UPGRADE_v0.8.0.en.md).
|
|
4
4
|
|
|
5
5
|
# Compatibility
|
|
6
6
|
|
|
@@ -10,23 +10,23 @@ The additive [capability feedback contract](CAPABILITY_FEEDBACK.md) requires the
|
|
|
10
10
|
Core 0.8.0 / SDK 0.6.0 / DSH 0.6.0 release set for complete counts and error detail. Older unenrolled combinations keep their existing business behavior with unknown optional metadata.
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
## Native Agent Client 0.
|
|
13
|
+
## Native Agent Client 0.8.0
|
|
14
14
|
|
|
15
15
|
| Component | Release pairing / requirement |
|
|
16
16
|
| --- | --- |
|
|
17
17
|
| DeepSeek Harness | `0.1.1-rc.2`; real Session and native Cordis lifecycle |
|
|
18
18
|
| Node.js | `^22.19.0` or `>=24.0.0` |
|
|
19
19
|
| DSH tool presentation | Native Tool Mode; Code Mode deliberately degraded |
|
|
20
|
-
| Generic Agent Client SDK | Exact `bailinghub-mcp-server@0.
|
|
21
|
-
| BailingHub Core | `bailinghub@0.
|
|
20
|
+
| Generic Agent Client SDK | Exact `bailinghub-mcp-server@0.8.0` via `./sdk` |
|
|
21
|
+
| BailingHub Core | `bailinghub@0.10.0`, with only its outstanding migrations applied |
|
|
22
22
|
| Selected scope | Single account, same-system multiple accounts, or different Client Apps/workspaces on one Hub and audit domain |
|
|
23
23
|
| Original authorization | A distinct original Agent Session for every selected target |
|
|
24
24
|
| Persistence | Existing same-system v1 scope/outbox and cross-system v2 records |
|
|
25
25
|
|
|
26
|
-
Install `dsh-bailinghub@0.
|
|
26
|
+
Install `dsh-bailinghub@0.8.0`; its ordinary dependency installs the exact SDK automatically.
|
|
27
27
|
Core 0.6.1 and SDK/plugin 0.4.0 remain the historical same-system baseline, not an alternative
|
|
28
28
|
pairing for new cross-system features. See the [upgrade steps](MIGRATION_VNEXT.md) and
|
|
29
|
-
[release scenarios](RELEASE_NOTES_v0.
|
|
29
|
+
[release scenarios](RELEASE_NOTES_v0.8.0.en.md).
|
|
30
30
|
|
|
31
31
|
### Authorization subject display
|
|
32
32
|
|
|
@@ -189,7 +189,7 @@ BailingHub Core release is compatible only after a separate clean legacy profile
|
|
|
189
189
|
|
|
190
190
|
Compatibility requires independent evidence for both paths:
|
|
191
191
|
|
|
192
|
-
1. Native 0.
|
|
192
|
+
1. Native 0.8: clean install of only the exact plugin package, browser authorization, workspace
|
|
193
193
|
discovery, same-identity replacement, different-identity isolation, read, permitted mutation,
|
|
194
194
|
approval/resume, visible completion, and Hub trajectory. Additionally verify explicit single/multiple
|
|
195
195
|
scope selection, full-set archive authorization, offline reopen/retry, revocation, and no business
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Agent Client context delivery confirmation
|
|
2
|
+
|
|
3
|
+
This optional local host contract reduces repeated context bodies in session-tool
|
|
4
|
+
preparation results. It does not change Core chat/embed context assembly, grant
|
|
5
|
+
authorization, or acknowledge business execution. The separate
|
|
6
|
+
[on-demand knowledge contract](AGENT_KNOWLEDGE.md) adds explicit search/read tools;
|
|
7
|
+
delivery confirmation itself never searches or reads a document.
|
|
8
|
+
|
|
9
|
+
## Default and timing
|
|
10
|
+
|
|
11
|
+
Existing or unknown hosts keep the complete `contexts` array in preparation
|
|
12
|
+
receipts. Named system/runtime contributions also remain in ordinary DSH prompt
|
|
13
|
+
assembly. Existing runtime-snapshot deduplication is unchanged.
|
|
14
|
+
|
|
15
|
+
The first lazy preparation creates context after the preceding model request was
|
|
16
|
+
sent, so it remains inline. After a cooperating host has assembled and confirmed
|
|
17
|
+
the current named contributions in a final provider request, later same-binding
|
|
18
|
+
preparations may omit that repeated body. This does not eliminate the first inline
|
|
19
|
+
copy already retained in tool history.
|
|
20
|
+
|
|
21
|
+
## Public local service
|
|
22
|
+
|
|
23
|
+
Use the `bailingHubAgentClient` service (`BailingHubAgentClientRuntime`), outside
|
|
24
|
+
model tools:
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
const manifest = runtime.getContextDeliveryManifest(session.id)
|
|
28
|
+
const confirmation = await runtime.confirmContextDelivery(session.id, {
|
|
29
|
+
delivery_id: manifest.delivery_id,
|
|
30
|
+
generation: manifest.generation,
|
|
31
|
+
request_id: 'opaque-provider-request-17',
|
|
32
|
+
fragments: [
|
|
33
|
+
{ kind: 'system', name: 'bailinghub:agent-client-profile', text: actualSystemSection },
|
|
34
|
+
// One entry per manifest runtime_context fragment, retaining its exact name.
|
|
35
|
+
{ kind: 'runtime_context', name: actualNamedContextName, text: actualNamedContextText },
|
|
36
|
+
],
|
|
37
|
+
})
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The manifest is available only after a current active context was assembled. It
|
|
41
|
+
contains kind/name, SHA-256 and UTF-8 bytes, never document text. Target references
|
|
42
|
+
bind current run/profile/capability/context revisions. The opaque ticket also binds
|
|
43
|
+
the local Session, real user turn and complete original authorization scope and
|
|
44
|
+
revision, including connection, Hub, client, route and authorized Session identities.
|
|
45
|
+
|
|
46
|
+
Each assembly creates a new generation and clears preceding confirmation, even
|
|
47
|
+
if its text is unchanged. Tickets expire after 60 seconds. There is one opaque
|
|
48
|
+
`request_id` per generation: 1–128 ASCII letters/digits and `_.:-`, beginning with a
|
|
49
|
+
letter/digit. Identical confirmations for that request are idempotent; a different
|
|
50
|
+
request id needs a fresh assembly.
|
|
51
|
+
|
|
52
|
+
## Final provider request responsibility
|
|
53
|
+
|
|
54
|
+
The host must confirm **every final provider request**, after its own serialization,
|
|
55
|
+
clipping, compaction and policy transforms. Extract only the exact current
|
|
56
|
+
BailingHub system section and named runtime contributions actually present in
|
|
57
|
+
that request. DSH runtime snapshots may use a provider `user` role with trusted
|
|
58
|
+
plugin source; preserve `snapshot.source.sections` attribution through serialization.
|
|
59
|
+
Do not infer authority from role alone. Ordinary user/tool history is not a named
|
|
60
|
+
runtime contribution. Do not scan arbitrary messages for substrings or manufacture
|
|
61
|
+
fragments by parsing old inline preparation JSON.
|
|
62
|
+
|
|
63
|
+
All manifest entries require correct kind/name and exact text hash/size.
|
|
64
|
+
Unrelated kinds/names, duplicates, missing/truncated text and invalid inputs reject.
|
|
65
|
+
Text is compared only in memory: not retained, logged, or returned. Confirmation
|
|
66
|
+
is bounded to 256 fragments and 4 MiB total text; an unsupported host stays inline.
|
|
67
|
+
|
|
68
|
+
Request N's confirmation does not prove N+1 still contains context. Even if a light
|
|
69
|
+
preparation was produced between requests, the host **must not send N+1** without
|
|
70
|
+
reassembling and confirming current fragments. Missing/truncated context or rejected
|
|
71
|
+
confirmation requires restoring named contributions and assembling/confirming
|
|
72
|
+
again, or aborting that model request. Do not replay a business tool to repair a
|
|
73
|
+
prompt. Core authorization, approval and unknown-invocation recovery are unchanged.
|
|
74
|
+
|
|
75
|
+
The library cannot independently observe downstream network payloads. Confirmation
|
|
76
|
+
is a cooperating host's presentation protocol, not proof that a model received,
|
|
77
|
+
read or understood text and not a security/authorization assertion.
|
|
78
|
+
|
|
79
|
+
## Invalidation and fallback
|
|
80
|
+
|
|
81
|
+
```js
|
|
82
|
+
runtime.invalidateContextDelivery(session.id, { reason: 'request_failed' })
|
|
83
|
+
// host_reset, request_failed, assembly_discarded, authorization_unavailable
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Reset when a prepared request is discarded, serialization fails, or delivery
|
|
87
|
+
strategy changes; unknown reason strings become `host_reset`. Reassemble before
|
|
88
|
+
confirmation. New assembly/turn/run/scope/account/route/Session/profile/capability/
|
|
89
|
+
context revision invalidates prior acknowledgement. Ended/disposed sessions cannot
|
|
90
|
+
confirm. Expired or changed-back bindings cannot revive an old ticket. Late old
|
|
91
|
+
tickets cannot replace a newer receipt. Malformed current confirmation invalidates
|
|
92
|
+
its generation; a fresh assembly is required.
|
|
93
|
+
|
|
94
|
+
Rejections return a bounded reason and
|
|
95
|
+
`next_action: reassemble_context_before_model_request`, never the submitted body.
|
|
96
|
+
They do not establish that any business operation ran or that an unknown one did not.
|
|
97
|
+
|
|
98
|
+
## Preparation and metrics
|
|
99
|
+
|
|
100
|
+
The existing preparation schema retains `result_type`, `dispatch: not_dispatched`,
|
|
101
|
+
`business_operation_performed: false`, preparation state, full tool schemas,
|
|
102
|
+
governance and explicit usage-guidance result. Confirmed optional delivery uses
|
|
103
|
+
`contexts: []` plus `context_delivery` with schema
|
|
104
|
+
`bailing.agent-context-delivery.v1`, mode `named_runtime`, state `confirmed`,
|
|
105
|
+
`body_omitted: true`, bounded delivery/generation/request/context references,
|
|
106
|
+
target revisions, `next_request_requires_confirmation: true`, and
|
|
107
|
+
`business_permission: false`. Empty contexts means already delivered by the named
|
|
108
|
+
path, not knowledge absence. Otherwise complete contexts remain with mode `inline`,
|
|
109
|
+
state `inline_fallback`, `body_omitted: false` and a bounded reason.
|
|
110
|
+
|
|
111
|
+
`context_metrics` contains fixed numeric fields only:
|
|
112
|
+
|
|
113
|
+
- `source_context_bytes`: UTF-8 bytes of JSON.stringify(full contexts array).
|
|
114
|
+
- `inline_context_bytes`: bytes of the returned array (`[]` is two bytes).
|
|
115
|
+
- `omitted_context_bytes`: the difference.
|
|
116
|
+
- `tool_schema_bytes`: bytes of returned tool_schemas.
|
|
117
|
+
- `usage_guidance_bytes`: bytes of explicit usage-guidance, otherwise zero.
|
|
118
|
+
|
|
119
|
+
These preparation-component bytes are not final model token counts, provider wire
|
|
120
|
+
sizes, relevance scores or evidence-retention guarantees. Measure the final provider
|
|
121
|
+
request separately without logging bodies or credentials. Do not globally dedupe
|
|
122
|
+
identical text across accounts.
|
|
123
|
+
|
|
124
|
+
## Dependency candidates
|
|
125
|
+
|
|
126
|
+
Source root overrides repair the registry SDK's old exact MCP dependency and retain
|
|
127
|
+
the SDK safety override, so this workspace lock can be audited cleanly. Library
|
|
128
|
+
overrides do not propagate downstream. Consumers must install the matching new SDK
|
|
129
|
+
and DSH candidates as direct local tarballs, select that SDK for DSH via their root
|
|
130
|
+
override, regenerate their actual lock and verify ESM resolution, installed bytes,
|
|
131
|
+
fresh audits and final runtime build. Version alone does not identify an internal
|
|
132
|
+
same-version candidate. Knowledge search/read follows the separate negotiated
|
|
133
|
+
contract; it does not introduce a free-form knowledge_get or off/hint/full switch.
|
package/docs/GETTING_STARTED.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# Get started with 0.
|
|
1
|
+
# Get started with 0.8.0
|
|
2
2
|
|
|
3
3
|
This guide is for users whose business system is already connected to BailingHub. Your
|
|
4
|
-
administrator must prepare Core 0.
|
|
4
|
+
administrator must prepare Core 0.10.0, a public Client App ID, a workspace, and the business
|
|
5
5
|
browser-authorization entry first. For multiple systems, prepare one independently authorized
|
|
6
6
|
connection per target on the same Hub and audit domain. Existing business capability declarations
|
|
7
7
|
remain valid; each requested action must already be exposed by its own system.
|
|
@@ -12,10 +12,10 @@ Use Node.js `22.19.0+` or `24+` and the compatible DSH version:
|
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
npm install --global pnpm @deepseek-ai/dsh@0.1.1-rc.2
|
|
15
|
-
dsh plugin --profile web add dsh-bailinghub@0.
|
|
15
|
+
dsh plugin --profile web add dsh-bailinghub@0.8.0
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
The plugin installs SDK 0.
|
|
18
|
+
The plugin installs SDK 0.8.0 automatically. Enter the four public values in DSH plugin settings,
|
|
19
19
|
or use their environment names. The example values below are placeholders:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# 开始使用 0.
|
|
1
|
+
# 开始使用 0.8.0
|
|
2
2
|
|
|
3
|
-
这份指南面向业务系统已经接入 BailingHub 的用户。管理员需要先准备 Core 0.
|
|
3
|
+
这份指南面向业务系统已经接入 BailingHub 的用户。管理员需要先准备 Core 0.10.0、公开的 Client
|
|
4
4
|
App ID、workspace 和浏览器业务授权入口。多系统时,每个目标分别授权,且属于同一中枢、同一
|
|
5
5
|
审计域;已有能力无需重新声明,但每项动作必须已由相应业务系统开放。
|
|
6
6
|
|
|
@@ -10,10 +10,10 @@ App ID、workspace 和浏览器业务授权入口。多系统时,每个目标
|
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
npm install --global pnpm @deepseek-ai/dsh@0.1.1-rc.2
|
|
13
|
-
dsh plugin --profile web add dsh-bailinghub@0.
|
|
13
|
+
dsh plugin --profile web add dsh-bailinghub@0.8.0
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
插件会自动安装 SDK 0.
|
|
16
|
+
插件会自动安装 SDK 0.8.0。通过插件设置填写四项公开信息,或使用对应环境变量。下面都是
|
|
17
17
|
占位值,需要替换成管理员提供的中枢地址、Client App ID 和 workspace:
|
|
18
18
|
|
|
19
19
|
```bash
|
package/docs/MIGRATION_VNEXT.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
# Migrate to 0.
|
|
1
|
+
# Migrate to 0.8.0
|
|
2
2
|
|
|
3
|
-
Use [the 0.
|
|
4
|
-
|
|
5
|
-
# Migrate to 0.5.0
|
|
3
|
+
Use [the 0.8.0 paired upgrade guide](UPGRADE_v0.8.0.en.md) / [中文](UPGRADE_v0.8.0.md). Pair Core 0.10.0, SDK 0.8.0 and DSH 0.8.0. Preserve original scopes, events, invocation journals and task bindings. On-demand knowledge is negotiated; named-context omission requires cooperating-host confirmation. The following sections retain earlier upgrade history.
|
|
6
4
|
|
|
7
5
|
## From 0.4.0: add systems without replacing existing authorizations
|
|
8
6
|
|
package/docs/README.zh-CN.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
# BailingHub for DeepSeek Harness
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.8.0:复用工具声明,按需读取知识
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[本次变化](RELEASE_NOTES_v0.7.0.md) · [升级指南](UPGRADE_v0.7.0.md)
|
|
5
|
+
本地智能体可以保留完整工具声明、只读选定工具的指导,并按需检索相关参考知识。配合宿主逐请求确认命名上下文后,可省去准备回执中的重复正文。配套 Core 0.10.0 / SDK 0.8.0 / DSH 0.8.0;原授权、审批和原操作恢复保持。
|
|
8
6
|
|
|
7
|
+
[本次变化](RELEASE_NOTES_v0.8.0.md) · [升级指南](UPGRADE_v0.8.0.md)
|
|
9
8
|
|
|
10
9
|
[English](../README.md) | 简体中文
|
|
11
10
|
|
|
@@ -35,14 +34,14 @@
|
|
|
35
34
|
## 安装与开始使用
|
|
36
35
|
|
|
37
36
|
需要 Node.js `22.19.0+` 或 `24+`、pnpm,以及兼容的 DeepSeek Harness。管理员应先完成业务系统
|
|
38
|
-
接入。配套版本为 **BailingHub Core 0.
|
|
37
|
+
接入。配套版本为 **BailingHub Core 0.10.0 → BailingHub MCP/SDK 0.8.0 → 本插件 0.8.0**。
|
|
39
38
|
|
|
40
39
|
```bash
|
|
41
40
|
npm install --global pnpm @deepseek-ai/dsh@0.1.1-rc.2
|
|
42
|
-
dsh plugin --profile web add dsh-bailinghub@0.
|
|
41
|
+
dsh plugin --profile web add dsh-bailinghub@0.8.0
|
|
43
42
|
```
|
|
44
43
|
|
|
45
|
-
插件会自动安装精确依赖 `bailinghub-mcp-server@0.
|
|
44
|
+
插件会自动安装精确依赖 `bailinghub-mcp-server@0.8.0`,无需另装 SDK。
|
|
46
45
|
已经使用旧版的用户请先看[从 0.4.0 及更早版本升级的步骤](MIGRATION_VNEXT.md)。
|
|
47
46
|
|
|
48
47
|
按照[开始使用指南](GETTING_STARTED.zh-CN.md)填写管理员提供的四项公开连接信息,再到浏览器授权。
|
|
@@ -80,7 +79,7 @@ dsh plugin --profile web add dsh-bailinghub@0.7.0
|
|
|
80
79
|
|
|
81
80
|
## 查看沟通过程与操作结果
|
|
82
81
|
|
|
83
|
-
配合 Core 0.
|
|
82
|
+
配合 Core 0.8.0 和 SDK 0.5.0,BailingHub 可以把可见的用户消息、助手回复、轮次,以及原业务
|
|
84
83
|
执行记录的关联放在同一份会话记录中。各份授权仍保留自己的业务调用记录,汇总回答不会复制到
|
|
85
84
|
每个账号的记忆中。
|
|
86
85
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# DSH 0.8.0: tool preparation and knowledge on demand
|
|
2
|
+
|
|
3
|
+
A user may check stock, update a product and then ask about a page-setting rule. The Agent needs reusable declarations without treating preparation as completed business work. This release makes preparation distinct and reduces repeated guidance and knowledge bodies. It pairs **Core 0.10.0 / SDK 0.8.0 / DSH 0.8.0**. Business capabilities and product mappings must already exist; authorization and approval remain unchanged.
|
|
4
|
+
|
|
5
|
+
## Additions and fixes
|
|
6
|
+
|
|
7
|
+
- Preparation receipts explicitly report `result_type: capability_preparation`, `dispatch: not_dispatched` and `business_operation_performed: false`. A host opting into session tool reuse can retrieve complete declarations by original name. Preparation is not execution; replaying its call ID must not turn it into a write.
|
|
8
|
+
- When short descriptions advertise more guidance, use `search_business_capabilities` with `tool_name` and `include_usage_guidance` for bounded reference material tied to the original authorization and capability revision. Multiple targets remain distinct through `authorization_ref`.
|
|
9
|
+
- Add `search_business_knowledge` and `read_business_knowledge`. Negotiated support separates knowledge retrieval from tool discovery: inspect hints, then read relevant content and pages. Old SDK/Core combinations retain inline knowledge; authorization/service failures are not empty results. Core native chat and embed stay independent.
|
|
10
|
+
- Add host-only `getContextDeliveryManifest()`, `confirmContextDelivery()` and `invalidateContextDelivery()`. Later preparation receipts can omit repeated bodies only after a cooperating host confirms the current named contributions in each final model request. Unknown hosts keep inline bodies. Confirmation is neither business permission nor proof of model understanding.
|
|
11
|
+
- Pin SDK 0.8.0, including 1 MiB serialized tool arguments, on-demand knowledge and separate model-budget helpers. Library dependency overrides do not replace host audits.
|
|
12
|
+
|
|
13
|
+
## Hosts still own task loops
|
|
14
|
+
|
|
15
|
+
The plugin preserves original model operations, business invocations, approvals and cancellation fences. Hosts integrate model parameters and reasoning/answer budgets from service descriptors. Automatic long-task continuation is not enabled by this release: hosts must checkpoint, bound counts/cost/time, detect no progress and avoid repeating completed actions. Inspect unknown originals read-only; never execute truncated tool arguments.
|
|
16
|
+
|
|
17
|
+
## Upgrade and observe
|
|
18
|
+
|
|
19
|
+
Upgrade Core first, then install `dsh-bailinghub@0.8.0`; it installs the exact SDK without manual version mixing. Preserve credentials, real Sessions, scope/task/invocation stores and archive records. Restart and verify the actual resolved packages.
|
|
20
|
+
|
|
21
|
+
Observe preparation versus a normal tool result, independent knowledge search/pagination, multiple-authorization isolation and old-Core fallback. Hosts enabling context confirmation must additionally inspect the final provider request, not just preparation receipts. Missing confirmation requires restoring context or stopping the request, not replaying business work. See [the upgrade guide](UPGRADE_v0.8.0.en.md).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# DSH 0.8.0:工具准备与知识按需读取
|
|
2
|
+
|
|
3
|
+
用户先查库存、再修改商品、最后确认页面规则时,智能体需要复用已发现工具,又不能把“声明已准备”当成业务已经完成。本版把准备和执行结果说清楚,并减少重复指导与知识正文。配套 **Core 0.10.0 / SDK 0.8.0 / DSH 0.8.0**;业务能力及商品映射须由业务系统预先提供,原授权和审批不变。
|
|
4
|
+
|
|
5
|
+
## 新增与修复
|
|
6
|
+
|
|
7
|
+
- 准备回执明确给出 `result_type: capability_preparation`、`dispatch: not_dispatched` 与 `business_operation_performed: false`。宿主启用会话工具复用时,可按原工具名取得完整声明;准备工具不等于执行工具,不能把相同调用 ID 重放成写入。
|
|
8
|
+
- 短描述提示有补充指导时,用 `search_business_capabilities` 的 `tool_name` 和 `include_usage_guidance`,只读取对应授权及能力修订下的有界参考。多目标仍由 `authorization_ref` 区分。
|
|
9
|
+
- 新增 `search_business_knowledge`、`read_business_knowledge`。协议协商成功后,工具发现与知识搜索独立;先看提示,再读取相关正文和分页。旧 SDK/Core 保留 inline 知识;授权、服务异常不能当成空结果。Core 原生聊天/嵌入不受此模式影响。
|
|
10
|
+
- 新增宿主级 `getContextDeliveryManifest()`、`confirmContextDelivery()` 与 `invalidateContextDelivery()`。只有协作宿主确认每份最终模型请求实际包含当前命名上下文,后续准备回执才可省略重复正文;未知宿主默认保留正文。确认不是业务权限或模型理解证明。
|
|
11
|
+
- 精确依赖 SDK 0.8.0,包含 1 MiB 序列化工具参数、按需知识及独立模型预算 helper。库内依赖覆盖不替代宿主自身依赖审计。
|
|
12
|
+
|
|
13
|
+
## 任务循环仍由宿主负责
|
|
14
|
+
|
|
15
|
+
插件保留原模型 operation、业务 invocation、审批和取消边界。模型参数与思考/答案预算由宿主按服务目录接入。自动长任务续跑不是本版自动开启的功能:宿主须保存检查点、限制次数/费用/时长、识别无进展并避免重复已完成动作。原结果未知时只读核对;截断工具参数不执行。
|
|
16
|
+
|
|
17
|
+
## 升级与观察
|
|
18
|
+
|
|
19
|
+
先升级 Core,再安装 `dsh-bailinghub@0.8.0`;插件自动安装精确 SDK,无需手工混装。保留凭据、真实 Session、scope、task、invocation 与归档记录,重启后核对实际加载包。
|
|
20
|
+
|
|
21
|
+
观察一次正常工具调用与准备回执的差异、知识单独搜索与分页、多授权隔离和旧 Core 回退。若宿主启用上下文确认,额外核对最终 provider 请求,不能只检查准备回执。缺失确认必须恢复上下文或停止请求,不重做业务动作。[完整升级步骤](UPGRADE_v0.8.0.md)
|
|
@@ -87,6 +87,32 @@ If a ready tool's full schema is outside the presentation window, use the exact
|
|
|
87
87
|
come from local cache, while normal scope validation may still make requests.
|
|
88
88
|
The model must not guess fields or rely on an old schema that it cannot inspect.
|
|
89
89
|
|
|
90
|
+
Short descriptions and usage guidance have separate purposes. A tool can report
|
|
91
|
+
`description_truncated=true` or `usage_guidance_available=true`. Read the indicated
|
|
92
|
+
detail explicitly before relying on omitted instructions:
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"query": "Read the known decoration tool's prerequisites.",
|
|
97
|
+
"tool_name": "shop_ai_decoration_save",
|
|
98
|
+
"include_usage_guidance": true,
|
|
99
|
+
"authorization_ref": "the-original-selected-authorization"
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`include_usage_guidance` requires `tool_name`; multi-target sessions also select
|
|
104
|
+
one authorization. The same parameters are supported in `active_turn` mode.
|
|
105
|
+
Only this named tool's guidance is fetched, under the current authorization and
|
|
106
|
+
capability revision. Its `usage_guidance` result contains the original name,
|
|
107
|
+
authorization reference where applicable, revision, text, and honest character/
|
|
108
|
+
UTF-8 byte bounds (`max_chars=32768`, `max_bytes=65536`, with `truncated` and source
|
|
109
|
+
sizes). A truncated detail is not a complete instruction document. The text is
|
|
110
|
+
reference evidence, never permission to switch target, bypass approval or execute
|
|
111
|
+
unvalidated arguments. Detail reads create no invocation, approval or business
|
|
112
|
+
operation. Unsupported older SDKs return compatibility feedback; missing support
|
|
113
|
+
does not mean that the business capability is absent. Hosts must preserve this
|
|
114
|
+
field and its bounds instead of treating the short description as full guidance.
|
|
115
|
+
|
|
90
116
|
An exact valid cache hit avoids an additional `searchCapabilities` request. The
|
|
91
117
|
first preparation of a target still calls `startTurn` for current context; Core
|
|
92
118
|
may perform its existing bounded internal discovery there. This is reduced
|
|
@@ -126,6 +152,30 @@ prepares that exact target and declaration, then returns context and schema with
|
|
|
126
152
|
business arguments. The model must read the result and decide on a new tool call
|
|
127
153
|
using the current instructions and schema.
|
|
128
154
|
|
|
155
|
+
Session preparation now has an explicit additive envelope:
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"schema": "bailing.agent-capability-preparation.v1",
|
|
160
|
+
"result_type": "capability_preparation",
|
|
161
|
+
"dispatch": "not_dispatched",
|
|
162
|
+
"reason": "target_not_prepared",
|
|
163
|
+
"next_action": "review_context_then_call",
|
|
164
|
+
"preparation": { "state": "ready", "business_operation_performed": false },
|
|
165
|
+
"business_operation_performed": false
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Normal discovery uses `reason=capability_search`. A ready target with no returned
|
|
170
|
+
requested schema says `next_action=refine_capability_search`; it does not advise
|
|
171
|
+
calling the missing tool. An unavailable preparation carries its safe feedback's
|
|
172
|
+
next action (or `review_preparation_feedback` for mixed outcomes). Preparation
|
|
173
|
+
creates no `invocation_id`. The existing context, schemas, target state and both
|
|
174
|
+
false flags remain compatible. Business invocation success keeps its existing
|
|
175
|
+
receipt shape. Active-turn search also adds `result_type`, `dispatch`, `reason`,
|
|
176
|
+
`next_action` and `business_operation_performed=false`, while preserving its
|
|
177
|
+
existing search schema and result fields.
|
|
178
|
+
|
|
129
179
|
The original guard call ID stays attached to preparation. Replaying that same
|
|
130
180
|
call ID returns its preparation result, rather than turning the old attempt into
|
|
131
181
|
a write after preparation finishes. A later business call needs its own genuine
|