dsh-tender-workbench 0.4.2 → 0.4.3

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,16 @@ All notable changes to `dsh-tender-workbench` are documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.4.3] - 2026-09-05
8
+
9
+ ### Fixed
10
+
11
+ - Bounded the tender-session hero-headline sync so the MutationObserver that keeps the "招投标" headline can only correct the title a finite number of times before disconnecting, preventing an unbounded cross-plugin rewrite loop. The rewrite remains single-session-scoped (`isTenderEntrySessionId`) and the correction budget (`MAX_HERO_CORRECTIONS = 8`) makes the sync bounded.
12
+
13
+ ### Compatibility
14
+
15
+ - Runtime implementation, public exports, workflow behavior, and Artifact schema are otherwise unchanged from 0.4.2; this patch only adds a correction budget to the tender hero title rewrite.
16
+
7
17
  ## [0.4.2] - 2026-09-05
8
18
 
9
19
  ### Changed
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.2** (stable release).
7
+ Current stable version: **0.4.3** (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.2 release:
70
+ To install the exact 0.4.3 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.2
75
+ dsh plugin --profile web add dsh-tender-workbench@0.4.3
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.2.tgz
94
+ dsh plugin --profile web add ./dsh-tender-workbench-0.4.3.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.2
111
+ dsh plugin --profile web add dsh-tender-workbench@0.4.3
112
112
  dsh web --no-open
113
113
  ```
114
114
 
115
- Version 0.4.2 keeps the runtime code, public exports, workflow, and Artifact schema used by 0.4.1. This patch validates the npm Trusted Publishing path from GitHub Actions through OIDC and provenance without migrating Session data. If a deployment-specific regression requires rollback, reinstall `dsh-tender-workbench@0.4.1` 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.2.
115
+ Version 0.4.3 fixes a potential infinite loop where the tender-session hero headline could rewrite back and forth with other plugins. The headline sync now uses single-session ownership plus a bounded correction budget (`MAX_HERO_CORRECTIONS = 8`) that disconnects the observer at the limit. Other runtime code, public exports, workflow, and Artifact schema are unchanged from 0.4.2, and no Session data is migrated. If a deployment-specific regression requires rollback, reinstall `dsh-tender-workbench@0.4.2` 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.3.
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.2 release checklist](docs/RELEASE-0.4.2.md) for the stable-release scope and operational checks.
140
+ See [CHANGELOG.md](CHANGELOG.md) and [the 0.4.3 release checklist](docs/RELEASE-0.4.3.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.2**(正式版本)
7
+ > 当前稳定版本:**0.4.3**(正式版本)
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.2` 版本:
52
+ 安装指定的 `0.4.3` 版本:
53
53
 
54
54
  ```sh
55
- dsh plugin --profile web add dsh-tender-workbench@0.4.2
55
+ dsh plugin --profile web add dsh-tender-workbench@0.4.3
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.2
101
+ dsh plugin --profile web add dsh-tender-workbench@0.4.3
102
102
  dsh web --no-open
103
103
  ```
104
104
 
105
- `0.4.2` `0.4.1` 的运行时代码、公共导出、工作流和 Artifact Schema 保持一致;本补丁用于通过 npm Trusted Publishing 验证 GitHub Actions OIDC provenance 自动发布链路,不迁移会话数据。如部署环境出现特定回归,可重新安装 `dsh-tender-workbench@0.4.1` 并重启 Profile。已发布的 npm 版本和 Git 标签保持不可变,后续修复使用新的补丁版本。
105
+ `0.4.3` `0.4.2` 基础上修复招投标会话 Hero 标题与其它插件互相改写可能导致的无限循环:标题同步改为单一会话所有权 + 有界校正预算(`MAX_HERO_CORRECTIONS = 8`),达到上限即断开观察器。其余运行时代码、公共导出、工作流和 Artifact Schema0.4.2 保持一致,不迁移会话数据。如部署环境出现特定回归,可重新安装 `dsh-tender-workbench@0.4.2` 并重启 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.2 发布清单](docs/RELEASE-0.4.2.md)。
120
+ 省、市、区数据源快照维护在 [resources/area.ts](resources/area.ts)。版本变更见 [CHANGELOG.md](CHANGELOG.md),发布检查见 [0.4.3 发布清单](docs/RELEASE-0.4.3.md)。
121
121
 
122
122
  ## 当前范围
123
123
 
