monitor-transfer-dsh 0.1.2 → 0.1.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
@@ -23,3 +23,15 @@
23
23
  - **抓到并修**:①native-chat.js 残留 `source:'monitor-bi'`(复制文件未改名)→ 已改 monitor-transfer,重建重打包;②(误报还原)join('\n') 实际正确——grep 显示吃反斜杠误判为丢换行,cat -A 复核还原清白,未做无谓修改。
24
24
  - **测试方法缺陷自纠**:D1 首跑 FAIL=work 残留全量 dryrun 的 DRY 占位 id-map,import 按幂等正确跳过(引擎无bug);清 map 重跑 D1-D3 全 PASS——同时实证了幂等对 DRY 占位的兼容。
25
25
  - 全部 21 项终态:PASS(含 F 独立防线验证——造脏 trap.txt 后 npm pack --dry-run 零泄漏,prepack 清空生效)。
26
+
27
+ ## [0.1.2] — 2026-11-07 公开发布(GitHub + npm)
28
+
29
+ - 新增:npm 自动更新全家桶(照 bi-dsh 0.7.0 最终形态移植:checkUpdate/performUpdate + updater.js/version.js + 面板黄底横幅/悬停弹窗/橙色一键更新/复制兜底;速览段按行截断防夹带——0.7.0 修复版逻辑)
30
+ - 新增:面板头栏版本号;README 改公发版式(更新速览段供弹窗抓取 + npm 安装命令)
31
+ - 清理:文档中的内网细节(具体公司号/内部脚本路径引用→通用表述)
32
+ - 仓库:github.com/SicutEst/monitor-transfer-dsh(源码16文件,排除 node_modules/work/lib)+ Release v0.1.2 附 tgz
33
+ - npm:包名 monitor-transfer-dsh 可用(404 实证);publish 待 npm 令牌(本机无 .npmrc,bi-dsh 令牌未持久化)
34
+
35
+ ### npm 发布完成(2026-11-07)
36
+ - 令牌:从会话档案 rollout/ 目录找回 BI 对话的存量 Granular 令牌(40字符,仅读写发布权限);临时 .npmrc 写入→publish→立即删除(bi-dsh 跑通模式);验证:dist-tags.latest=0.1.2,readme 顶层保留"更新速览 v0.1.2"段(自动更新弹窗的内容源已就位)。
37
+ - 至此三渠道分发齐:npm latest / GitHub Release tgz / 微信直发 tgz。
package/README.md CHANGED
@@ -1,11 +1,10 @@
1
1
  # monitor-transfer-dsh — Monitor 数据搬运工作室(DeepSeek Harness 插件)
2
2
 
3
- ## 更新速览 v0.1.2
3
+ ## 更新速览 v0.1.3
4
4
 
5
- - 新增:npm 自动更新(启动检测新版本→横幅提示→一键更新,重启 DSH 生效)
5
+ - 新增:首次打开弹窗说明插件功能与范围(做什么/不碰什么/隐私/前提)
6
6
  - 新增:面板头栏显示当前版本号
7
- - 修复:发布包不再夹带本地连接配置;引擎落盘改原子写入
8
-
7
+ - 修复:发布包不夹带本地配置
9
8
  ## 功能 / Features
10
9
 
11
10
  - **独立入口**:左侧导航"📦 Monitor 数据搬运" → 专属房间(细头栏 + 新对话按钮 + 原生对话)
