dsh-tender-workbench 0.4.4 → 0.4.5

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 CHANGED
@@ -4,6 +4,14 @@ All notable changes to `dsh-tender-workbench` are documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.4.5] - 2026-09-06
8
+
9
+ ### Fixed
10
+
11
+ - 普通新会话跳过旧版本仍附属工作区的招投标、访前尽调和数据清洗业务空白会话,恢复原生首页与收起的业务侧栏。
12
+ - 兼容保护保留历史会话和草稿,复用普通空白会话,合并并发创建,并支持卸载恢复原方法。
13
+ - 新增六项回归测试;三个插件连续切换经本机页面和用户复测通过。
14
+
7
15
  ## [0.4.4] - 2026-09-06
8
16
 
9
17
  ### Fixed
package/README.en.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  `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.
6
6
 
7
- Current stable version: **0.4.4** (stable release).
7
+ Current stable version: **0.4.5** (stable release).
8
8
 
9
9
  ## What it does
10
10
 
@@ -67,12 +67,12 @@ dsh plugin --profile web add dsh-tender-workbench
67
67
  dsh web --no-open
68
68
  ```
69
69
 
70
- To install the exact 0.4.4 release:
70
+ To install the exact 0.4.5 release:
71
71
 
72
72
  ```sh
73
73
  dsh plugin --profile web add 'dsh-mcp-connector@>=0.2.31'
74
74
  dsh plugin --profile web add 'dsh-better-sidebar@>=0.17.1'
75
- dsh plugin --profile web add dsh-tender-workbench@0.4.4
75
+ dsh plugin --profile web add dsh-tender-workbench@0.4.5
76
76
  ```
77
77
 
78
78
  To install from an independent checkout, install the required Provider plugins first, then run from this repository:
@@ -91,7 +91,7 @@ To install a packed build:
91
91
  ```sh
92
92
  dsh plugin --profile web add 'dsh-mcp-connector@>=0.2.31'
93
93
  dsh plugin --profile web add 'dsh-better-sidebar@>=0.17.1'
94
- dsh plugin --profile web add ./dsh-tender-workbench-0.4.4.tgz
94
+ dsh plugin --profile web add ./dsh-tender-workbench-0.4.5.tgz
95
95
  dsh web --no-open
96
96
  ```
97
97
 
@@ -108,11 +108,11 @@ dsh plugin --profile web remove dsh-tender-workbench
108
108
  Upgrade an existing installation by installing the stable version and fully restarting the Web profile:
109
109
 
110
110
  ```sh
111
- dsh plugin --profile web add dsh-tender-workbench@0.4.4
111
+ dsh plugin --profile web add dsh-tender-workbench@0.4.5
112
112
  dsh web --no-open
113
113
  ```
114
114
 
115
- Version 0.4.4 fixes the "New Session" action wrongly reopening the tender workbench session. The tender launcher now creates its entry session with `cwd` (the workspace path) only, without attaching it to the workspace, so DSH's blank-session reuse for New Session skips it and New Session restores the default DSH page; the "招投标" workbench initial page (with its own title) only appears when the launcher is clicked. Other runtime code, public exports, workflow, and Artifact schema are unchanged from 0.4.3, and no Session data is migrated. If a deployment-specific regression requires rollback, reinstall `dsh-tender-workbench@0.4.3` and restart the profile. Published npm versions and Git tags are immutable; fixes after publication use a new patch version rather than overwriting 0.4.4.
115
+ Version 0.4.5 adds compatibility for legacy business blank sessions still attached to workspaces. Ordinary New Session now selects an ordinary blank session or creates one, restoring the native DSH page with the business sidebar closed. History, registrations and user drafts remain intact. Concurrent fallback creation is coalesced and the guard is reversible on plugin disposal. Public exports, business workflow and Artifact schema are unchanged. To roll back, reinstall `dsh-tender-workbench@0.4.4` and restart the profile; the legacy blank-session reuse issue will return. Published npm versions and Git tags are immutable.
116
116
 
117
117
  ## Using the workbench
118
118
 
