Repository navigation
fix: 适配 DSH 0.1.2+(客户端运行时包已下线、settings.section 注册时序) - #2
Open
Romantoscalion wants to merge 1 commit into
Open
Romantoscalion wants to merge 1 commit into
Romantoscalion wants to merge 1 commit into
Conversation
Two drifts against current DeepSeek Harness (0.1.5-rc.x), both fatal to the
web GUI in different ways:
1. The bundle required '@deepseek-ai/dsh-client-runtime/client' as a
dependency sanity check. That package is a 0.1.1-rc.2-and-earlier client
runtime; DSH dropped it in 0.1.2-rc.1, so the require threw
"client-modules: require(...) missed the module table". A throwing client
bundle does not degrade that one plugin — it fails the whole plugin tree
boot, and the GUI renders nothing but "Failed to load plugins". The
require's value was never used, so it is gone, along with the stale
dsh.client.inject entry naming the same package (an inject edge to a
package that ships no row is dead weight).
2. The settings page never appeared: 'settings.section' is declared by the
settings entry, which applies after this plugin, so the direct
slots.register() threw `slot "settings.section" is not declared (a parent
entry's children table must declare it)`. Registration now goes through
ctx.slots.inject('settings.section', ...) — the same call
dsh-plugin-wallpaper-engine makes on this DSH version — falling back to
immediate registration when the host has no slots.inject.
Bundle 1.0.7 -> 1.0.8.
Tests: fake require no longer resolves the dropped package, and
card.test.cjs covers the deferred path (asserting nothing registers before
the declaration lands, and that _declare('settings.section') records the
section) plus the immediate fallback path.
Verified on DSH 0.1.5-rc.1: GUI boots, console shows "[dsh-agent-notify]
bundle v1.0.8 loaded" with no slot error, and Settings shows the 任务提示
nav entry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
在 DSH 0.1.5-rc.x 上装上本插件后,WebUI 整页只剩一个报错页
根因一:require('@deepseek-ai/dsh-client-runtime/client') 依赖的包官方已下线 —— dsh-web-app@0.1.1-rc.2
还有,0.1.2-rc.1/0.1.5-rc.2 已移除;npm 上停在 0.0.1-rc.1 是死包;当前平台 seed 表里也没有它。这个 require
会让整棵插件树 boot 失败,不是本插件单独不显示。
根因二:settings.section 由 settings entry 的 children 表声明、比插件更晚 apply,直接 register() 必抛错,改走
ctx.slots.inject(...)(wallpaper-engine 在同版本的写法)。
附改动表、验证结果(0.1.5-rc.1 实跑 + npm test 40/21 全过)、以及「未动 package.json version」的说明。