@zifeng1023/dsh-bot 0.3.3 → 0.3.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/README.md CHANGED
@@ -99,7 +99,7 @@ node dev/gen-tools-doc.mjs # 重新生成工具清单文档
99
99
  - [立意与竞品](./docs/POSITIONING.md) — 为什么做「可托付」这一层
100
100
  - [技术设计](./docs/DESIGN.md)
101
101
  - [工具清单](./docs/TOOLS.md)(自动生成)
102
- - [路线图](./docs/ROADMAP-v0.3.md) — 含版本规划与真机教训
102
+ - [宿主契约](./docs/HOST-CONTRACT.md) — 宿主实际怎么工作,以及踩过的七个坑
103
103
  - [经验教训](./docs/LESSONS.md) — 从事故文档蒸馏的工程原则
104
104
 
105
105
  ## License
package/dsh-plugin.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "manifestVersion": "0.15",
4
4
  "id": "dsh-bot.core",
5
5
  "name": "dsh-bot",
6
- "version": "0.3.3",
6
+ "version": "0.3.4",
7
7
  "license": "MIT",
8
8
  "facets": {
9
9
  "host": {
package/lib/client.js CHANGED
@@ -2,10 +2,13 @@
2
2
  * dsh-bot 面板 — 浏览器端
3
3
  *
4
4
  * ⚠️ 反复崩溃换来的约束(每条都有实际报错佐证):
5
- * 1. id 必须是 package.json 的包名(dsh-bot)—— 否则 duplicate factory
6
- * 2. 产物必须是 lib/client.js —— 否则 import failed
7
- * 3. 用到 ctx.slots 必须在 inject 声明 'slots' —— 否则 entry did not activate
8
- * 4. apply 与组件都要 try/catch —— 否则拖垮整个 web boot
5
+ * 1. 整个文件必须包在 IIFE 里 —— client.js 是经典脚本,顶层 const 会进入全局词法作用域;
6
+ * 宿主重复加载时(同一 rev 重试、新旧 rev 并存、热挂载)第二次会抛
7
+ * "Identifier 'BG_BASE' has already been declared",整个 web boot 降级失败。
8
+ * 2. id 必须是 package.json 的包名(@zifeng1023/dsh-bot)—— 否则宿主动态解析不到模块。
9
+ * 3. 产物必须是 lib/client.js —— 否则 import failed
10
+ * 4. 用到 ctx.slots 必须在 inject 声明 'slots' —— 否则 entry did not activate
11
+ * 5. apply 与组件都要 try/catch —— 否则拖垮整个 web boot
9
12
  *
10
13
  * 🎨 样式规范全部来自 DSH 自己的 CSS(不是猜的):
11
14
  * · 按钮: height 28px / padding 0 10px / radius-sm
@@ -14,6 +17,8 @@
14
17
  * · 卡片: bg-layer-2 + border-l1 + radius-lg
15
18
  * · 过渡: .15s ease
16
19
  */
20
+ (function () {
21
+ 'use strict';
17
22
 
18
23
  // ============================================================
19
24
  // 设计令牌
@@ -497,7 +502,7 @@ try {
497
502
  }).catch(function () {});
498
503
  } catch (e) {}
499
504
  window.__ModuleLoader__.load({
500
- id: 'dsh-bot',
505
+ id: '@zifeng1023/dsh-bot',
501
506
  factory: (require) => {
502
507
  const inject = ['slots'];
503
508
 
@@ -4146,7 +4151,9 @@ window.__ModuleLoader__.load({
4146
4151
  },
4147
4152
  });
4148
4153
 
4154
+ })();
4155
+
4156
+
4157
+
4149
4158
 
4150
4159
 
4151
-
4152
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zifeng1023/dsh-bot",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "常驻 AI 队友:记得住、守得住、收得回。默认 dry-run 演习、执行前自动快照、可一键回滚,并支持错峰调度省钱。",
5
5
  "repository": {
6
6
  "type": "git",