dsh-tender-workbench 0.5.4 → 0.5.6

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.en.md +23 -17
  3. package/README.md +40 -15
  4. package/docs/RELEASE-0.5.6.md +22 -0
  5. package/lib/client.js +22 -24
  6. package/lib/client.js.map +1 -1
  7. package/lib/index.js +11 -3
  8. package/lib/types/client/TenderPrompt.d.ts +0 -9
  9. package/lib/types/client/TenderPrompt.d.ts.map +1 -1
  10. package/lib/types/client/TenderResultsEntry.d.ts +7 -3
  11. package/lib/types/client/TenderResultsEntry.d.ts.map +1 -1
  12. package/lib/types/client/TenderResultsPanel.d.ts +1 -1
  13. package/lib/types/client/TenderResultsPanel.d.ts.map +1 -1
  14. package/lib/types/client/artifact-api.d.ts +1 -1
  15. package/lib/types/client/artifact-api.d.ts.map +1 -1
  16. package/lib/types/client/better-sidebar-adapter.d.ts +1 -1
  17. package/lib/types/client/better-sidebar-adapter.d.ts.map +1 -1
  18. package/lib/types/client/client-context.d.ts +2 -1
  19. package/lib/types/client/client-context.d.ts.map +1 -1
  20. package/lib/types/client/index.d.ts.map +1 -1
  21. package/lib/types/client/intents/send-session-intent.d.ts +2 -1
  22. package/lib/types/client/intents/send-session-intent.d.ts.map +1 -1
  23. package/lib/types/client/ordinary-session-guard.d.ts +7 -2
  24. package/lib/types/client/ordinary-session-guard.d.ts.map +1 -1
  25. package/lib/types/client/result-types.d.ts +1 -1
  26. package/lib/types/client/result-types.d.ts.map +1 -1
  27. package/lib/types/client/skill-catalog.d.ts +5 -9
  28. package/lib/types/client/skill-catalog.d.ts.map +1 -1
  29. package/lib/types/client/tender-projection-port.d.ts +3 -1
  30. package/lib/types/client/tender-projection-port.d.ts.map +1 -1
  31. package/lib/types/client/tender-search-definition.d.ts +1 -1
  32. package/lib/types/client/tender-search-definition.d.ts.map +1 -1
  33. package/lib/types/client/tender-session-entry.d.ts +3 -1
  34. package/lib/types/client/tender-session-entry.d.ts.map +1 -1
  35. package/lib/types/client/workbench/TenderAnalysisReviewViews.d.ts +1 -1
  36. package/lib/types/client/workbench/TenderAnalysisReviewViews.d.ts.map +1 -1
  37. package/lib/types/client/workbench/TenderDataViews.d.ts +1 -1
  38. package/lib/types/client/workbench/TenderDataViews.d.ts.map +1 -1
  39. package/lib/types/client/workbench/TenderReportView.d.ts +1 -1
  40. package/lib/types/client/workbench/TenderReportView.d.ts.map +1 -1
  41. package/lib/types/client/workbench/TenderScreeningViews.d.ts +1 -1
  42. package/lib/types/client/workbench/TenderScreeningViews.d.ts.map +1 -1
  43. package/lib/types/client/workbench/TenderWorkbench.d.ts +1 -1
  44. package/lib/types/client/workbench/TenderWorkbench.d.ts.map +1 -1
  45. package/lib/types/client/workbench/session-write-flight.d.ts +1 -1
  46. package/lib/types/client/workbench/session-write-flight.d.ts.map +1 -1
  47. package/lib/types/client/write-session-draft.d.ts +1 -1
  48. package/lib/types/client/write-session-draft.d.ts.map +1 -1
  49. package/lib/types/host/artifacts/intent-receipts.d.ts +2 -2
  50. package/lib/types/host/artifacts/intent-receipts.d.ts.map +1 -1
  51. package/lib/types/host/artifacts/store.d.ts +2 -1
  52. package/lib/types/host/artifacts/store.d.ts.map +1 -1
  53. package/lib/types/host/tool-contract.d.ts.map +1 -1
  54. package/lib/types/host/tools/query-tool.d.ts +1 -1
  55. package/lib/types/host/tools/query-tool.d.ts.map +1 -1
  56. package/package.json +50 -29
  57. package/docs/RELEASE-0.5.4.md +0 -26
package/CHANGELOG.md CHANGED
@@ -4,6 +4,17 @@ All notable changes to `dsh-tender-workbench` are documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.5.6] - 2026-09-10
8
+
9
+ - 统一 Better Sidebar optional peer、基础/工作台安装预检和运行时降级文案;不自动安装侧栏、不重写工作台容器。
10
+ - 修复 DSH 0.1.2-rc.1 Host 工具的 Session.snapshotEvents() 与 turn/start 轮次绑定,补真实 Session 契约,避免错误拒绝直接用户请求。
11
+ - 补无侧栏/兼容侧栏/已知错误组合的最终 tarball 验收与实际 Host 工具业务 fixture。
12
+
13
+ ## [0.5.5] - 2026-09-10
14
+
15
+ - 迁移完整 DSH 0.1.2-rc.1 公共接口,移除旧客户端 runtime 与 conversationEvents 硬依赖;补事件定义卸载清理。
16
+ - 更新类型、Session 空白状态和 Workspace 导航适配;收窄兼容声明,增加最终产物真实宿主加载回归,避免旧模块测试替身掩盖启动故障。
17
+
7
18
  ## [0.5.4] - 2026-09-10