@@ -137,7 +137,7 @@ The build emits the Host loader at `lib/index.js`, the Client bundle at `lib/cli
137
137
 
138
138
  The province, city, and district source snapshot is maintained in [resources/area.ts](resources/area.ts).
139
139
 
140
- See [CHANGELOG.md](CHANGELOG.md) and [the 0.4.4 release checklist](docs/RELEASE-0.4.4.md) for the stable-release scope and operational checks.
140
+ See [CHANGELOG.md](CHANGELOG.md) and [the 0.4.5 release checklist](docs/RELEASE-0.4.5.md) for the stable-release scope and operational checks.
141
141
 
142
142
  ## Current scope
143
143
 
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  > 面向国内招投标团队的 DeepSeek Harness 开源智能体插件:在一个会话级工作台内完成标讯与拟建项目查询、确定性规则初筛、限定范围智能分析、人工复核,以及 Excel/PDF 报告交付。
6
6
  >
7
- > 当前稳定版本:**0.4.4**(正式版本)
7
+ > 当前稳定版本:**0.4.5**(正式版本)
8
8
 
9
9
  [![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)
10
10
  [![npm](https://img.shields.io/npm/v/dsh-tender-workbench)](https://www.npmjs.com/package/dsh-tender-workbench)
@@ -49,10 +49,10 @@ dsh web --no-open
49
49
 
50
50
  安装或移除插件后,请完整重启 Web Profile。插件通过 `dsh.bundle.patch` 启用 `cordis.patch.yml`,并注册 `dsh-tender-workbench` Loader。
51
51
 
52
- 安装指定的 `0.4.4` 版本:
52
+ 安装指定的 `0.4.5` 版本:
53
53
 
54
54
  ```sh
55
- dsh plugin --profile web add dsh-tender-workbench@0.4.4
55
+ dsh plugin --profile web add dsh-tender-workbench@0.4.5
56
56
  ```
57
57
 
58
58
  移除插件:
@@ -98,11 +98,11 @@ dsh plugin --profile web remove dsh-tender-workbench
98
98
  从已有版本升级:
99
99
 
100
100
  ```sh
101
- dsh plugin --profile web add dsh-tender-workbench@0.4.4
101
+ dsh plugin --profile web add dsh-tender-workbench@0.4.5
102
102
  dsh web --no-open
