dsh-tender-workbench 0.4.2 → 0.4.4
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 +16 -0
- package/README.en.md +7 -7
- package/README.md +6 -6
- package/docs/RELEASE-0.4.4.md +53 -0
- package/lib/client.js +36 -18
- package/lib/client.js.map +1 -1
- package/lib/types/client/TenderEntry.d.ts.map +1 -1
- package/lib/types/client/tender-session-entry.d.ts +13 -3
- package/lib/types/client/tender-session-entry.d.ts.map +1 -1
- package/package.json +2 -2
- package/docs/RELEASE-0.4.2.md +0 -63
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ All notable changes to `dsh-tender-workbench` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.4.4] - 2026-09-06
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- 修复「新会话」误复用招投标工作台会话的问题:招投标入口会话改为仅以 `cwd`(工作区路径)创建、不再挂进工作区,DSH「新会话」的空白会话复用逻辑因此跳过它,恢复默认 DSH 标准页;只有点击「招投标」才进入带标题的工作台初始页。
|
|
12
|
+
|
|
13
|
+
## [0.4.3] - 2026-09-05
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- 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.
|
|
18
|
+
|
|
19
|
+
### Compatibility
|
|
20
|
+
|
|
21
|
+
- 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.
|
|
22
|
+
|
|
7
23
|
## [0.4.2] - 2026-09-05
|
|
8
24
|
|
|
9
25
|
### 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.
|
|
7
|
+
Current stable version: **0.4.4** (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.
|
|
70
|
+
To install the exact 0.4.4 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.
|
|
75
|
+
dsh plugin --profile web add dsh-tender-workbench@0.4.4
|
|
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.
|
|
94
|
+
dsh plugin --profile web add ./dsh-tender-workbench-0.4.4.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.
|
|
111
|
+
dsh plugin --profile web add dsh-tender-workbench@0.4.4
|
|
112
112
|
dsh web --no-open
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
Version 0.4.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
7
|
+
> 当前稳定版本:**0.4.4**(正式版本)
|
|
8
8
|
|
|
9
9
|
[](https://github.com/duhu2000/dsh-tender-workbench/actions/workflows/ci.yml)
|
|
10
10
|
[](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.
|
|
52
|
+
安装指定的 `0.4.4` 版本:
|
|
53
53
|
|
|
54
54
|
```sh
|
|
55
|
-
dsh plugin --profile web add dsh-tender-workbench@0.4.
|
|
55
|
+
dsh plugin --profile web add dsh-tender-workbench@0.4.4
|
|
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.
|
|
101
|
+
dsh plugin --profile web add dsh-tender-workbench@0.4.4
|
|
102
102
|
dsh web --no-open
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
`0.4.
|
|
105
|
+
`0.4.4` 在 `0.4.3` 基础上修复「新会话」误复用招投标工作台会话的问题:招投标入口会话改为仅以 `cwd`(工作区路径)创建、不再挂进工作区,DSH「新会话」的空白会话复用逻辑因此跳过它,恢复默认 DSH 标准页;只有点击「招投标」才进入带标题的工作台初始页。其余运行时代码、公共导出、工作流和 Artifact Schema 与 0.4.3 保持一致,不迁移会话数据。如部署环境出现特定回归,可重新安装 `dsh-tender-workbench@0.4.3` 并重启 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.
|
|
120
|
+
省、市、区数据源快照维护在 [resources/area.ts](resources/area.ts)。版本变更见 [CHANGELOG.md](CHANGELOG.md),发布检查见 [0.4.4 发布清单](docs/RELEASE-0.4.4.md)。
|
|
121
121
|
|
|
122
122
|
## 当前范围
|
|
123
123
|
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# dsh-tender-workbench 0.4.4 发布清单
|
|
2
|
+
|
|
3
|
+
- Version: **0.4.4**
|
|
4
|
+
- 发布日期:2026-09-06
|
|
5
|
+
- Status: **release candidate**
|
|
6
|
+
- 发布提交:(发布工作流完成后回填 npm gitHead)
|
|
7
|
+
- Git 标签:`v0.4.4`
|
|
8
|
+
- npm 目标:`dsh-tender-workbench@0.4.4`(`latest`)
|
|
9
|
+
|
|
10
|
+
## 发布范围
|
|
11
|
+
|
|
12
|
+
0.4.4 修复「新会话」误复用招投标工作台会话的问题。招投标入口会话从 `create({ workspaceId, sessionId })` 改为 `create({ cwd, sessionId })`:仅以工作区路径创建、不再挂进工作区 `sessionIds`,DSH 核心 `connectWorkspace` 的空白会话复用因此跳过它,「新会话」恢复默认 DSH 标准页;只有点击「招投标」才进入带标题的工作台初始页。运行时代码、公共导出、工作流行为和 Artifact Schema 与 0.4.3 保持一致;版本通过 `v0.4.4` 标签触发 `.github/workflows/release.yml`,由 GitHub Actions OIDC 发布至 npm 并生成 provenance。
|
|
13
|
+
|
|
14
|
+
## 兼容性与安装
|
|
15
|
+
|
|
16
|
+
- Node.js:`^22.19.0 || >=24.0.0`
|
|
17
|
+
- 包管理器:`pnpm@11.7.0`
|
|
18
|
+
- DeepSeek Harness 公共包:`>=0.1.1-rc.2 || >=0.1.2-0`
|
|
19
|
+
- `dsh-mcp-connector`:`>=0.2.31`
|
|
20
|
+
- `dsh-better-sidebar`:`>=0.17.1 || >=0.18.0-0`
|
|
21
|
+
- 必需 MCP 工具:`mcp__qcc-tender__search_tenders`、`mcp__qcc-tender__search_proposed_projects`
|
|
22
|
+
|
|
23
|
+
## 发布门禁
|
|
24
|
+
|
|
25
|
+
- [x] 使用仓库锁文件完成 frozen pnpm install。
|
|
26
|
+
- [x] TypeScript 类型检查通过。
|
|
27
|
+
- [x] 完整 Vitest 测试通过。
|
|
28
|
+
- [x] Host Loader、Client Bundle、source map 和类型声明构建成功。
|
|
29
|
+
- [x] 中文/英文 README 与 0.4.4 发布状态检查通过。
|
|
30
|
+
- [x] npm tarball 只包含白名单公开文件。
|
|
31
|
+
- [x] tag 模式检查确认 `v0.4.4` 与包版本一致。
|
|
32
|
+
- [ ] `main` CI 在 Linux Node 22/24 和 Windows Node 24 全部通过。
|
|
33
|
+
- [ ] npm Trusted Publishing OIDC 自动发布成功,`latest` 指向 0.4.4。
|
|
34
|
+
- [ ] npm provenance 可验证。
|
|
35
|
+
- [ ] GitHub Release 为 latest、非 draft、非 prerelease。
|
|
36
|
+
|
|
37
|
+
## 发布步骤
|
|
38
|
+
|
|
39
|
+
1. 使用 pnpm 11.7.0 执行 frozen install 和完整 `check`。
|
|
40
|
+
2. 审查 Git diff,提交 0.4.4 发布元数据与「新会话」会话归属修复并推送 `main`。
|
|
41
|
+
3. 等待必需 CI job 通过后,在发布提交上创建 annotated tag `v0.4.4` 并推送。
|
|
42
|
+
4. 由 GitHub Actions 通过 OIDC 自动发布;不使用长期 npm Token。
|
|
43
|
+
5. 核验 npm version、dist-tag、provenance、Git 标签和 GitHub Release。
|
|
44
|
+
|
|
45
|
+
## 发布结果
|
|
46
|
+
|
|
47
|
+
(发布工作流完成后回填。)
|
|
48
|
+
|
|
49
|
+
## 安全与回滚
|
|
50
|
+
|
|
51
|
+
- 禁止存储或输出 npm/GitHub Token、QCC 凭证、源数据集或会话私有 Artifact。
|
|
52
|
+
- 推送标签后如自动发布失败,不复用或移动公开标签;诊断并使用新的补丁版本向前修复。
|
|
53
|
+
- npm 发布后不得覆盖或 unpublish 0.4.4;部署回滚目标为 `dsh-tender-workbench@0.4.3`。
|
package/lib/client.js
CHANGED
|
@@ -4708,20 +4708,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4708
4708
|
if (!UUID_PATTERN.test(uuid)) throw new TenderSessionEntryError("invalid-session-id");
|
|
4709
4709
|
return `${TENDER_ENTRY_SESSION_ID_PREFIX}${uuid}`;
|
|
4710
4710
|
}
|
|
4711
|
-
|
|
4711
|
+
/**
|
|
4712
|
+
* Resolve the owning workspace's canonical directory path to seed a
|
|
4713
|
+
* `cwd`-owned entry Session. A `cwd`-only create deliberately does NOT attach
|
|
4714
|
+
* the Session to the workspace, so DSH's New-Session blank-session reuse skips it.
|
|
4715
|
+
*/
|
|
4716
|
+
function resolveTenderEntryWorkspacePath(sessions, workspaces) {
|
|
4712
4717
|
const current = sessions.list.getSnapshot().current;
|
|
4713
4718
|
const workspaceSnapshot = workspaces.list.getSnapshot();
|
|
4714
|
-
return (current === void 0 ? void 0 : workspaceSnapshot.items.find((workspace) => workspace.sessionIds.includes(current)))?.
|
|
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;
|
|
4715
4720
|
}
|
|
4716
|
-
/**
|
|
4721
|
+
/**
|
|
4722
|
+
* Create a distinct native Session with `cwd` ownership only (no workspace
|
|
4723
|
+
* attachment). This keeps the Session out of the workspace's reusable blank-set,
|
|
4724
|
+
* so DSH's 新会话 action mints a fresh default Session instead of reopening the
|
|
4725
|
+
* workbench Session.
|
|
4726
|
+
*/
|
|
4717
4727
|
async function createTenderEntrySession(sessions, workspaces, uuid = browserUuid) {
|
|
4718
|
-
const
|
|
4719
|
-
if (
|
|
4728
|
+
const cwd = resolveTenderEntryWorkspacePath(sessions, workspaces);
|
|
4729
|
+
if (cwd === void 0) throw new TenderSessionEntryError("workspace-unavailable");
|
|
4720
4730
|
const capability = sessions;
|
|
4721
4731
|
if (typeof capability.create !== "function") throw new TenderSessionEntryError("create-unavailable");
|
|
4722
4732
|
const requestedId = createTenderEntrySessionId(uuid());
|
|
4723
4733
|
const createdId = await capability.create({
|
|
4724
|
-
|
|
4734
|
+
cwd,
|
|
4725
4735
|
sessionId: requestedId
|
|
4726
4736
|
});
|
|
4727
4737
|
if (createdId !== requestedId) throw new TenderSessionEntryError("invalid-session-id");
|
|
@@ -4794,22 +4804,30 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
4794
4804
|
if (hero === null) return () => {};
|
|
4795
4805
|
const title = [...hero.querySelectorAll("span")].find((element) => element.dataset.dshTenderHeroHeadline === "true" || KNOWN_HERO_HEADLINES.has(element.textContent?.trim() ?? ""));
|
|
4796
4806
|
if (title === void 0) return () => {};
|
|
4797
|
-
|
|
4807
|
+
const original = title.dataset.dshTenderOriginalHeadline ?? title.textContent ?? "";
|
|
4798
4808
|
title.dataset.dshTenderHeroHeadline = "true";
|
|
4799
4809
|
title.dataset.dshTenderOriginalHeadline = original;
|
|
4800
4810
|
title.textContent = replacement;
|
|
4801
4811
|
const Observer = anchor.ownerDocument.defaultView?.MutationObserver;
|
|
4802
|
-
const
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4812
|
+
const MAX_HERO_CORRECTIONS = 8;
|
|
4813
|
+
let corrections = 0;
|
|
4814
|
+
let observer;
|
|
4815
|
+
if (Observer !== void 0) {
|
|
4816
|
+
observer = new Observer(() => {
|
|
4817
|
+
if (title.textContent === replacement) return;
|
|
4818
|
+
if (corrections >= MAX_HERO_CORRECTIONS) {
|
|
4819
|
+
observer?.disconnect();
|
|
4820
|
+
return;
|
|
4821
|
+
}
|
|
4822
|
+
corrections += 1;
|
|
4823
|
+
title.textContent = replacement;
|
|
4824
|
+
});
|
|
4825
|
+
observer.observe(title, {
|
|
4826
|
+
childList: true,
|
|
4827
|
+
characterData: true,
|
|
4828
|
+
subtree: true
|
|
4829
|
+
});
|
|
4830
|
+
}
|
|
4813
4831
|
return () => {
|
|
4814
4832
|
observer?.disconnect();
|
|
4815
4833
|
if (title.dataset.dshTenderOriginalHeadline !== original) return;
|