@michengai/dsh-skills-manager 1.2.21 → 1.2.22

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
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.22 - 2026-10-29
4
+
5
+ - Fix 403 Forbidden Host on DSH 0.2.x with LAN IP and remote access (Issue #71):
6
+ - Completely remove legacy DSH 0.1.x `webRuntime` access, preventing Cordis Context Proxy errors from short-circuiting service fallback;
7
+ - Fully align with DSH 0.2.x `webStartup` service to properly inherit `--trusted-host` entries;
8
+ - Admit `--host` listener bind address authorities across arbitrary ports matching host fence semantics, resolving 403 errors when accessing via LAN IP;
9
+ - Extract authority host from `--public-url` when specified;
10
+ - Add `DSH_SKILLS_MANAGER_TRUSTED_HOSTS` environment variable fallback (comma-separated list of accepted authorities) for reverse proxy and custom domain deployments.
11
+
3
12
  ## 1.2.21 - 2026-10-28
4
13
 
5
14
  - Fix Windows transient directory rename locks: Reuse `renameWithRetry` across atomic skill copy, upload staging, skill creation, and repository updates to automatically retry on transient `EPERM`/`EBUSY` locks caused by background filesystem indexers or antivirus scanners, preventing spurious "Import failed" errors.
@@ -2,6 +2,15 @@
2
2
 
3
3
  [English](CHANGELOG.md)
4
4
 
5
+ ## 1.2.22 - 2026-10-29
6
+
7
+ - 修复 DSH 0.2.x 远程访问与局域网 IP 报 403 错误(Issue #71):
8
+ - 彻底清理已废弃的 0.1.x `webRuntime` 残留服务访问,消除 Cordis Context Proxy 在属性未声明 inject 时抛错中断回退链的问题;
9
+ - 全面适配 DSH 0.2.x 的 `webStartup` 启动服务,支持正常读取 `--trusted-host` 声明的 Host 名单;
10
+ - 适配 `--host` 绑定网卡地址(直连 IP 放行,任意端口匹配,对齐宿主行为),解决局域网直连形态下插件 API 报「禁止的请求来源(非法 Host)」的缺陷;
11
+ - 支持提取 `--public-url` 声明的 host authority;
12
+ - 新增 `DSH_SKILLS_MANAGER_TRUSTED_HOSTS` 环境变量,支持逗号分隔的 authority 白名单,为反向代理等复杂部署场景提供免发版放行通道。
13
+
5
14
  ## 1.2.21 - 2026-10-28
6
15
 
7
16
  - 修复 Windows 下技能导入与更新的瞬时文件锁冲突:在原子复制替换、解压暂存包装、新建技能及仓库更新回滚等路径中全面复用 `renameWithRetry` 重试机制,有效规避 Windows Defender 与系统索引器在瞬时扫描时导致的 `EPERM`/`EBUSY` 抛错,彻底消除界面偶发或高发的「导入失败」报错。
package/README.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  > DSH Skills Manager is a community-maintained DeepSeek Harness (DSH) plugin, not an official DeepSeek AI product.
21
21
 
22
- This README describes **1.2.21**. Released changes are in the [changelog](CHANGELOG.md).
22
+ This README describes **1.2.22**. Released changes are in the [changelog](CHANGELOG.md).
23
23
 
24
24
  ## Features
25
25
 
@@ -74,7 +74,7 @@ dsh plugin --profile web add @michengai/dsh-skills-manager@latest --registry=htt
74
74
 
75
75
  Restart DSH, refresh the page, and open **Settings → Skills**. To update, select **Check for updates** or run the installation command again.
76
76
 
77
- - Plugin `1.2.21` is tested with DeepSeek Harness `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-rc.1`, `0.2.1-rc.2`, `0.2.1-rc.3`.
77
+ - Plugin `1.2.22` is tested with DeepSeek Harness `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-rc.1`, `0.2.1-rc.2`, `0.2.1-rc.3`.
78
78
  - Host compatibility: Full DeepSeek Harness `0.2.x` line (`>=0.2.0-rc.1 <0.3.0-0`), forwards-compatible with subsequent `0.2.x` releases, alphas, and RCs without requiring routine plugin version bumps. Legacy versions and breaking changes in the `0.3.0` generation are rejected by the version gate. If you still use a `0.1.x` host, install plugin `1.1.23` instead of `@latest`.
79
79
  - **Reverse proxy deployment**: Supports hosting DSH behind prefix-stripping reverse proxies (e.g. `/app/dsh/`). API and update endpoints resolve against the page base URI (`document.baseURI`).
80
80
 
package/README.zh-CN.md CHANGED
@@ -19,7 +19,7 @@
19
19
 
20
20
  > DSH Skills Manager 是社区维护的 DeepSeek Harness(DSH)插件,并非 DeepSeek AI 官方产品。
21
21
 
22
- 本文描述 **1.2.21**。已发布变更见[更新日志](CHANGELOG.zh-CN.md)。
22
+ 本文描述 **1.2.22**。已发布变更见[更新日志](CHANGELOG.zh-CN.md)。
23
23
 
24
24
  ## 功能概览
25
25
 
@@ -74,7 +74,7 @@ dsh plugin --profile web add @michengai/dsh-skills-manager@latest --registry=htt
74
74
 
75
75
  安装后重启 DSH 并刷新页面,打开「设置 → 技能」即可使用。更新时可点击「检查更新」,或重新执行安装命令。
76
76
 
77
- - `1.2.21` 已验证兼容 DeepSeek Harness `0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-rc.1`、`0.2.1-rc.2`、`0.2.1-rc.3`。
77
+ - `1.2.22` 已验证兼容 DeepSeek Harness `0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-rc.1`、`0.2.1-rc.2`、`0.2.1-rc.3`。
78
78
  - 宿主支持范围:DeepSeek Harness `0.2.x` 全系列(`>=0.2.0-rc.1 <0.3.0-0`),自动支持后续日常小版本、alpha 与 RC,同代宿主升级无需重复等待发版。早期版本与 `0.3.0` 代际破坏性更新由版本门拦截。仍在使用 `0.1.x` 的,请安装插件 `1.1.23`,不要装 `@latest`。
79
79
  - **反向代理部署**:支持将 DSH 部署在带路径前缀的反向代理后面(如 `/app/dsh/`),插件 API 统一自动按页面基址(`document.baseURI`)相对解析。
80
80
 
package/lib/index.js CHANGED
@@ -300,16 +300,45 @@ function apply(ctx, config) {
300
300
  const log = makeLog();
301
301
  const repositories = createRepositoryManager({ log, registeredWorkspaces: () => registeredWorkspacePaths(ctx) });
302
302
  const getTrustedHosts = () => {
303
+ const hosts = [];
303
304
  try {
304
305
  const rawCtx = ctx;
305
306
  const root = rawCtx.root || rawCtx;
306
- const candidate = root.webRuntime || root.webStartup;
307
- if (candidate && typeof candidate === "object" && Array.isArray(candidate.trustedHosts)) {
308
- return candidate.trustedHosts;
307
+ let startup;
308
+ try {
309
+ startup = root.webStartup;
310
+ } catch {
311
+ }
312
+ if (startup && typeof startup === "object") {
313
+ if (Array.isArray(startup.trustedHosts)) {
314
+ for (const item of startup.trustedHosts) {
315
+ if (typeof item === "string" && item.trim()) hosts.push(item.trim());
316
+ }
317
+ }
318
+ if (typeof startup.host === "string" && startup.host.trim()) {
319
+ const rawHost = startup.host.trim();
320
+ const zoneAt = rawHost.indexOf("%");
321
+ const address = zoneAt === -1 ? rawHost : rawHost.slice(0, zoneAt);
322
+ const normalizedHost = address.includes(":") && !address.startsWith("[") ? `[${address}]` : address;
323
+ hosts.push(normalizedHost);
324
+ }
325
+ if (typeof startup.publicUrl === "string" && startup.publicUrl.trim()) {
326
+ try {
327
+ hosts.push(new URL(startup.publicUrl.trim()).host);
328
+ } catch {
329
+ }
330
+ }
309
331
  }
310
332
  } catch {
311
333
  }
312
- return [];
334
+ const envHosts = process.env.DSH_SKILLS_MANAGER_TRUSTED_HOSTS;
335
+ if (typeof envHosts === "string" && envHosts.trim()) {
336
+ for (const item of envHosts.split(",")) {
337
+ const trimmed = item.trim();
338
+ if (trimmed) hosts.push(trimmed);
339
+ }
340
+ }
341
+ return hosts;
313
342
  };
314
343
  const findUserRoot = (key) => userRoots().find((root) => root.key === key);
315
344
  const providerInvalidators = /* @__PURE__ */ new Set();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-skills-manager",
3
- "version": "1.2.21",
3
+ "version": "1.2.22",
4
4
  "description": "DSH Skills Manager — 在 DeepSeek Harness 中统一加载并安全管理本机 Agent Skills · Load and safely manage local Agent Skills in DSH",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "scripts": {
45
45
  "build": "node scripts/build.mjs",
46
- "test": "node scripts/check-committed-lib.mjs && npm run typecheck && npm run build && node test/build-test.mjs && node test/api-base.test.mjs && node test/route-lifecycle.test.mjs && node test/repositories.test.mjs && node test/repository-install-targets.test.mjs && node test/workspace-target.test.mjs && node test/workspace-routes.test.mjs && node test/workspace-list.test.mjs && node test/destination-picker.test.mjs && node test/workspace-project-page.test.mjs && node test/repository-ui.test.mjs && node test/catalog-skill.test.mjs && node test/skills-sh-catalog.test.mjs && node test/clawhub-catalog.test.mjs && node --test test/catalog-state.test.mjs test/catalog-lifecycle.test.mjs && node test/theme-select.test.mjs && node --test test/antd-theme.browser.test.mjs && node test/host-fallback.test.mjs && node test/repository-routes.test.mjs && node test/core-test.mjs && node test/root-path.test.mjs && node test/custom-sources.test.mjs && node test/disabled-external-native.test.mjs && node test/categories.test.mjs && node test/categories-ui.test.mjs && node --experimental-strip-types --test test/settings-nav-icon.test.mjs && node test/readonly-discovery.test.mjs && node test/project-root-skills.test.mjs && node test/project-sources.test.mjs && node test/locale-test.mjs && node --test test/plugin-updater.test.mjs && node test/plugin-update-locale.test.mjs && node test/client-scope.test.mjs && node test/compatibility-options-test.mjs && node test/sidebar-entry.test.mjs && node --test test/sidebar-entry-lifecycle.test.mjs test/plugin-update-visibility.test.mjs && node test/online-update.test.mjs",
46
+ "test": "node scripts/check-committed-lib.mjs && npm run typecheck && npm run build && node test/build-test.mjs && node test/api-base.test.mjs && node test/route-lifecycle.test.mjs && node test/repositories.test.mjs && node test/repository-install-targets.test.mjs && node test/workspace-target.test.mjs && node test/workspace-routes.test.mjs && node test/workspace-list.test.mjs && node test/destination-picker.test.mjs && node test/workspace-project-page.test.mjs && node test/repository-ui.test.mjs && node test/catalog-skill.test.mjs && node test/skills-sh-catalog.test.mjs && node test/clawhub-catalog.test.mjs && node --test test/catalog-state.test.mjs test/catalog-lifecycle.test.mjs && node test/theme-select.test.mjs && node --test test/antd-theme.browser.test.mjs && node test/host-fallback.test.mjs && node test/host-fence.test.mjs && node test/repository-routes.test.mjs && node test/core-test.mjs && node test/root-path.test.mjs && node test/custom-sources.test.mjs && node test/disabled-external-native.test.mjs && node test/categories.test.mjs && node test/categories-ui.test.mjs && node --experimental-strip-types --test test/settings-nav-icon.test.mjs && node test/readonly-discovery.test.mjs && node test/project-root-skills.test.mjs && node test/project-sources.test.mjs && node test/locale-test.mjs && node --test test/plugin-updater.test.mjs && node test/plugin-update-locale.test.mjs && node test/client-scope.test.mjs && node test/compatibility-options-test.mjs && node test/sidebar-entry.test.mjs && node --test test/sidebar-entry-lifecycle.test.mjs test/plugin-update-visibility.test.mjs && node test/online-update.test.mjs",
47
47
  "verify": "node scripts/sync-hosts.mjs && npm test && npm run pack:check && node test/pack-test.mjs",
48
48
  "pack:check": "npm pack --dry-run --json",
49
49
  "prepack": "npm run typecheck && npm run build",