dsh-ronge-adaptive-skill-archive 3.0.0 → 3.0.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
@@ -181,6 +181,12 @@ GitHub 公开、可检索的 `SKILL.md` 元数据快照(2026-10-28):**6,39
181
181
  | **GitHub tag** | `plugin_manager install_bundle target=git+https://github.com/bugtakue/dsh-ronge-adaptive-skill-archive.git#v3.0.0` | 不用 npm、固定版本、可审源码 |
182
182
  | **本地目录** | `plugin_manager install_bundle target="/absolute/path/to/dsh-ronge-adaptive-skill-archive"` | 开发、改代码、离线 |
183
183
 
184
+ ### DSH 兼容性(已测 0.2.1-rc.3)
185
+
186
+ - 当前 bundle 在 **DeepSeek Harness Desktop 0.2.1-rc.3** 上验证:Host 路由、Client slot(技能按钮 + 右侧抽屉)、locale 元数据、图标、npm 安装与数据迁移均通过。
187
+ - **替换已安装包后需重启 DSH** 才会加载新的 Host 模块;浏览器刷新加载 Client。
188
+ - 兼容性检查:`npm run check:dsh`;完整说明见 [docs/dsh-compatibility.md](docs/dsh-compatibility.md)。
189
+
184
190
  ### 升级(旧包名 → v3.0.0)
185
191
 
186
192
  - **v3.0.0 是 breaking rename**:包名、路由、bundle id、数据目录都改为 `dsh-ronge-adaptive-skill-archive`;显示名不变。
@@ -0,0 +1,52 @@
1
+ # DSH 兼容性与安装边界
2
+
3
+ 测试对象:**DeepSeek Harness Desktop 0.2.1-rc.3**(Web GUI,macOS)。
4
+ 测试日期:2026-10-29。插件版本:`dsh-ronge-adaptive-skill-archive` 3.0.1。
5
+
6
+ ## 安装方式
7
+
8
+ ```bash
9
+ # npm(推荐)
10
+ plugin_manager install_bundle target=dsh-ronge-adaptive-skill-archive@3.0.1
11
+
12
+ # GitHub tag(固定版本、可审源码)
13
+ plugin_manager install_bundle target=git+https://github.com/bugtakue/dsh-ronge-adaptive-skill-archive.git#v3.0.1
14
+
15
+ # 本地目录(开发)
16
+ plugin_manager install_bundle target=/absolute/path/to/dsh-ronge-adaptive-skill-archive
17
+ ```
18
+
19
+ 替换已安装包后,DSH 需要 **restart(重启)** 才会加载新的 Host JavaScript 模块;浏览器端 Client 插件刷新页面即可。仅新装一个尚未启用的 bundle 通常可以通过 HMR 生效,但不要用 slot 未变化来推断新代码已加载。
20
+
21
+ ## 它注册了什么
22
+
23
+ - Host:`ctx.webServer.register` 下的 `/dsh-ronge-adaptive-skill-archive/*` 路由;`ctx.systemPrompt.section` 注入推荐路由段;`ctx.skills` 读取已安装技能;session 事件用于「正在使用」和完成提示音。
24
+ - Client:`conversation.session.header.utilities` 里的「技能」按钮(id = 包名);`shell.overlay` 里的右侧抽屉(id = 包名 + `-drawer`)。两者都通过 `ctx.slots.inject` 注册,live Slot 检查显示 active。
25
+ - 显示元数据:`locale/en.json` 与 `locale/zh.json` 的 `meta.title` / `meta.description`,`icon.svg`(631 B,< 256 KiB)通过 `exports["./icon"]` 暴露。
26
+ - 不导出 Host `Config` schema:所有设置都在面板内,DSH 设置页不会出现 Config 分区;这是有意为之,不是加载失败。
27
+
28
+ ## 数据目录与迁移
29
+
30
+ - 当前:`~/.dsh/dsh-ronge-adaptive-skill-archive/`
31
+ - 自动合并:`~/.dsh/skill-studio/`、`~/.dsh/ronge-adaptive-skill-archive/`
32
+ - 旧目录**不删除**;新目录已存在时,按数据丰富度合并 `experience.json`、`evolution.json`、`rec-feedback.json`、`skills-lock.json` 等,旧值不会覆盖更丰富的新值。
33
+ - 卸载 bundle 不删除数据目录;重新安装后经验/权重/更新记录仍在。
34
+
35
+ ## 网络与代理
36
+
37
+ 安装/预览/更新远端 `SKILL.md` 时,Host 里 Node 的 `fetch` 在系统代理下可能不可用;实现会读取 `HTTPS_PROXY` / `HTTP_PROXY`,在 macOS 上回退到 `scutil --proxy`,并优先用系统 `curl` 经代理抓取,最后才尝试直连。只允许 `raw.githubusercontent.com/**/SKILL.md`,上限 256 KiB,先扫描后落盘。
38
+
39
+ ## 已验证
40
+
41
+ - `npm test`:55/55(含 DSH 兼容性静态检查)
42
+ - Host E2E:17/17(真实 loopback HTTP + raw.githubusercontent.com)
43
+ - UI E2E:20/20
44
+ - `npm run check:dsh`:manifest / factory id / slots / routes / 数据迁移 / market index 全部通过
45
+ - npm registry 安装 v3.0.0 成功;市场索引 format 1 托管在 `https://bugtakue.github.io/dsh-ronge-adaptive-skill-archive/plugin-market.json`
46
+
47
+ ## 已知边界
48
+
49
+ - 右侧抽屉是自定义 overlay,不是 DSH 原生 rightbar;DSH 大改布局时可能影响位置,需重跑 UI E2E。
50
+ - 没有 Host Config schema;DSH 设置页无法直接改插件配置。
51
+ - 推荐/检索仍是本地启发式(哈希向量 + 词表 + 信号分),不是神经模型。
52
+ - 安全扫描是正则启发式;安装/更新高风险默认拒绝,但不等同于安全保证。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ronge-adaptive-skill-archive",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "荣哥技能卷轴收藏馆 / Ronge's Adaptive Skill Cockpit: a context-aware, self-evolving skill cockpit for DeepSeek Harness — recommendations with reasons, 10% exploration quota, category/skill affinity learning, live usage, plan/immersive modes, experience memory, pre-install safety scan, update diff/rollback and a 6,399-skill public index.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -45,7 +45,8 @@
45
45
  "docs/cross-agent.md",
