dsh-miloco-bridge 0.1.3 → 0.1.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
@@ -48,7 +48,7 @@ dsh plugin --profile web add github:exa160/dsh-miloco-bridge
48
48
 
49
49
  ```bash
50
50
  # 发布包
51
- dsh plugin --profile web add file:dist/dsh-miloco-bridge-0.1.3.tgz
51
+ dsh plugin --profile web add file:dist/dsh-miloco-bridge-0.1.4.tgz
52
52
 
53
53
  # 本地开发(link)
54
54
  ./install.sh --profile web
package/docs/INSTALL.md CHANGED
@@ -33,14 +33,14 @@ npm 新包可能处于审核期;若 `dsh plugin add dsh-miloco-bridge` 暂时
33
33
 
34
34
  ```bash
35
35
  npm run pack:bundle
36
- # dist/dsh-miloco-bridge-0.1.3.tgz
37
- dsh plugin --profile web add "file:/path/to/dist/dsh-miloco-bridge-0.1.3.tgz"
36
+ # dist/dsh-miloco-bridge-0.1.4.tgz
37
+ dsh plugin --profile web add "file:/path/to/dist/dsh-miloco-bridge-0.1.4.tgz"
38
38
  ```
39
39
 
40
40
  或:
41
41
 
42
42
  ```bash
43
- ./install.sh --profile web --bundle dist/dsh-miloco-bridge-0.1.3.tgz
43
+ ./install.sh --profile web --bundle dist/dsh-miloco-bridge-0.1.4.tgz
44
44
  ```
45
45
 
46
46
  ### 1.3 手动配置
@@ -273,7 +273,7 @@ systemctl --user restart dsh-web.service
273
273
 
274
274
  ```bash
275
275
  npm run pack:bundle
276
- dsh plugin --profile web add "file:dist/dsh-miloco-bridge-0.1.3.tgz"
276
+ dsh plugin --profile web add "file:dist/dsh-miloco-bridge-0.1.4.tgz"
277
277
  systemctl --user restart dsh-web.service
278
278
  ```
279
279
 
@@ -220,7 +220,7 @@ dsh-miloco-bridge: push delivery failed ... # 仅在失败时
220
220
 
221
221
  ```bash
222
222
  npm run pack:bundle
223
- tar -tzf dist/dsh-miloco-bridge-0.1.3.tgz | head -30
223
+ tar -tzf dist/dsh-miloco-bridge-0.1.4.tgz | head -30
224
224
  ```
225
225
 
226
226
  预期包含:`package/lib/*`、`package/skills/*/SKILL.md`、`package/adapter/dsh_adapter.py`、
@@ -230,7 +230,7 @@ tar -tzf dist/dsh-miloco-bridge-0.1.3.tgz | head -30
230
230
 
231
231
  ```bash
232
232
  DSH_HOME=/tmp/dsh-miloco-bundle-verify \
233
- dsh plugin --profile web add "file:$PWD/dist/dsh-miloco-bridge-0.1.3.tgz"
233
+ dsh plugin --profile web add "file:$PWD/dist/dsh-miloco-bridge-0.1.4.tgz"
234
234
  ```
235
235
 
236
236
  ---
package/lib/skills.js CHANGED
@@ -69,8 +69,9 @@ export async function registerSkills(ctx, logger) {
69
69
 
70
70
  for (const directory of entries.sort()) {
71
71
  let text
72
+ const skillFile = join(SKILLS_DIR, directory, 'SKILL.md')
72
73
  try {
73
- text = await readFile(join(SKILLS_DIR, directory, 'SKILL.md'), 'utf8')
74
+ text = await readFile(skillFile, 'utf8')
74
75
  } catch {
75
76
  logger?.warn?.(`dsh-miloco-bridge: 技能 ${directory} 缺少 SKILL.md,已跳过`)
76
77
  continue
@@ -87,6 +88,13 @@ export async function registerSkills(ctx, logger) {
87
88
  name,
88
89
  description,
89
90
  content: body,
91
+ // DSH requires a string `source` on every loaded skill definition;
92
+ // runtime registrations without one fail with
93
+ // `loaded skill "<name>" source must be a string`.
94
+ // `source` is prompt-visible metadata, so use a stable label instead
95
+ // of the absolute file path (which `path` already carries for the UI).
96
+ source: 'dsh-miloco-bridge',
97
+ path: skillFile,
90
98
  ...(data.whenToUse ? { whenToUse: data.whenToUse } : {}),
91
99
  }))
92
100
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-miloco-bridge",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Unofficial DSH bridge for Xiaomi Miloco: an isolated Agent preset for Miloco tools, native tools/skills, Web settings, perception-priority filtering, and Miloco -> DSH push.",
5
5
  "keywords": [
6
6
  "dsh",