dsh-data-cleaning-agent 0.9.10 → 0.9.11
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.en.md +3 -1
- package/README.md +4 -2
- package/docs/RELEASE-0.9.11.md +18 -0
- package/lib/client.js +26 -3
- package/package.json +2 -2
- package/docs/RELEASE-0.9.10.md +0 -24
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.9.11] - 2026-09-13
|
|
8
|
+
|
|
9
|
+
- 修正真实 Host 首页判断:Session 并不提供 composerPhase;改为观察当前清洗会话 DOM 的真实 data-phase,确保标题替换实际启用。
|
|
10
|
+
- 回归夹具移除虚构 composerPhase 字段,覆盖 settling/hero/active、普通会话隔离与卸载恢复。
|
|
11
|
+
|
|
7
12
|
## [0.9.10] - 2026-09-13
|
|
8
13
|
|
|
9
14
|
- 修复首页先挂载于 settling 阶段导致 Logo 与标题替换被跳过的问题;监听宿主阶段及文本节点变化,显示“数据清洗补全智能体”。
|
package/README.en.md
CHANGED
|
@@ -10,7 +10,9 @@ Related agents: [数据清洗补全](https://github.com/duhu2000/dsh-data-cleani
|
|
|
10
10
|
|
|
11
11
|
> A data cleaning & completion agent plugin for DeepSeek Harness: local CSV/XLSX/JSON engine plus optional Qichacha (QCC) MCP enterprise-data enrichment. Initiated and maintained by the Qichacha (QCC) team.
|
|
12
12
|
>
|
|
13
|
-
> Current source version / 当前源码版本: **0.9.
|
|
13
|
+
> Current source version / 当前源码版本: **0.9.11** (stable release)
|
|
14
|
+
|
|
15
|
+
0.9.11 uses the current cleaning Session's rendered Host phase instead of the nonexistent Session.composerPhase property. Branding appears on the real home screen and restores when leaving it.
|
|
14
16
|
|
|
15
17
|
0.9.10 observes the Host settling-to-hero transition so the database logo and product title appear even after delayed layout. Unknown structures do not trigger global headline rewriting. Rollback version: 0.9.9.
|
|
16
18
|
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
数据清洗补全智能体:面向 Excel/CSV/JSON 企业名单,提供数据清洗、表格清洗、清洗补全、去重、企业数据补全与字段补全,支持企查查 MCP 和结果导出。
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
dsh plugin --profile web add dsh-data-cleaning-agent@0.9.
|
|
12
|
+
dsh plugin --profile web add dsh-data-cleaning-agent@0.9.11
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
请先满足下文的 DSH、连接器及侧边栏依赖要求;安装后完整停止并重启对应 Profile。
|
|
@@ -27,7 +27,9 @@ dsh plugin --profile web add dsh-data-cleaning-agent@0.9.10
|
|
|
27
27
|
|
|
28
28
|
> 在 DeepSeek Harness 中清洗、补全、画像企业名单数据的智能体插件:本地 CSV/XLSX/JSON 引擎 + 可选企查查(Qichacha/QCC)MCP 企业数据补全,由企查查(Qichacha/QCC)团队发起并维护。
|
|
29
29
|
>
|
|
30
|
-
> 当前源码版本 / Current source version: **0.9.
|
|
30
|
+
> 当前源码版本 / Current source version: **0.9.11**(正式版本)
|
|
31
|
+
|
|
32
|
+
0.9.11 修正真实 Host 的首页状态接口:不再依赖 Session.composerPhase,按当前清洗会话所在宿主根节点的 data-phase 显示 Logo 与标题,并在离开首页时恢复。
|
|
31
33
|
|
|
32
34
|
0.9.10 补齐首页 settling → hero 阶段监听,避免首次挂载漏掉 Logo 与标题替换;兼容“探索未知之境”,未知结构不做全局标题改写。回滚版本为 0.9.9。
|
|
33
35
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# 0.9.11 · Real Host home phase
|
|
2
|
+
|
|
3
|
+
The real DSH Session snapshot does not expose composerPhase. Versions 0.9.9/0.9.10
|
|
4
|
+
adapted the DOM rewrite but its caller never enabled it. The former React fixture
|
|
5
|
+
supplied that nonexistent property and masked the integration bug.
|
|
6
|
+
|
|
7
|
+
The cleaning experience now observes data-phase on its own marker's closest Host
|
|
8
|
+
root. It never derives the phase from input text or other Sessions. Unknown or active
|
|
9
|
+
roots are not treated as home. The observer disconnects on Session changes/unmount.
|
|
10
|
+
Hero changes retain the existing reversible logo/title behavior.
|
|
11
|
+
|
|
12
|
+
Session-scoped factories can also mount after the root ownership event. Restore
|
|
13
|
+
ownership from the explicit independently-created cleaning Session namespace;
|
|
14
|
+
never infer it from another Session, a task history selection or draft text.
|
|
15
|
+
|
|
16
|
+
Tests must omit composerPhase, cover settling/hero/active and ordinary Session cleanup.
|
|
17
|
+
Real logged-in DSH visual acceptance and final registry evidence are recorded in Release notes.
|
|
18
|
+
No paid QCC/OCR calls are needed for branding acceptance. Rollback: 0.9.10 (known title bug).
|
package/lib/client.js
CHANGED
|
@@ -1530,6 +1530,7 @@ body:has(.dcAgentPromptBackdrop) { overflow: hidden; }
|
|
|
1530
1530
|
isCleaningSession(sessionId) ? sessionId : null,
|
|
1531
1531
|
);
|
|
1532
1532
|
react.useEffect(() => {
|
|
1533
|
+
setMarkedSessionId(isCleaningSession(sessionId) ? sessionId : null);
|
|
1533
1534
|
const handleMarked = (event) => {
|
|
1534
1535
|
const detail = event?.detail ?? {};
|
|
1535
1536
|
setMarkedSessionId(detail.active === true && detail.sessionId === sessionId ? sessionId : null);
|
|
@@ -1539,7 +1540,9 @@ body:has(.dcAgentPromptBackdrop) { overflow: hidden; }
|
|
|
1539
1540
|
}, [sessionId]);
|
|
1540
1541
|
// DSH 可能复用同一个 slot component 切换会话;状态必须绑定具体 sessionId,
|
|
1541
1542
|
// 避免从清洗会话切回普通会话后仍残留业务首页与提示词入口。
|
|
1542
|
-
|
|
1543
|
+
// Session-scoped slot factories can mount after the root ownership event.
|
|
1544
|
+
// Our independently-created namespace is durable ownership, unlike a draft.
|
|
1545
|
+
return ownedSessionId(sessionId) || (markedSessionId === sessionId && isCleaningSession(sessionId));
|
|
1543
1546
|
}
|
|
1544
1547
|
|
|
1545
1548
|
/**
|
|
@@ -2743,7 +2746,7 @@ body:has(.dcAgentPromptBackdrop) { overflow: hidden; }
|
|
|
2743
2746
|
const ownedLogos = new Map();
|
|
2744
2747
|
const hiddenForeignDocks = new Map();
|
|
2745
2748
|
const composerStack = marker?.parentElement?.parentElement;
|
|
2746
|
-
//
|
|
2749
|
+
// 单一会话所有权由入口 enabled 与真实宿主 data-phase=hero 共同保证,
|
|
2747
2750
|
// 与 React effect 生命周期共同保证:非清洗会话不会挂载,会话切换即走 cleanup 让位。
|
|
2748
2751
|
// 有界同步:每次 fix 的 DOM 变更计入校正预算,达到上限即断开观察器,杜绝与其它插件互相改写的死循环。
|
|
2749
2752
|
const MAX_HERO_CORRECTIONS = 8;
|
|
@@ -2845,6 +2848,22 @@ body:has(.dcAgentPromptBackdrop) { overflow: hidden; }
|
|
|
2845
2848
|
};
|
|
2846
2849
|
}
|
|
2847
2850
|
|
|
2851
|
+
function observeHomePhase(sessionId, enabled, onChange) {
|
|
2852
|
+
onChange(false);
|
|
2853
|
+
if (!enabled || typeof document === 'undefined') return () => {};
|
|
2854
|
+
const marker = [...(document.querySelectorAll?.('.dcAgentExperience') || [])]
|
|
2855
|
+
.find(node => node.dataset?.sessionId === sessionId);
|
|
2856
|
+
// Session snapshots do not expose composerPhase. The Host's own rendered root
|
|
2857
|
+
// is authoritative; never infer a blank conversation from draft text or title.
|
|
2858
|
+
const root = marker?.closest?.('[data-phase]');
|
|
2859
|
+
if (!root) return () => {};
|
|
2860
|
+
const update = () => onChange(root.getAttribute('data-phase') === 'hero');
|
|
2861
|
+
update();
|
|
2862
|
+
const observer = typeof MutationObserver === 'function' ? new MutationObserver(update) : null;
|
|
2863
|
+
observer?.observe(root, { attributes: true, attributeFilter: ['data-phase'] });
|
|
2864
|
+
return () => observer?.disconnect();
|
|
2865
|
+
}
|
|
2866
|
+
|
|
2848
2867
|
function DataCleaningExperience(props) {
|
|
2849
2868
|
const { sessionId, session: ownerSession } = props;
|
|
2850
2869
|
const enabled = useCleaningSession(sessionId);
|
|
@@ -2854,7 +2873,10 @@ body:has(.dcAgentPromptBackdrop) { overflow: hidden; }
|
|
|
2854
2873
|
document.addEventListener(DEPENDENCY_EVENT, listener);
|
|
2855
2874
|
return () => document.removeEventListener(DEPENDENCY_EVENT, listener);
|
|
2856
2875
|
}, [sessionId]);
|
|
2857
|
-
const hero =
|
|
2876
|
+
const [hero, setHero] = react.useState(false);
|
|
2877
|
+
react.useEffect(() => observeHomePhase(sessionId, enabled,
|
|
2878
|
+
value => setHero(current => current === value ? current : value)),
|
|
2879
|
+
[sessionId, enabled, ownerSession?.openState]);
|
|
2858
2880
|
const [menuMount, setMenuMount] = react.useState(null);
|
|
2859
2881
|
react.useEffect(() => {
|
|
2860
2882
|
if (!enabled) return undefined;
|
|
@@ -5248,6 +5270,7 @@ body:has(.dcAgentPromptBackdrop) { overflow: hidden; }
|
|
|
5248
5270
|
plainEntityListDataset,
|
|
5249
5271
|
resultFieldLabel,
|
|
5250
5272
|
rewriteHeroChrome,
|
|
5273
|
+
observeHomePhase,
|
|
5251
5274
|
ensureWorkflowTask,
|
|
5252
5275
|
ensureEditableWorkflowTask,
|
|
5253
5276
|
queueWorkflowOperation,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-data-cleaning-agent",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.11",
|
|
4
4
|
"description": "Data cleaning and data enrichment for CSV/XLSX/JSON enterprise lists in DeepSeek Harness, including spreadsheet cleaning, deduplication, profiling, optional Qichacha MCP and exports.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"install.sh",
|
|
21
21
|
"marketing",
|
|
22
22
|
"docs/USER-GUIDE.md",
|
|
23
|
-
"docs/RELEASE-0.9.
|
|
23
|
+
"docs/RELEASE-0.9.11.md",
|
|
24
24
|
"docs/FIRST-CONTRIBUTION.md",
|
|
25
25
|
"docs/COMPATIBILITY.md",
|
|
26
26
|
"docs/UI-V1.5.0-ADOPTION.md",
|
package/docs/RELEASE-0.9.10.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# 0.9.10 · Delayed home branding
|
|
2
|
-
|
|
3
|
-
## Scope
|
|
4
|
-
|
|
5
|
-
Preserves 0.9.9 sibling-branch compatibility and 0.9.8 Session ownership. Adds observation
|
|
6
|
-
of Host settling-to-hero layout transitions and headline text-node updates. The home displays
|
|
7
|
-
the blue database logo plus “数据清洗补全智能体”. Both Chinese Host headline variants work.
|
|
8
|
-
Unknown layout never falls back to rewriting document.body. Cleanup restores native branding.
|
|
9
|
-
|
|
10
|
-
## Verification and boundary
|
|
11
|
-
|
|
12
|
-
Node regression covers delayed mounting, text refresh, reversible cleanup and ordinary-session
|
|
13
|
-
isolation. Real React/Chromium matrix exercises settling-to-hero before checking logo placement,
|
|
14
|
-
light/dark responsive layouts and active/ordinary Session transitions. Existing workflow tests
|
|
15
|
-
remain mandatory. Run npm run check and npm run test:ui before release.
|
|
16
|
-
|
|
17
|
-
The live localhost DSH tab still requires authentication; no live-host success is claimed.
|
|
18
|
-
After upgrading/restarting, click 数据清洗补全, confirm logo/title, then switch to an ordinary
|
|
19
|
-
Session and confirm native branding. No paid MCP, OCR or production data is used in tests.
|
|
20
|
-
|
|
21
|
-
## Publishing
|
|
22
|
-
|
|
23
|
-
Use PR/main CI gates before annotated v0.9.10, existing GitHub OIDC/provenance workflow,
|
|
24
|
-
then registry version/gitHead and tarball read-back. Rollback: 0.9.9 (may miss delayed hero).
|