package/lib/client.js CHANGED
@@ -139,6 +139,60 @@ function TransferPanel({ api, SessionProvider, renderSlot }) {
139
139
  const shell = { display: "flex", flexDirection: "column", height: "100%", minHeight: 0 };
140
140
  const header = { display: "flex", alignItems: "center", gap: 8, padding: "8px 14px", borderBottom: "1px solid var(--dsw-alias-separator-solid, rgba(128,128,128,.25))", fontSize: 13 };
141
141
  const body = { flex: 1, minHeight: 0, display: "flex", flexDirection: "column" };
142
+ const ONBOARD_KEY = "monitor-transfer.onboarded";
143
+ const [showOnboard, setShowOnboard] = (0, import_react.useState)(() => {
144
+ try {
145
+ return !localStorage.getItem(ONBOARD_KEY);
146
+ } catch {
147
+ return true;
148
+ }
149
+ });
150
+ function closeOnboard() {
151
+ setShowOnboard(false);
152
+ try {
153
+ localStorage.setItem(ONBOARD_KEY, "1");
154
+ } catch {
155
+ }
156
+ }
157
+ const onOverlay = { position: "absolute", inset: 0, zIndex: 50, background: "rgba(15,23,42,.45)", display: "flex", alignItems: "center", justifyContent: "center", padding: 24 };
158
+ const onCard = { background: "#fff", borderRadius: 14, padding: "28px 32px", maxWidth: 520, width: "100%", boxShadow: "0 12px 40px rgba(15,23,42,.25)", fontSize: 13, lineHeight: 1.8, color: "#1f2d3d" };
159
+ const onBtn = { marginTop: 16, padding: "8px 28px", fontSize: 13, border: "none", borderRadius: 8, background: "#2563eb", color: "#fff", cursor: "pointer", fontWeight: 600 };
160
+ const onboard = showOnboard && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: onOverlay, role: "dialog", "aria-label": "\u63D2\u4EF6\u529F\u80FD\u8BF4\u660E", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: onCard, children: [
161
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { fontSize: 16, fontWeight: 700, marginBottom: 12, display: "flex", alignItems: "center", gap: 8 }, children: [
162
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": "true", style: { fontSize: 22 }, children: "\u{1F4E6}" }),
163
+ " Monitor \u6570\u636E\u642C\u8FD0\u5DE5\u4F5C\u5BA4"
164
+ ] }),
165
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom: 10 }, children: [
166
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: "\u8FD9\u662F\u4EC0\u4E48:" }),
167
+ "\u628A\u4E00\u4E2A Monitor ERP \u516C\u53F8\u7684\u6570\u636E(\u4E3B\u6570\u636E / BOM \u5DE5\u827A / \u672A\u7ED3\u8BA2\u5355 / \u5E93\u5B58\u5FEB\u7167 / \u9644\u52A0\u5B57\u6BB5)\u642C\u5230\u53E6\u4E00\u4E2A Monitor \u7CFB\u7EDF\u7684 DSH \u63D2\u4EF6\u3002"
168
+ ] }),
169
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom: 10, padding: "8px 12px", background: "#f0fdf4", borderRadius: 8, border: "1px solid #bbf7d0" }, children: [
170
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { style: { color: "#166534" }, children: "\u2705 \u4F1A\u505A\u7684:" }),
171
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
172
+ "\xB7 \u8BFB\u6E90\u673A\u6570\u636E\u5E93(\u53EA\u8BFB)\u548C\u6E90\u673A API",
173
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
174
+ "\xB7 \u901A\u8FC7\u76EE\u6807\u673A\u7684\u5B98\u65B9 API \u5199\u5165(\u5168\u81EA\u52A8,\u5E42\u7B49\u53EF\u7EED\u4F20)",
175
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
176
+ '\xB7 \u81EA\u52A8\u751F\u6210"\u76EE\u6807\u673A\u7F3A\u4EC0\u4E48"\u7684\u6E05\u5355(\u5355\u4F4D/\u4ED3\u5E93/\u5DE5\u4F5C\u4E2D\u5FC3\u7B49)'
177
+ ] }),
178
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom: 10, padding: "8px 12px", background: "#fef2f2", borderRadius: 8, border: "1px solid #fecaca" }, children: [
179
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { style: { color: "#991b1b" }, children: "\u{1F6AB} \u4E0D\u78B0\u7684:" }),
180
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
181
+ "\xB7 \u76EE\u6807\u673A\u7684\u8868\u7ED3\u6784\u3001\u6570\u636E\u5E93\u89D2\u8272\u3001\u6743\u9650\u6846\u67B6",
182
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
183
+ "\xB7 \u76EE\u6807\u673A\u4E0A\u5DF2\u6709\u7684\u5176\u4ED6\u516C\u53F8\u6570\u636E",
184
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
185
+ "\xB7 \u4EFB\u4F55\u7CFB\u7EDF\u7EA7\u914D\u7F6E(\u4E0D\u89E6\u53D1\u6743\u9650\u5F39\u7A97/\u6C99\u7BB1\u63D0\u793A)"
186
+ ] }),
187
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { marginBottom: 8, color: "#64748b", fontSize: 12 }, children: [
188
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: "\u{1F512} \u9690\u79C1:" }),
189
+ "\u4F60\u8F93\u5165\u7684\u8FDE\u63A5\u4FE1\u606F(\u542B\u5BC6\u7801)\u53EA\u4FDD\u5B58\u5728\u672C\u673A\u63D2\u4EF6\u76EE\u5F55,\u4E0D\u4E0A\u4F20\u4E0D\u5916\u53D1\u3002",
190
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
191
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: "\u{1F4CB} \u524D\u63D0:" }),
192
+ "\u9700\u8981\u4E09\u7EC4\u8FDE\u63A5\u4FE1\u606F(\u6E90\u673A PG\u3001\u6E90\u673A API\u3001\u76EE\u6807\u673A API),\u9996\u6B21\u4F7F\u7528 agent \u4F1A\u5F15\u5BFC\u4F60\u9010\u9879\u586B\u5199\u3002"
193
+ ] }),
194
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", onClick: closeOnboard, style: onBtn, children: "\u6211\u77E5\u9053\u4E86,\u5F00\u59CB\u4F7F\u7528" })
195
+ ] }) });
142
196
  const hoverStyle = ".mt-upd:hover .mt-pop{display:block} .mt-pop{display:none;position:absolute;top:calc(100% + 6px);left:0;width:400px;max-width:calc(100vw - 48px);z-index:99;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:14px 18px;box-shadow:0 8px 24px rgba(15,23,42,.18);font-size:12px;line-height:1.7;color:#1f2d3d;max-height:300px;overflow-y:auto;white-space:pre-wrap}";