@@ -0,0 +1,48 @@
1
+ # dsh-tender-workbench 0.4.3 发布清单
2
+
3
+ - Version: **0.4.3**
4
+ - 发布日期:2026-09-05
5
+ - Status: **release candidate**
6
+ - Git 标签:`v0.4.3`
7
+ - npm 目标:`dsh-tender-workbench@0.4.3`(`latest`)
8
+
9
+ ## 发布范围
10
+
11
+ 0.4.3 修复招投标会话 Hero 标题与其它插件互相改写可能导致的无限循环。标题同步收敛为「单一会话所有权 + 有界同步」:仅在 `isTenderEntrySessionId(sessionId)` 为真的招投标会话改写标题,且观察器带校正预算(`MAX_HERO_CORRECTIONS = 8`),达到上限即断开,杜绝跨插件 ping-pong。运行时代码、公共导出、工作流行为和 Artifact Schema 与 0.4.2 保持一致;版本通过 `v0.4.3` 标签触发 `.github/workflows/release.yml`,由 GitHub Actions OIDC 发布至 npm 并生成 provenance。
12
+
13
+ ## 兼容性与安装
14
+
15
+ - Node.js:`^22.19.0 || >=24.0.0`
16
+ - 包管理器:`pnpm@11.7.0`
17
+ - DeepSeek Harness 公共包:`>=0.1.1-rc.2 || >=0.1.2-0`
18
+ - `dsh-mcp-connector`:`>=0.2.31`
19
+ - `dsh-better-sidebar`:`>=0.17.1 || >=0.18.0-0`
20
+ - 必需 MCP 工具:`mcp__qcc-tender__search_tenders`、`mcp__qcc-tender__search_proposed_projects`
21
+
22
+ ## 发布门禁
23
+
24
+ - [ ] 使用仓库锁文件完成 frozen pnpm install。
25
+ - [ ] TypeScript 类型检查通过。
26
+ - [ ] 完整 Vitest 测试通过。
27
+ - [ ] Host Loader、Client Bundle、source map 和类型声明构建成功。
28
+ - [ ] 中文/英文 README 与 0.4.3 发布状态检查通过。
29
+ - [ ] npm tarball 只包含白名单公开文件。
30
+ - [ ] tag 模式检查确认 `v0.4.3` 与包版本一致。
31
+ - [ ] `main` CI 在 Linux Node 22/24 和 Windows Node 24 全部通过。
32
+ - [ ] npm Trusted Publishing OIDC 自动发布成功,`latest` 指向 0.4.3。
33
+ - [ ] npm provenance 可验证。
34
+ - [ ] GitHub Release 为 latest、非 draft、非 prerelease。
35
+
36
+ ## 发布步骤
37
+
38
+ 1. 使用 pnpm 11.7.0 执行 frozen install 和完整 `check`。
39
+ 2. 审查 Git diff,提交 0.4.3 发布元数据与 Hero 标题同步修复并推送 `main`。
40
+ 3. 等待必需 CI job 通过后,在发布提交上创建 annotated tag `v0.4.3` 并推送。
41
+ 4. 由 GitHub Actions 通过 OIDC 自动发布;不使用长期 npm Token。
42
+ 5. 核验 npm version、dist-tag、provenance、Git 标签和 GitHub Release。
43
+
44
+ ## 安全与回滚
45
+
46
+ - 禁止存储或输出 npm/GitHub Token、QCC 凭证、源数据集或会话私有 Artifact。
47
+ - 推送标签后如自动发布失败,不复用或移动公开标签;诊断并使用新的补丁版本向前修复。
48
+ - npm 发布后不得覆盖或 unpublish 0.4.3;部署回滚目标为 `dsh-tender-workbench@0.4.2`。
package/lib/client.js CHANGED
@@ -4794,22 +4794,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4794
4794
  if (hero === null) return () => {};
4795
4795
  const title = [...hero.querySelectorAll("span")].find((element) => element.dataset.dshTenderHeroHeadline === "true" || KNOWN_HERO_HEADLINES.has(element.textContent?.trim() ?? ""));
4796
4796
  if (title === void 0) return () => {};
4797
- let original = title.dataset.dshTenderOriginalHeadline ?? title.textContent ?? "";
4797
+ const original = title.dataset.dshTenderOriginalHeadline ?? title.textContent ?? "";
4798
4798
  title.dataset.dshTenderHeroHeadline = "true";
4799
4799
  title.dataset.dshTenderOriginalHeadline = original;
4800
4800
  title.textContent = replacement;
4801
4801
  const Observer = anchor.ownerDocument.defaultView?.MutationObserver;
4802
- const observer = Observer === void 0 ? void 0 : new Observer(() => {
4803
- if (title.textContent === replacement) return;
4804
- original = title.textContent ?? original;
4805
- title.dataset.dshTenderOriginalHeadline = original;
4806
- title.textContent = replacement;
4807
- });
4808
- observer?.observe(title, {
4809
- childList: true,
4810
- characterData: true,
4811
- subtree: true
4812
- });
4802
+ const MAX_HERO_CORRECTIONS = 8;
4803
+ let corrections = 0;
4804
+ let observer;
4805
+ if (Observer !== void 0) {
4806
+ observer = new Observer(() => {
4807
+ if (title.textContent === replacement) return;
4808
+ if (corrections >= MAX_HERO_CORRECTIONS) {
4809
+ observer?.disconnect();
4810
+ return;
4811
+ }
4812
+ corrections += 1;
4813
+ title.textContent = replacement;
4814
+ });
4815
+ observer.observe(title, {
4816
+ childList: true,
4817
+ characterData: true,
4818
+ subtree: true
4819
+ });
4820
+ }
4813
4821
  return () => {
4814
4822
  observer?.disconnect();
4815
4823
  if (title.dataset.dshTenderOriginalHeadline !== original) return;