8
19
 
9
20
  - 对齐共享交互规范 v1.5.0:强化 Better Sidebar 能力探针、Session 定向展开与订阅清理;五个流程入口复用同一 Tab,增加当前会话记录历史视图与缺失依赖提示。
package/README.en.md CHANGED
@@ -10,7 +10,9 @@ Related agents: [数据清洗补全](https://github.com/duhu2000/dsh-data-cleani
10
10
 
11
11
  `dsh-tender-workbench` is an open-source DeepSeek Harness plugin for finding, screening, reviewing, and delivering tender opportunities. It combines authorized `qcc-tender` data, deterministic screening rules, bounded Agent analysis, explicit human decisions, and immutable Excel/PDF reports in one Session-scoped Better Sidebar workbench.
12
12
 
13
- Current stable version: **0.5.4** (stable release).
13
+ Current stable version: **0.5.6** (stable release).
14
+
15
+ Base mode targets the full DSH 0.1.2-rc.1 distribution; Better Sidebar 0.18.1 is optional and only provides the visual workbench. Legacy hosts remain unsupported. Back up the complete Profile and verify dependencies before upgrading.
14
16
 
15
17
  ## What it does
16
18
 
@@ -47,47 +49,52 @@ Excel is organized for analysis and verification, with separate overview, distri
47
49
 
48
50
  ## Requirements and compatibility
49
51
 
50
- The published package declares minimum compatible versions without a stable-version upper bound:
52
+ This release constrains core peers to `~0.1.2-rc.1`; future combinations require verification:
51
53
 
52
- - DeepSeek Harness public packages: `0.1.1-rc.2`
54
+ - DeepSeek Harness public packages: `0.1.2-rc.1`
53
55
  - `dsh-mcp-connector`: `0.2.31`
54
- - `dsh-better-sidebar`: `0.17.1`
56
+ - Optional visual workbench: `dsh-better-sidebar@0.18.1`; the peer range is not an acceptance claim for untested versions
57
+
58
+ The active Profile must provide one coherent runtime with public Session Projection, JSONL Session Persistence, Tools, Skill, Sessions, and WebServer services. Only the visual workbench needs Better Sidebar and its `targetedOpen` / `stateSubscription` features; missing or incompatible capabilities do not block conversation activation.
59
+
60
+ Before installing, run `node scripts/check-host-compatibility.mjs --host-root /actual/node_modules/@deepseek-ai/dsh --profile-root /actual/profiles/web`. It only reads package manifests: known incompatible hosts, mixed core packages and old Sidebar fail; unknown combinations are reported as unverified. The Windows mount script requires `-DshHostRoot` and executes this gate before mutation. Upgrade the complete host explicitly after backing up the Profile: `npm install -g @deepseek-ai/dsh@0.1.2-rc.1`.
55
61
 
56
- The active Profile must provide one coherent runtime with public Session Projection, JSONL Session Persistence, Tools, Skill, Sessions, and WebServer services. Better Sidebar must expose the public `targetedOpen` and `stateSubscription` features.
62
+ Context is not required. If already installed, 0.36.0 has a known removed settingsNamespace dependency; the coexistence baseline is 0.48.0. Update only with user approval and a backup. Rollback requires a complete verified host/plugin combination: do not install the original 0.5.4 or older package alone on the new host. Startup smoke does not prove live QCC or four-product acceptance.
57
63
 
58
64
  An installed and authorized `qcc-tender` MCP connection must expose these exact tools:
59
65
 
60
66
  - `mcp__qcc-tender__search_tenders`
61
67
  - `mcp__qcc-tender__search_proposed_projects`
62
68
 
63
- Without a compatible Better Sidebar provider, conversation entry points and supported Host tools remain available; shortcuts show actionable install/upgrade, enable-tab and restart guidance. No private sidebar is created. Other missing required services, unavailable MCP tools and non-JSONL persistence fail explicitly, with no Web-search or alternate-storage fallback.
69
+ The default preflight accepts Sidebar-free base mode. Add `--workbench` (Windows mount: `-Workbench`) only when explicitly enabling the visual workbench; the Windows flag also checks its enabled bundle before any Profile write. No script automatically installs Sidebar. An already-installed Sidebar 0.17.1 breaking the new host is still blocked, even in base mode. Runtime capability probes and Tab preferences remain separate from manifest inspection.
70
+
71
+ Without Sidebar, native Sessions, input drafts, the prompt builder, action Skills and Host tools remain available. Conversation-driven query, rule preview/confirmation, human review and report generation retain their contracts; actual model orchestration and paid MCP are separate acceptance layers. Existing authorized Excel/PDF artifact links can be downloaded, but visual table/detail/filter controls, batch-review controls, history view and download buttons require the workbench. All five shortcuts only explain this boundary, preserving state without starting tasks. No alternate drawer or native-workbench rewrite is implemented. Other missing required services, unavailable MCP tools and non-JSONL persistence fail explicitly.
64
72
 
65
73
  ## Install
66
74
 
67
- Install the current stable release and its required Provider plugins:
75
+ Install base mode. The connector is needed for authorized QCC queries; Sidebar is not required:
68
76
 
69
77
  ```sh
70
78
  dsh plugin --profile web add 'dsh-mcp-connector@>=0.2.31'
71
- dsh plugin --profile web add 'dsh-better-sidebar@>=0.17.1'
72
79
  dsh plugin --profile web add dsh-tender-workbench
73
80
  dsh web --no-open
74
81
  ```
75
82
 
76
- To install the exact 0.5.4 release:
83
+ Optionally enable the visual workbench with `dsh plugin --profile web add dsh-better-sidebar@0.18.1`, enable the tender Tab and fully restart the Profile.
84
+
85
+ To install the exact 0.5.6 release:
77
86
 
78
87
  ```sh
79
88
  dsh plugin --profile web add 'dsh-mcp-connector@>=0.2.31'
80
- dsh plugin --profile web add 'dsh-better-sidebar@>=0.17.1'
81
- dsh plugin --profile web add dsh-tender-workbench@0.5.4
89
+ dsh plugin --profile web add dsh-tender-workbench@0.5.6
82
90
  ```
83
91
 
84
- To install from an independent checkout, install the required Provider plugins first, then run from this repository:
92
+ To install base mode from an independent checkout:
85
93
 
86
94
  ```sh
87
95
  corepack pnpm@11.7.0 install --frozen-lockfile
88
96
  corepack pnpm@11.7.0 run build
89
97
  dsh plugin --profile web add 'dsh-mcp-connector@>=0.2.31'
90
- dsh plugin --profile web add 'dsh-better-sidebar@>=0.17.1'
91
98
  dsh plugin --profile web add .
92
99
  dsh web --no-open
93
100
  ```
@@ -96,8 +103,7 @@ To install a packed build:
96
103
 
97
104
  ```sh
98
105
  dsh plugin --profile web add 'dsh-mcp-connector@>=0.2.31'
99
- dsh plugin --profile web add 'dsh-better-sidebar@>=0.17.1'
100
- dsh plugin --profile web add ./dsh-tender-workbench-0.5.2.tgz
106
+ dsh plugin --profile web add ./dsh-tender-workbench-0.5.6.tgz
101
107
  dsh web --no-open
102
108
  ```
103
109
 
@@ -114,11 +120,11 @@ dsh plugin --profile web remove dsh-tender-workbench
114
120
  Upgrade an existing installation by installing the stable version and fully restarting the Web profile:
115
121
 
116
122
  ```sh
117
- dsh plugin --profile web add dsh-tender-workbench@0.5.4
123
+ dsh plugin --profile web add dsh-tender-workbench@0.5.6
118
124
  dsh web --no-open
119
125
  ```
120
126
 
121
- Version 0.5.4 aligns the Session singleton Tab adapter with shared UI specification v1.5.0. Five shortcuts open/focus the same Tab and navigate to opportunity, screening, decision, delivery or history, without starting tasks or MCP calls. Capability probes, subscription cleanup and cross-Session reveal guards are strengthened. Tab reopening retains navigation and query drafts within the current Client lifetime. History is limited to the current Session's saved query; cross-Session indexing and live MCP connection checks are not implemented. Actual four-plugin DSH integration remains to be verified. Roll back with `dsh-tender-workbench@0.5.3` and restart the profile; business data schemas are unchanged.
127
+ Version 0.5.6 aligns optional Sidebar metadata, installation checks and fallback guidance, and fixes Host Session event reads and current-turn binding. It retains the v1.5.0 singleton Tab, five navigation shortcuts and Client-lifetime draft recovery. Business schemas are unchanged; history remains Session-local and live MCP connectivity is not verified. Restore a backed-up, fully verified host/plugin combination for rollback, not the original 0.5.4 or an older package alone on the new host.
122
128
 
123
129
  ## Using the workbench
124
130
 
package/README.md CHANGED
@@ -2,10 +2,12 @@
2
2
 
3
3
  ## 安装与三分钟上手
4
4
 
5
+ > 基础智能体要求完整 DSH 0.1.2-rc.1,Better Sidebar 0.18.1 仅用于可选可视化工作台;升级前备份完整 Profile。
6
+
5
7
  招投标智能体:支持招投标搜索、招标查询、投标查询、标讯查询、拟建项目与项目筛选,辅助商机发现、人工复核及 Excel/PDF 导出,使用客户自备授权的企查查 MCP。
6
8
 
7
9
  ```sh
8
- dsh plugin --profile web add dsh-tender-workbench@0.5.4
10
+ dsh plugin --profile web add dsh-tender-workbench@0.5.6
9
11
  ```
10
12
 
11
13
  请先满足下文的 DSH、连接器及侧边栏依赖要求;安装后完整停止并重启对应 Profile。
@@ -16,7 +18,7 @@ dsh plugin --profile web add dsh-tender-workbench@0.5.4
16
18
 
17
19
  **能力边界:** 投标查询指已授权数据源内的公开标讯查询,不代办投标。无 Web 搜索兜底、订阅或自动 Bid/No-Bid 决策;不提供在线 PDF 预览。
18
20
 
19
- **升级与回滚:** 升级前停止 Profile 并备份任务目录,记录当前精确版本;使用上面的固定版本命令升级,再完整重启。回滚时将版本号替换为升级前记录的版本,并使用升级前任务目录副本;不以旧版直接读取已迁移任务目录。
21
+ **升级与回滚:** 升级前停止 Profile 并备份完整宿主/插件组合及任务目录,记录精确版本;升级后完整重启。回滚需恢复已验证的整套组合和目录副本,不能在新宿主上单独退回原始 0.5.4。
20
22
 
21
23
  相关智能体:[数据清洗补全](https://github.com/duhu2000/dsh-data-cleaning-agent) · [AI填表](https://github.com/duhu2000/dsh-form-fill-agent) · [访前尽调](https://github.com/duhu2000/dsh-pre-duediligence) · [招投标](https://github.com/duhu2000/dsh-tender-workbench)
22
24
 
@@ -25,7 +27,7 @@ dsh plugin --profile web add dsh-tender-workbench@0.5.4
25
27
 
26
28
  > 面向国内招投标团队的 DeepSeek Harness 开源智能体插件:在一个会话级工作台内完成标讯与拟建项目查询、确定性规则初筛、限定范围智能分析、人工复核,以及 Excel/PDF 报告交付。
27
29
  >
28
- > 当前稳定版本:**0.5.4**(正式版本)
30
+ > 当前稳定版本:**0.5.6**(正式版本)
29
31
 
30
32
  [![CI](https://github.com/duhu2000/dsh-tender-workbench/actions/workflows/ci.yml/badge.svg)](https://github.com/duhu2000/dsh-tender-workbench/actions/workflows/ci.yml)
31
33
  [![npm](https://img.shields.io/npm/v/dsh-tender-workbench)](https://www.npmjs.com/package/dsh-tender-workbench)
@@ -59,21 +61,22 @@ dsh plugin --profile web add dsh-tender-workbench@0.5.4
59
61
 
60
62
  ## 30 秒开始
61
63
 
62
- 先安装连接器、侧边栏能力和本插件:
64
+ 基础智能体不要求 Better Sidebar。查询企查查数据时还需已安装、已授权的 MCP 连接器;基础安装不默认强装第三方侧栏:
63
65
 
64
66
  ```sh
65
67
  dsh plugin --profile web add 'dsh-mcp-connector@>=0.2.31'
66
- dsh plugin --profile web add 'dsh-better-sidebar@>=0.17.1'
67
68
  dsh plugin --profile web add dsh-tender-workbench
68
69
  dsh web --no-open
69
70
  ```
70
71
 
71
72
  安装或移除插件后,请完整重启 Web Profile。插件通过 `dsh.bundle.patch` 启用 `cordis.patch.yml`,并注册 `dsh-tender-workbench` Loader。
72
73
 
73
- 安装指定的 `0.5.4` 版本:
74
+ 需要可视化工作台时,再自选安装 `dsh plugin --profile web add dsh-better-sidebar@0.18.1`、在宿主设置启用招投标 Tab,并完整重启。无需侧栏也可使用下方列明的基础功能。
75
+
76
+ 安装指定的 `0.5.6` 版本:
74
77
 
75
78
  ```sh
76
- dsh plugin --profile web add dsh-tender-workbench@0.5.4
79
+ dsh plugin --profile web add dsh-tender-workbench@0.5.6
77
80
  ```
78
81
 
79
82
  移除插件:
@@ -84,7 +87,7 @@ dsh plugin --profile web remove dsh-tender-workbench
84
87
 
85
88
  ## 使用工作台
86
89
 
87
- 插件提供左上角“招投标”入口和会话 Header 恢复入口。点击左上角入口会根据当前工作区、最近工作区或第一个可用工作区的路径创建独立原生会话,显示“招投标智能体”标题与目标图标,默认不打开右侧工作台。点击输入框下方的找机会、筛候选、人工定案、形成交付或任务历史按钮时,才打开对应 Better Sidebar 视图;其他会话保留各自原有标题与标识。
90
+ 插件提供左上角“招投标”入口和会话 Header 恢复入口。点击左上角入口会根据当前工作区、当前 Session 目录或第一个可用工作区的路径创建独立原生会话,显示“招投标智能体”标题与目标图标,默认不打开右侧工作台。点击输入框下方的找机会、筛候选、人工定案、形成交付或任务历史按钮时,才打开对应 Better Sidebar 视图;其他会话保留各自原有标题与标识。
88
91
 
89
92
  页面导航只切换可见阶段,不会修改业务状态或自动执行后续动作。规则建议、编辑、影响预览与确认彼此独立;报告生成前始终展示已复核和待复核范围。宽屏使用主从布局,中窄屏保持相同信息顺序,并保留局部表格滚动与可访问的固定操作区。
90
93
 
@@ -98,14 +101,24 @@ dsh plugin --profile web remove dsh-tender-workbench
98
101
 
99
102
  ## 环境要求与兼容性
100
103
 
101
- 发布包声明以下最低兼容版本,不设置稳定版上限:
104
+ 本版本以完整 DSH 0.1.2-rc.1 校准,核心 peer 限定为 `~0.1.2-rc.1`,不再声明旧宿主兼容;后续版本需重新验证:
102
105
 
103
- - DeepSeek Harness 公共包:`0.1.1-rc.2`
106
+ - DeepSeek Harness 公共包:`0.1.2-rc.1`
104
107
  - `dsh-mcp-connector`:`0.2.31`
105
- - `dsh-better-sidebar`:`0.17.1`
108
+ - 可选工作台依赖 `dsh-better-sidebar`:已验证版本 `0.18.1`,optional peer `~0.18.1` 不是整个区间已验收的承诺
106
109
  - Node.js:`^22.19.0 || >=24.0.0`
107
110
 
108
- 当前 Profile 必须提供同一套公共 Session Projection、JSONL Session Persistence、Tools、Skill、Sessions 和 WebServer 服务;Better Sidebar 必须提供公共 `targetedOpen` 与 `stateSubscription` 能力。
111
+ 当前 Profile 必须提供同一套公共 Session Projection、JSONL Session Persistence、Tools、Skill、Sessions 和 WebServer 服务。只有启用可视化工作台才需要 Better Sidebar,运行时探测公共 `targetedOpen` 与 `stateSubscription` 能力;缺少或能力不全时不等待、不创建自有抽屉。
112
+
113
+ 先备份完整 Profile,再由用户明确升级完整宿主(`npm install -g @deepseek-ai/dsh@0.1.2-rc.1`),不能只升级某个 Session 包。安装前从本仓运行只读检查:
114
+
115
+ ```sh
116
+ node scripts/check-host-compatibility.mjs --host-root /实际路径/node_modules/@deepseek-ai/dsh --profile-root /实际路径/profiles/web
117
+ ```
118
+
119
+ 预检默认是基础模式,缺少侧栏只提示功能边界,不阻断、不自动安装。显式传 `--workbench` 才要求侧栏已安装,版本检查不代替运行时 capability 与 Tab 启用检查。已装 Sidebar 0.17.1 在新宿主上的硬故障仍阻断;未知组合提示未验证。Windows 挂载需 `-DshHostRoot`,默认基础模式;`-Workbench` 额外要求侧栏 bundle 已启用,所有预检均在 Profile 写入前执行。context 不是必装依赖;已装 0.36.0 的 settingsNamespace 故障仍阻断,共存基准为 0.48.0。
120
+
121
+ 回滚必须恢复完整已验证的宿主/插件组合,不得在新宿主上单独退回未经修复的 0.5.4 或更早包。真实 QCC、四产品共存与正式环境验收不由启动 smoke 代签。
109
122
 
110
123
  已安装并授权的 `qcc-tender` MCP 连接必须暴露以下精确工具名:
111
124
 
@@ -114,16 +127,28 @@ dsh plugin --profile web remove dsh-tender-workbench
114
127
 
115
128
  缺少兼容 Better Sidebar 时,对话入口和已支持的 Host 工具保持可用,流程按钮提示安装/升级、启用 Tab 并重启,不创建另一套侧拉。其余必要服务缺失、MCP 工具不可用或会话持久化不是 JSONL 时明确失败;不提供 Web 搜索、其他持久化或 Workspace 存储兜底。
116
129
 
130
+ ### 无侧栏功能边界
131
+
132
+ | 能力 | 无侧栏 | 可视化工作台 |
133
+ | --- | --- | --- |
134
+ | 独立原生会话、普通会话切换、输入草稿、提示词生成/回填 | 可用,不因打开工作台失败而清空 | 相同 |
135
+ | 行为 Skill、工作流状态工具、对话驱动查询 | 可用;实际数据仍需模型和已授权 MCP | 表单配置并显式提交 |
136
+ | 规则预览/确认、人工复核、报告生成工具 | Host 工具保留;需对话明确请求,仍受版本绑定与确认约束 | 规则编辑、表格、批量复核和导出控件 |
137
+ | Excel/PDF Artifact 下载接口 | 已生成的授权下载链接可用;无可视化下载按钮 | 下载按钮可用 |
138
+ | 五个流程按钮、任务历史、表格详情 | 仅明确提示;不执行任务,不创建 Tab | 定位同一 Session 单例 Tab |
139
+
140
+ 工具 fixture 通过不等于真实模型自动编排或付费 QCC 全链路通过;完整工作台原生化仅为后续评估,本版本未实施。
141
+
117
142
  ## 升级与回滚
118
143
 
119
144
  从已有版本升级:
120
145
 
121
146
  ```sh
122
- dsh plugin --profile web add dsh-tender-workbench@0.5.4
147
+ dsh plugin --profile web add dsh-tender-workbench@0.5.6
123
148
  dsh web --no-open
124
149
  ```
125
150
 
126
- 0.5.4 对齐共享规范 v1.5.0:五个流程按钮打开/聚焦同一 Session 单例 Tab 并定位内部视图;补齐能力探针、状态订阅、卸载清理和跨会话展开保护。宿主管理侧拉、Tab X、宽度及停靠,业务内容不提供重复容器控制。Tab 重开保留当前 Client 内的阶段、查询草稿和主要子视图;历史仅展示当前 Session 已保存的查询记录,不是跨会话完整历史。真实 MCP 连接状态尚未接入,页面明确提示未核验;真实 DSH 四插件组合仍待复验。如需回退,可安装 `dsh-tender-workbench@0.5.3` 并重启 Profile;未改变业务数据格式。npm 版本与公开 Git 标签保持不可变。
151
+ 0.5.6 统一可选侧栏声明、安装预检和降级提示,并修复新版宿主 Session 事件读取及当前轮次绑定。保留 v1.5.0 Session 单例 Tab、五入口导航和 Client 生命周期内草稿恢复。查询、筛选、复核和报告业务格式不变;历史仍仅限当前 Session,真实 MCP 连接未核验。回退应恢复备份的完整已验证宿主/插件组合,不能在新版宿主上单独安装原始 0.5.4 或更早版本。
127
152
 
128
153
  ## 本地开发
129
154
 
@@ -138,7 +163,7 @@ corepack pnpm@11.7.0 run check
138
163
 
139
164
  `check` 会执行类型检查、完整 Vitest 测试、生产构建、README/发布状态校验以及 npm tarball 白名单预检。配置 npm Trusted Publishing 后,[发布工作流](.github/workflows/release.yml)可使用 OIDC 和 provenance;手工发布不得声称 provenance。
140
165
 
141
- 省、市、区数据源快照维护在 [resources/area.ts](resources/area.ts)。版本变更见 [CHANGELOG.md](CHANGELOG.md),发布检查见 [0.5.4 发布清单](docs/RELEASE-0.5.4.md)。
166
+ 省、市、区数据源快照维护在 [resources/area.ts](resources/area.ts)。版本变更见 [CHANGELOG.md](CHANGELOG.md),发布检查见 [0.5.6 发布清单](docs/RELEASE-0.5.6.md)。
142
167
 
143
168
  ## 界面演示与市场投稿
144
169
 
@@ -0,0 +1,22 @@
1
+ # dsh-tender-workbench 0.5.6
2
+
3
+ Version: **0.5.6**
4
+ Status: **ready for release**
5
+
6
+ 用户已追加授权本版 commit、push、tag 与 npm 发布。经本地与远端门禁后发布,不复用版本或移动旧 Tag。
7
+
8
+ ## 范围
9
+
10
+ Better Sidebar 统一为 optional peer;基础安装不默认安装侧栏,运行时仍通过可卸载的依赖子 Context 接入,缺少能力不阻断对话功能。不新增替代抽屉、不重写工作台容器。
11
+
12
+ 修复实际 DSH 0.1.2-rc.1 Host 工具路径:改用 Session.snapshotEvents() 读取事件,从 turn/start 获取当前轮次,不再依赖已移除的 Session.events 或 UserMessage.turn。此前页面/Skill 列表 smoke 未覆盖这一业务缺陷;本版补实际 Session 契约测试和隔离 Host 查询→规则预览/确认→人工复核→Excel/PDF 流程。
13
+
14
+ 基础预检接受没有侧栏的 DSH 0.1.2-rc.1;显式 --workbench / Windows -Workbench 要求侧栏已安装启用。已有 DSH 0.1.2-rc.1 + Sidebar 0.17.1 的 settingsNamespace 故障仍阻断,optional 不豁免宿主硬不兼容。未测试版本提示未验证,context 非必装。
15
+
16
+ ## 业务边界与验收
17
+
18
+ 无侧栏仍有原生独立会话、提示词生成、对话草稿、行为 Skill 和 Host 工具。对话驱动的查询、规则预览/确认、人工复核、报告生成与 Artifact 下载使用相同服务;原生模型是否正确选择工具和真实 QCC 授权/额度属于另层验收。可视化条件面板、表格筛选/详情、批量复核控件、历史视图及下载按钮仍需工作台;流程按钮在无侧栏时仅给出提示,不创建任务或自动执行工具。
19
+
20
+ 脚本 scripts/native-host-smoke.mjs 支持 TENDER_TEST_SIDEBAR=absent / compatible / incompatible。测试使用原始 npm pack、隔离 HOME/DSH_HOME 与随机非生产端口,调用实际 DSH 的 initProfile 和 dsh plugin install。官方 Profile 模板使用 hoisted / autoInstallPeers:false,由完整宿主提供核心 peers;脚本不自创或放宽依赖解析参数。坏组合验证升级预检阻断,并在专用隔离 Profile 复现已安装旧侧栏的实际启动故障。空 npm 项目不是完整 DSH Profile,其自动补齐核心 peers 存在连接器旧范围引发的 ERESOLVE,不宣称该路径已通过。
21
+
22
+ scripts/native-business-fixture.mjs 仅为独立诊断插件:通过实际注册工具、原生 Agent/Session、投影及本地 Artifact 执行流程,QCC 返回和直接用户消息是合成 fixture,没有真实模型或计费 MCP。该诊断代码、临时 Profile 和输出不打入 npm。测试结果、证据与仍待组合回归项登记于本仓 docs/OPTIONAL-SIDEBAR-ADOPTION.md。
package/lib/client.js CHANGED
@@ -8,7 +8,6 @@ window.__ModuleLoader__.load({
8
8
  let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
9
9
  let react_dom = require("react-dom");
10
10
  let react_jsx_runtime = require("react/jsx-runtime");
11
- let _deepseek_ai_dsh_client_runtime_client = require("@deepseek-ai/dsh-client-runtime/client");
12
11
  //#region node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
13
12
  var _a$1;
14
13
  function $constructor(name, initializer, params) {
@@ -4716,7 +4715,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4716
4715
  function resolveTenderEntryWorkspacePath(sessions, workspaces) {
4717
4716
  const current = sessions.list.getSnapshot().current;
4718
4717
  const workspaceSnapshot = workspaces.list.getSnapshot();
4719
- return (current === void 0 ? void 0 : workspaceSnapshot.items.find((workspace) => workspace.sessionIds.includes(current)))?.path ?? workspaceSnapshot.items.find((workspace) => workspace.workspaceId === workspaceSnapshot.recentWorkspaceId)?.path ?? workspaceSnapshot.items[0]?.path;
4718
+ return (current === void 0 ? void 0 : workspaceSnapshot.items.find((workspace) => workspace.sessionIds.includes(current)))?.path ?? (current === void 0 ? void 0 : sessions.list.getSnapshot().byId[current]?.cwd) ?? workspaceSnapshot.items[0]?.path;
4720
4719
  }
4721
4720
  /**
4722
4721
  * Create a distinct native Session with `cwd` ownership only (no workspace
@@ -5901,7 +5900,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
5901
5900
  tabId
5902
5901
  ]);
5903
5902
  }
5904
- /** Fail loudly only when the mandatory provider lacks an exercised capability. */
5903
+ /** Probe the optional provider before registering or opening its workbench. */
5905
5904
  function assertBetterSidebarContract(service) {
5906
5905
  for (const method of [
5907
5906
  "registerTab",
@@ -28205,7 +28204,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
28205
28204
  //#region src/client/TenderEntry.tsx
28206
28205
  const SIDEBAR_WORKSPACES_SELECTOR = "[data-slot=\"sidebar.workspaces\"]";
28207
28206
  const TENDER_TOP_MOUNT_SELECTOR = "[data-dsh-tender-top-mount=\"true\"]";
28208
- const SIDEBAR_UNAVAILABLE = "无法打开招投标 Tab。请安装或升级 dsh-better-sidebar(需 targetedOpen / stateSubscription),在宿主设置中启用招投标 Tab,然后重启 DSH。仍可使用对话和已支持的 Host 工具。";
28207
+ const SIDEBAR_UNAVAILABLE = "招投标可视化工作台暂不可用,当前输入和业务记录未改变。仍可使用原生对话、提示词生成和已支持的 Host 工具;流程按钮不会代为执行任务。若需工作台,请选择安装 dsh-better-sidebar@0.18.1(需 targetedOpen / stateSubscription),在宿主设置中启用招投标 Tab,再完整重启 DSH";
28209
28208
  /** Keep the whole focused card visible without scrolling the host conversation. */
28210
28209
  function revealShortcut(button) {
28211
28210
  const menu = button.parentElement;
@@ -28225,7 +28224,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
28225
28224
  (0, react.useEffect)(() => {
28226
28225
  setOpenError(void 0);
28227
28226
  }, [sessionId]);
28228
- const blank = useSession((snapshot) => snapshot.composerPhase === "blank");
28227
+ const blank = useSession((snapshot) => snapshot.blank && !snapshot.running && !snapshot.promptAttempted);
28229
28228
  const owned = isTenderEntrySessionId(sessionId);
28230
28229
  (0, react.useEffect)(() => {
28231
28230
  setHeroMount(null);
@@ -28727,12 +28726,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
28727
28726
  assertActionSkillName(requestedSkill);
28728
28727
  let response;
28729
28728
  try {
28730
- response = await connection.api.skills.list({ sessionId }, signal);
28729
+ response = await connection.skills.list({ sessionId }, signal);
28731
28730
  } catch (error) {
28732
28731
  throw new TenderSkillPreflightError("catalog-unavailable", `无法读取当前 Session 的 Skill 目录:${error instanceof Error ? error.message : "unknown error"}`);
28733
28732
  }
28734
- if (!response.result.ok) throw new TenderSkillPreflightError("catalog-unavailable", `无法读取当前 Session 的 Skill 目录:${response.result.error.code}`);
28735
- const skill = response.result.value.skills.find((entry) => entry.name === requestedSkill);
28733
+ if (!response.ok) throw new TenderSkillPreflightError("catalog-unavailable", `无法读取当前 Session 的 Skill 目录:${response.error.code}`);
28734
+ const skill = response.value.skills.find((entry) => entry.name === requestedSkill);
28736
28735
  if (skill === void 0) throw new TenderSkillPreflightError("skill-missing", `当前 Session 缺少行为 Skill:${requestedSkill}`);
28737
28736
  if (!skill.description.includes(`[dsh-tender-workbench/workflow-v2]`)) throw new TenderSkillPreflightError("skill-incompatible", `当前 Session 的行为 Skill 契约不兼容:${requestedSkill}`);
28738
28737
  }
@@ -30878,12 +30877,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30878
30877
  };
30879
30878
  //#endregion
30880
30879
  //#region src/client/ordinary-session-guard.ts
30881
- /** Compatibility for legacy workbench Sessions still attached to a Workspace.
30882
- * Keep their history/drafts intact; exclude them only from New Session reuse.
30883
- * DSH's public connectWorkspace currently has no candidate-filter extension.
30884
- */
30885
- function installOrdinarySessionGuard(sessions, workspaces) {
30886
- const original = workspaces.connectWorkspace;
30880
+ function installOrdinarySessionGuard(sessions, workspaces, navigation = workspaces) {
30881
+ const original = navigation.connectWorkspace;
30887
30882
  if (typeof original !== "function") return () => {};
30888
30883
  const businessSession = (id) => /^session-dsh-(?:tender-workbench|pre-duediligence|data-cleaning-agent)-/u.test(id);
30889
30884
  const pending = /* @__PURE__ */ new Map();
@@ -30894,7 +30889,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30894
30889
  const existing = pending.get(workspaceId);
30895
30890
  if (existing !== void 0) return existing;
30896
30891
  const resolve = async () => {
30897
- const workspace = this.list.getSnapshot();
30892
+ const workspace = workspaces.list.getSnapshot();
30898
30893
  const target = workspace.items.find((item) => item.workspaceId === workspaceId);
30899
30894
  if (target === void 0) throw new Error("New Session workspace is unavailable");
30900
30895
  const snapshot = sessions.list.getSnapshot();
@@ -30913,10 +30908,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30913
30908
  pending.set(workspaceId, attempt);
30914
30909
  return attempt;
30915
30910
  };
30916
- workspaces.connectWorkspace = guarded;
30911
+ navigation.connectWorkspace = guarded;
30917
30912
  return () => {
30918
30913
  active = false;
30919
- if (workspaces.connectWorkspace === guarded) workspaces.connectWorkspace = original;
30914
+ if (navigation.connectWorkspace === guarded) navigation.connectWorkspace = original;
30920
30915
  };
30921
30916
  }
30922
30917
  //#endregion
@@ -31085,7 +31080,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
31085
31080
  id: String(event.data.turn),
31086
31081
  role: "update"
31087
31082
  };
31088
- if (event.type === "tool/result" && (0, _deepseek_ai_dsh_client_runtime_client.isAppendSurfaceEvent)(event)) return {
31083
+ if (event.type === "tool/result" && event.surfaceOp === "append") return {
31089
31084
  id: String(event.data.turn),
31090
31085
  role: "update"
31091
31086
  };
@@ -31174,9 +31169,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
31174
31169
  "sessions",
31175
31170
  "workspaces",
31176
31171
  "conversation",
31177
- "conversationEvents",
31172
+ "uiConversation",
31178
31173
  "locale",
31179
- "connection"
31174
+ "remote.skills"
31180
31175
  ];
31181
31176
  function RegisteredTenderWorkbenchTab({ locale, sendIntent, t, projectionPort, reveal, navigation, ...props }) {
31182
31177
  (0, react.useSyncExternalStore)((listener) => locale.subscribe(listener), () => locale.getSnapshot(), () => locale.getSnapshot());
@@ -31191,17 +31186,20 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
31191
31186
  }
31192
31187
  /** Register the dedicated Session entry, workbench Tab, Hero brand, and Header recovery action. */
31193
31188
  function apply(ctx) {
31194
- ctx.conversationEvents.register(tenderSearchDefinition);
31189
+ ctx.effect(() => ctx.uiConversation.events.register(tenderSearchDefinition), "dsh-tender-workbench: search events");
31195
31190
  ctx.effect(() => ctx.locale.register(NS, {
31196
31191
  zh,
31197
31192
  en
31198
31193
  }), "dsh-tender-workbench: dictionaries");
31199
31194
  const sessions = ctx.get("sessions");
31200
31195
  const locale = ctx.get("locale");
31201
- const connection = ctx.get("connection");
31202
- if (sessions === void 0 || locale === void 0 || connection === void 0) throw new Error("dsh-tender-workbench requires the public sessions, locale, and connection services");
31196
+ const skills = ctx.get("remote.skills");
31197
+ if (sessions === void 0 || locale === void 0 || skills === void 0) throw new Error("dsh-tender-workbench requires the public sessions, locale, and remote.skills services");
31198
+ const connection = { skills };
31203
31199
  const t = locale.bind(NS);
31204
- ctx.effect(() => installOrdinarySessionGuard(sessions, ctx.workspaces), "dsh-tender-workbench: ordinary Session reuse");
31200
+ ctx.inject(["uiWorkspace"], (scope) => {
31201
+ scope.effect(() => installOrdinarySessionGuard(sessions, ctx.workspaces, scope.uiWorkspace), "dsh-tender-workbench: ordinary Session reuse");
31202
+ });
31205
31203
  let sidebar;
31206
31204
  let reveal;
31207
31205
  const navigation = createTenderWorkbenchNavigationController();