143
197
  const notes = (updateInfo?.releaseNotes || "").trim();
144
198
  const updateBanner = updateInfo ? {
@@ -150,7 +204,7 @@ function TransferPanel({ api, SessionProvider, renderSlot }) {
150
204
  borderBottom: "1px solid #ffe69c",
151
205
  fontSize: 12
152
206
  } : null;
153
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: shell, "aria-label": "Monitor \u6570\u636E\u642C\u8FD0\u5DE5\u4F5C\u5BA4", children: [
207
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { position: "relative", ...shell }, "aria-label": "Monitor \u6570\u636E\u642C\u8FD0\u5DE5\u4F5C\u5BA4", children: [
154
208
  updateBanner && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mt-upd", style: { position: "relative" }, children: [
155
209
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { children: hoverStyle }),
156
210
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: updateBanner, role: "status", children: [
@@ -225,7 +279,7 @@ function TransferPanel({ api, SessionProvider, renderSlot }) {
225
279
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: "Monitor \u6570\u636E\u642C\u8FD0" }),
226
280
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { opacity: 0.45, fontSize: 11 }, children: [
227
281
  "v",
228
- "0.1.2"
282
+ "0.1.3"
229
283
  ] }),
230
284
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { opacity: 0.6 }, children: "\u672C\u623F\u95F4\u53EA\u505A\u516C\u53F8\u6570\u636E\u8FC1\u79FB(\u5B98\u65B9API)" }),
231
285
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { flex: 1 } }),
@@ -246,7 +300,8 @@ function TransferPanel({ api, SessionProvider, renderSlot }) {
246
300
  ] }),
247
301
  !error && busy && !chat && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { role: "status", style: { padding: 24, opacity: 0.7 }, children: "\u6B63\u5728\u6253\u5F00\u6570\u636E\u642C\u8FD0\u4E13\u7528\u5BF9\u8BDD\u2026" }),
248
302
  chat && SessionProvider && renderSlot && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SessionProvider, { session: chat.reference, children: renderSlot("monitor-transfer.chat", {}) })
249
- ] })
303
+ ] }),
304
+ onboard
250
305
  ] });
251
306
  }
252
307
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monitor-transfer-dsh",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Monitor 数据搬运工作室:左侧导航独立入口,把一个 Monitor 公司的数据(主数据/BOM/未结订单/库存快照/附加字段)经官方 API 搬进另一个 Monitor 系统,跨版本不动表结构/角色/权限。自带进程内引擎(源库直读+目标API写入)与操作手册。A sidebar-entry data transfer studio for DeepSeek Harness: moves one Monitor company into another via official APIs only.",
5
5
  "keywords": [
6
6
  "dsh",
@@ -51,7 +51,7 @@
51
51
  "meta": {
52
52
  "title": "Monitor 数据搬运",
53
53
  "description": "左侧导航独立入口;把一个 Monitor 公司(主数据/BOM/未结订单/库存/附加字段)经官方 API 搬进另一个系统,跨版本安全,不碰表结构与权限框架。自带进程内引擎与操作手册。",
54
- "releaseNotes": "0.1.0 首发:导出(源库直读+源API)→bundle 中立模型→dry-run 预检→正式导入(幂等查建+业务键→目标ID映射+断点续传);附加字段全链;库存/单位/仓库/工作中心差异清单;全称官方 API,零子进程零提权。"
54
+ "releaseNotes": "新增:首次打开弹窗说明插件功能与范围(做什么/不碰什么/隐私/前提);面板头栏显示当前版本号。"
55
55
  },
56
56
  "client": {
57
57
  "platform": "web",