@restregular/dsh-skill-center 0.2.0 → 0.2.1

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
@@ -67,7 +67,7 @@ Then add the package to the profile's bundle list and restart:
67
67
  // <profile>/package.json
68
68
  {
69
69
  "dsh": { "profile": { "bundles": [/* … */ "@restregular/dsh-skill-center"] } },
70
- "dependencies": { "@restregular/dsh-skill-center": "^0.1.4" }
70
+ "dependencies": { "@restregular/dsh-skill-center": "^0.2.1" }
71
71
  }
72
72
  ```
73
73
 
@@ -75,8 +75,34 @@ The package ships its own `cordis.patch.yml`, so no manual loader edit is requir
75
75
  host plugin (`id: skill-center`) and the client half. The sidebar row appears **below Plugins**,
76
76
  because the client registers `sidebar.panellist` with `order: 1`.
77
77
 
78
+ > [!IMPORTANT]
79
+ > The loader row's `name` **must equal the package name verbatim**
80
+ > (`@restregular/dsh-skill-center`). `@deepseek-ai/dsh-client-modules` locates a row's
81
+ > `package.json` by that name and compares it strictly (`nearestPackage`). With a bare
82
+ > `dsh-skill-center` the host half still mounts, but the client half is dropped **silently**:
83
+ > no sidebar row, `/plugins/@restregular/dsh-skill-center/client.js` returns `404`, and nothing is
84
+ > logged. 0.2.1 fixed exactly this; 0.2.0 shipped the bare name.
85
+
78
86
  To uninstall: remove the bundle entry and the dependency, then restart.
79
87
 
88
+ ## Troubleshooting
89
+
90
+ Nothing appears in the sidebar after install + restart? Check in this order:
91
+
92
+ 1. **Is the host half alive?** `http://127.0.0.1:19387/dsh-skill-center/api?op=ping` should answer
93
+ `{"ok":true,…}`. A `404` means the loader row never mounted — the package is not in the profile's
94
+ `dsh.profile.bundles`, or is not installed under the profile's `node_modules`.
95
+ 2. **Did the client half reach the browser module graph?**
96
+ `http://127.0.0.1:19387/dsh-skill-center/api?op=diagnose` — `client.inGraph` must be `true`.
97
+ `false` while `host.mounted` is `true` is the loader-row-name / package-name mismatch above.
98
+ 3. **Is the bundle served?** `http://127.0.0.1:19387/plugins/@restregular/dsh-skill-center/client.js`
99
+ should return JavaScript, not `404`.
100
+ 4. **Re-run the offline composition check** (no host restart needed):
101
+ `node verify-compose.mjs <profileDir>` — it now fails loudly on a loader row name that cannot be
102
+ resolved back to the package.
103
+ 5. `pnpm add` inside the profile is what makes the package resolvable; installing it elsewhere
104
+ (a global `npm i -g`, an unrelated directory) installs nothing the profile can compose.
105
+
80
106
  ## Usage
81
107
 
82
108
  1. Open a session (or stay on the home screen — see *Known limits*).
@@ -243,15 +269,35 @@ pnpm add @restregular/dsh-skill-center
243
269
  // <profile>/package.json
244
270
  {
245
271
  "dsh": { "profile": { "bundles": [/* … */ "@restregular/dsh-skill-center"] } },
246
- "dependencies": { "@restregular/dsh-skill-center": "^0.1.4" }
272
+ "dependencies": { "@restregular/dsh-skill-center": "^0.2.1" }
247
273
  }
248
274
  ```
249
275
 
250
276
  包自带 `cordis.patch.yml`,**不需要**手改 loader:它会插入宿主半边(`id: skill-center`)与浏览器半边。
251
277
  侧栏那一行排在「插件」下方,因为客户端以 `order: 1` 注册 `sidebar.panellist`。
252
278
 
279
+ > [!IMPORTANT]
280
+ > patch 里那条 loader 行的 `name` **必须逐字等于包名**(`@restregular/dsh-skill-center`)。
281
+ > 宿主 `@deepseek-ai/dsh-client-modules` 是按这个行名去定位该行的 `package.json` 并**严格比对**
282
+ > `name` 的(`nearestPackage`)。写成裸名 `dsh-skill-center` 时:宿主半边照样挂得上,
283
+ > 但浏览器半边会被**静默丢弃** —— 侧栏没有「技能中心」、`/plugins/@restregular/dsh-skill-center/client.js`
284
+ > 返回 `404`,而且日志里一个字都没有。0.2.1 修的就是这个;0.2.0 发出去的是裸名。
285
+
253
286
  卸载:删掉上面两处清单项,重启即可。
254
287
 
288
+ ### 装完侧栏没出现?按顺序查这五步
289
+
290
+ 1. **宿主半边活着吗**:`http://127.0.0.1:19387/dsh-skill-center/api?op=ping` 应回 `{"ok":true,…}`。
291
+ 回 `404` 说明 loader 行压根没挂上 —— 包不在 profile 的 `dsh.profile.bundles` 里,或者没装进
292
+ profile 的 `node_modules`。
293
+ 2. **浏览器半边进模块图了吗**:`…/api?op=diagnose` 里的 `client.inGraph` 必须是 `true`。
294
+ 若 `host.mounted` 为 `true` 而它是 `false`,就是上面那个「行名 ≠ 包名」。
295
+ 3. **bundle 有没有被服务**:`http://127.0.0.1:19387/plugins/@restregular/dsh-skill-center/client.js`
296
+ 应返回 JavaScript 而不是 `404`。
297
+ 4. **跑离线合成自检**(不用重启宿主):`node verify-compose.mjs <profileDir>`,
298
+ 现在它会因为「行名解析不回本包」直接 FAIL。
299
+ 5. `pnpm add` 必须**在 profile 目录里**执行;装到别处(全局 `npm i -g`、别的目录)profile 合成不到。
300
+
255
301
  ### 它怎么接进 Harness
256
302
 
257
303
  **宿主半边**(`lib/index.js`)挂载一条**仅回环**的 HTTP 路由 `/dsh-skill-center/api`:
package/cordis.patch.yml CHANGED
@@ -1,7 +1,11 @@
1
1
  # dsh-skill-center bundle patch: inserts the host plugin (skill catalog API over
2
2
  # the loopback Web route /dsh-skill-center) and the client plugin (a 「技能中心」
3
3
  # row in the sidebar's global panel list plus its central page).
4
- # 纯 insert(id/name)可热挂载,免重启。
4
+ #
5
+ # `name` 必须逐字等于本包 package.json 的 name。宿主 @deepseek-ai/dsh-client-modules
6
+ # 是按 **loader 行名 = 包名** 去定位 package.json 的(nearestPackage 严格比对 name):
7
+ # 写成裸名 'dsh-skill-center' 时宿主半边照样挂得上,但客户端半边会被静默丢弃 ——
8
+ # `/plugins/<包名>/client.js` 404、侧栏不出「技能中心」,而且没有任何报错。
5
9
  - insert:
6
10
  - id: skill-center
7
- name: 'dsh-skill-center'
11
+ name: '@restregular/dsh-skill-center'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restregular/dsh-skill-center",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "技能中心 — DeepSeek Harness 技能管理面板:浏览当前会话可见的所有技能、查看正文、开关模型/用户调用、新建与删除。 · Skill Center for DeepSeek Harness: browse and manage the skills visible to the current session.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",