103
103
  ```
104
104
 
105
- `0.4.4` 在 `0.4.3` 基础上修复「新会话」误复用招投标工作台会话的问题:招投标入口会话改为仅以 `cwd`(工作区路径)创建、不再挂进工作区,DSH「新会话」的空白会话复用逻辑因此跳过它,恢复默认 DSH 标准页;只有点击「招投标」才进入带标题的工作台初始页。其余运行时代码、公共导出、工作流和 Artifact Schema 0.4.3 保持一致,不迁移会话数据。如部署环境出现特定回归,可重新安装 `dsh-tender-workbench@0.4.3` 并重启 Profile。已发布的 npm 版本和 Git 标签保持不可变,后续修复使用新的补丁版本。
105
+ `0.4.5` 在 `0.4.4` 基础上补齐旧会话兼容保护:普通「新会话」不再复用旧版本留在工作区中的业务空白会话,恢复「探索未至之境」并收起业务侧栏。旧会话、历史和用户草稿保持不变;并发创建合并处理,插件卸载时撤销保护。公共导出、业务工作流和 Artifact Schema 不变。如部署环境出现特定回归,可重新安装 `dsh-tender-workbench@0.4.4` 并重启 Profile;旧会话误复用问题也会随回滚恢复。已发布的 npm 版本和 Git 标签保持不可变,后续修复使用新的补丁版本。
106
106
 
107
107
  ## 本地开发
108
108
 
@@ -117,7 +117,7 @@ corepack pnpm@11.7.0 run check
117
117
 
118
118
  `check` 会执行类型检查、完整 Vitest 测试、生产构建、README/发布状态校验以及 npm tarball 白名单预检。配置 npm Trusted Publishing 后,[发布工作流](.github/workflows/release.yml)可使用 OIDC 和 provenance;手工发布不得声称 provenance。
119
119
 
120
- 省、市、区数据源快照维护在 [resources/area.ts](resources/area.ts)。版本变更见 [CHANGELOG.md](CHANGELOG.md),发布检查见 [0.4.4 发布清单](docs/RELEASE-0.4.4.md)。
120
+ 省、市、区数据源快照维护在 [resources/area.ts](resources/area.ts)。版本变更见 [CHANGELOG.md](CHANGELOG.md),发布检查见 [0.4.5 发布清单](docs/RELEASE-0.4.5.md)。
121
121
 
122
122
  ## 当前范围
123
123
 
@@ -0,0 +1,21 @@
1
+ # dsh-tender-workbench 0.4.5 发布清单
2
+
3
+ - Version: **0.4.5**
4
+ - Status: **release candidate**
5
+ - 日期:2026-09-06
6
+ - 标签:`v0.4.5`
7
+ - npm:`dsh-tender-workbench@0.4.5`,目标 dist-tag 为 `latest`
8
+
9
+ ## 范围与验证
10
+
11
+ 补齐旧业务空白会话复用保护,普通新会话恢复原生首页及收起的业务侧栏。保留旧会话、历史和草稿;兼容包装可撤销,支持并发合并。公共导出和 Artifact Schema 不变。
12
+
13
+ 本地修复测试 213 项通过、1 项跳过;三个插件的四组页面切换场景通过,用户已复测 OK。发布前重新执行完整 check 和 tag 一致性检查。
14
+
15
+ ## 发布流程
16
+
17
+ 提交并推送 main,确认 CI,再创建不可变的 annotated tag v0.4.5。由 release.yml 的 GitHub OIDC Trusted Publishing 发布并生成 provenance,随后核对 npm latest、GitHub Release 和运行结果。不使用长期 npm Token。
18
+
19
+ ## 回退
20
+
21
+ 必要时安装 dsh-tender-workbench@0.4.4 并重启 Profile;旧会话复用问题会恢复。不得覆盖已发布 npm 版本或移动公开标签。
package/lib/client.js CHANGED
@@ -8326,6 +8326,49 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
8326
8326
  "error.writeDraft": "The current session is unavailable. Keep the panel open and try again."
8327
8327
  };
8328
8328
  //#endregion
8329
+ //#region src/client/ordinary-session-guard.ts
8330
+ /** Compatibility for legacy workbench Sessions still attached to a Workspace.
8331
+ * Keep their history/drafts intact; exclude them only from New Session reuse.
8332
+ * DSH's public connectWorkspace currently has no candidate-filter extension.
8333
+ */
8334
+ function installOrdinarySessionGuard(sessions, workspaces) {
8335
+ const original = workspaces.connectWorkspace;
8336
+ if (typeof original !== "function") return () => {};
8337
+ const businessSession = (id) => /^session-dsh-(?:tender-workbench|pre-duediligence|data-cleaning-agent)-/u.test(id);
8338
+ const pending = /* @__PURE__ */ new Map();
8339
+ let active = true;
8340
+ const guarded = async function(workspaceId) {
8341
+ const selected = await original.call(this, workspaceId);
8342
+ if (!active || !businessSession(selected)) return selected;
8343
+ const existing = pending.get(workspaceId);
8344
+ if (existing !== void 0) return existing;
8345
+ const resolve = async () => {
8346
+ const workspace = this.list.getSnapshot();
8347
+ const target = workspace.items.find((item) => item.workspaceId === workspaceId);
8348
+ if (target === void 0) throw new Error("New Session workspace is unavailable");
8349
+ const snapshot = sessions.list.getSnapshot();
8350
+ const reusable = snapshot.ids.find((id) => {
8351
+ const item = snapshot.byId[id];
8352
+ return !businessSession(id) && item?.blank === true && item.cwd === target.path && target.sessionIds.includes(id) && !workspace.archivedSessionIds.includes(id);
8353
+ });
8354
+ if (reusable !== void 0) return reusable;
8355
+ const created = await sessions.create({ workspaceId });
8356
+ if (businessSession(created)) throw new Error("New Session returned a business Session");
8357
+ return created;
8358
+ };
8359
+ const attempt = resolve().finally(() => {
8360
+ pending.delete(workspaceId);
8361
+ });
8362
+ pending.set(workspaceId, attempt);
8363
+ return attempt;
8364
+ };
8365
+ workspaces.connectWorkspace = guarded;
8366
+ return () => {
8367
+ active = false;
8368
+ if (workspaces.connectWorkspace === guarded) workspaces.connectWorkspace = original;
8369
+ };
8370
+ }
8371
+ //#endregion
8329
8372
  //#region src/client/area-data.ts
8330
8373
  const AREA_OPTIONS = [
8331
8374
  {
@@ -30582,6 +30625,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
30582
30625
  const connection = ctx.get("connection");
30583
30626
  if (sessions === void 0 || locale === void 0 || connection === void 0) throw new Error("dsh-tender-workbench requires the public sessions, locale, and connection services");
30584
30627
  const t = locale.bind(NS);
30628
+ ctx.effect(() => installOrdinarySessionGuard(sessions, ctx.workspaces), "dsh-tender-workbench: ordinary Session reuse");
30585
30629
  const reveal = createTenderWorkbenchRevealController();
30586
30630
  const navigation = createTenderWorkbenchNavigationController();
30587
30631
  const projectionPort = createTenderProjectionPort(sessions);