46
46
  "docs/eval.md",
47
47
  "library/repo-metadata.json",
48
- "test/fixtures/discover-cases.json"
48
+ "test/fixtures/discover-cases.json",
49
+ "docs/dsh-compatibility.md"
49
50
  ],
50
51
  "scripts": {
51
52
  "check": "node scripts/check.mjs",
@@ -54,7 +55,8 @@
54
55
  "build:market-index": "node scripts/build-market-index.mjs",
55
56
  "start": "node scripts/cli.mjs",
56
57
  "eval:real": "node scripts/eval-real.mjs",
57
- "eval:discover": "node scripts/eval-discover.mjs"
58
+ "eval:discover": "node scripts/eval-discover.mjs",
59
+ "check:dsh": "node scripts/dsh-compat-check.mjs"
58
60
  },
59
61
  "dsh": {
60
62
  "bundle": {
@@ -0,0 +1,74 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Static DSH ecosystem compatibility check. Verifies the bundle manifest,
4
+ * display metadata, client factory/slots, route namespace, data-dir migration
5
+ * and the hosted market-index entry, without booting a Harness.
6
+ *
7
+ * Tested against DSH Desktop 0.2.1-rc.3.
8
+ */
9
+ import fs from 'node:fs'
10
+ import path from 'node:path'
11
+ import { fileURLToPath } from 'node:url'
12
+
13
+ const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
14
+ const pkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf8'))
15
+ const patch = fs.readFileSync(path.join(ROOT, 'cordis.patch.yml'), 'utf8')
16
+ const client = fs.readFileSync(path.join(ROOT, 'client.js'), 'utf8')
17
+ const index = fs.readFileSync(path.join(ROOT, 'index.js'), 'utf8')
18
+ const failures = []
19
+ const check = (ok, message) => { if (!ok) failures.push(message) }
20
+
21
+ check(pkg.name === 'dsh-ronge-adaptive-skill-archive', 'unexpected package name')
22
+ check(pkg.dsh?.bundle?.patch === './cordis.patch.yml', 'dsh.bundle.patch missing')
23
+ check(pkg.dsh?.client?.platform === 'web', 'dsh.client.platform must be web')
24
+ check(pkg.dsh?.client?.inject?.includes('@deepseek-ai/dsh-client-ui-conversation'), 'client must inject ui-conversation')
25
+ for (const subpath of ['.', './client', './icon', './locale/*.json']) {
26
+ check(Boolean(pkg.exports?.[subpath]), 'missing export ' + subpath)
27
+ }
28
+ check(patch.includes('id: ' + pkg.name), 'patch row id must equal package name')
29
+ check(patch.includes("name: '" + pkg.name + "'"), 'patch row name must equal package name')
30
+
31
+ for (const locale of ['en', 'zh']) {
32
+ const dict = JSON.parse(fs.readFileSync(path.join(ROOT, 'locale', locale + '.json'), 'utf8'))
33
+ check(typeof dict.meta?.title === 'string' && dict.meta.title.trim(), locale + '.meta.title missing')
34
+ check(typeof dict.meta?.description === 'string' && dict.meta.description.trim(), locale + '.meta.description missing')
35
+ }
36
+ const icon = fs.readFileSync(path.join(ROOT, 'icon.svg'))
37
+ check(icon.length < 256 * 1024, 'icon must be under 256 KiB')
38
+ check(String(icon).trim().startsWith('<svg'), 'icon.svg is not SVG')
39
+
40
+ const factoryId = /id:\s*'([^']+)'/.exec(client)?.[1]
41
+ check(factoryId === pkg.name, 'client factory id must equal package name')
42
+ for (const slot of ['conversation.session.header.utilities', 'shell.overlay']) {
43
+ check(client.includes("ctx.slots.inject('" + slot + "'"), 'missing slot injection ' + slot)
44
+ }
45
+ check(client.includes("id: '" + pkg.name + "'"), 'client button slot id must equal package name')
46
+
47
+ const legacy = '/ronge-adaptive-skill-archive'
48
+ const routeMatches = [...index.matchAll(/path:\s*'(\/[^']+)'/g)].map((match) => match[1])
49
+ for (const route of routeMatches) {
50
+ check(route === '/' + pkg.name || route.startsWith('/' + pkg.name + '/'), 'route outside package namespace: ' + route)
51
+ check(!route.includes(legacy), 'legacy route still registered: ' + route)
52
+ }
53
+ check(index.includes("STUDIO_DIR_NAME = '" + pkg.name + "'"), 'data dir must be the package name')
54
+ check(index.includes("'ronge-adaptive-skill-archive'") && index.includes("'skill-studio'"), 'legacy data dir migration missing')
55
+
56
+ const market = JSON.parse(fs.readFileSync(path.join(ROOT, 'docs', 'plugin-market.json'), 'utf8'))
57
+ const listed = market.plugins?.find((plugin) => plugin.name === pkg.name)
58
+ check(Boolean(listed), 'market index does not list this plugin')
59
+ if (listed) {
60
+ check(listed.versions?.some((version) => version.version === pkg.version), 'market index version does not match package')
61
+ check(listed.versions?.[0]?.source?.type === 'npm', 'market version source must be npm')
62
+ const target = listed.versions?.[0]?.install?.[0]?.target
63
+ if (target) check(target === pkg.name + '@' + pkg.version, 'market install target mismatch: ' + target)
64
+ }
65
+ for (const file of ['index.js', 'client.js', 'cordis.patch.yml', 'icon.svg', 'locale/en.json', 'locale/zh.json', 'mcp/server.mjs']) {
66
+ check(Array.isArray(pkg.files) && pkg.files.some((pattern) => pattern === file || pattern.startsWith(file.split('/')[0] + '/')), 'files[] does not cover ' + file)
67
+ }
68
+
69
+ if (failures.length) {
70
+ console.error('DSH compatibility check failed:')
71
+ for (const failure of failures) console.error(' - ' + failure)
72
+ process.exit(1)
73
+ }
74
+ console.log('ok: DSH compatibility (' + pkg.name + '@' + pkg.version + ', manifest/slots/routes/migration/market)')