@jiugeqqqqq/dsh-house 0.4.4 → 0.4.6

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
@@ -3,6 +3,14 @@
3
3
  > 每次发版都必须在这里写一条:改了什么、为什么改、别人要不要跟着动。
4
4
  > 版本号跟 `package.json` 走,`npm i` 的人看这里就知道升了什么。
5
5
 
6
+ ## 0.4.6 — 2026-10-30
7
+
8
+ - 客户端入口加防重复注册:`window.__ModuleLoader__.load` 外面包一层一次性标记。别人机器上同一个 client bundle 会被两条 loader 行各执行一次,第二遍直接报 `duplicate factory registration` 并把 web boot 打挂;现在第二遍直接跳过,不再重复注册。本机复现不出来(同版本 DSH 0.2.1-rc.3 只跑一次),所以这版是防御性修法。
9
+
10
+ ## 0.4.5 — 2026-10-30
11
+
12
+ - 0.4.4 还崩,那就只剩 `external: ["react"]` 这个差异:0.2.2 没有它、客户端照样能 `require('react')`(loader 自己提供);声明成 external 后,旧版 loader 会认为 react 要由外部注入,没人给就 `import failed`。0.4.5 去掉 external,client 声明回到 0.2.2 的写法(完整 inject 名、无 immediately、无 external),功能代码不动。
13
+
6
14
  ## 0.4.4 — 2026-10-30
7
15
 
8
16
  - 找到真正的原因:**0.2.2 的 `dsh.client.inject` 写的是完整服务名 `@deepseek-ai/dsh-client-ui-slots`,0.3.0 起改成了短名 `slots`**。对方 DSH 版本不认短名,客户端入口解析失败 → `web boot: 1 entry did not activate / import failed`。0.2.2 能跑、0.3.x 全崩,就差这一个字段。0.4.4 改回完整名(本机新版本也认)。
package/lib/client.js CHANGED
@@ -1,3 +1,9 @@
1
+ // 2026-10-30:防重复注册。同一份 client bundle 如果被两条 loader 行各执行一次,
2
+ // __ModuleLoader__.load 会报 duplicate factory registration 把整个 web boot 打挂
3
+ // (别人机器上就是这个问题)。这里加个一次性标记:第二次执行直接跳过,不重复注册。
4
+ (function () {
5
+ if (window.__dshHouseClientLoaded) return;
6
+ window.__dshHouseClientLoaded = true;
1
7
  window.__ModuleLoader__.load({
2
8
  id: 'dsh-house',
3
9
  factory: (require) => {
@@ -454,3 +460,5 @@ window.__ModuleLoader__.load({
454
460
  return { apply: apply, inject: inject, name: 'house' };
455
461
  },
456
462
  });
463
+ })();
464
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiugeqqqqq/dsh-house",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "description": "房子 — 常驻的资产/能力清单,配一个侧边栏页面。清单会自动进系统提示(装了就生效);房子只记有没有、到哪一步,细节放 knowledge 和日志里。",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -20,9 +20,6 @@
20
20
  },
21
21
  "client": {
22
22
  "platform": "web",
23
- "external": [
24
- "react"
25
- ],
26
23
  "inject": [
27
24
  "@deepseek-ai/dsh-client-ui-slots"
28
25
  ]