fix: load with dsh-settings >= 0.1.2 (SettingsProvider wiring, drop removed helpers) - #1
Open
Julyves wants to merge 2 commits into
Open
fix: load with dsh-settings >= 0.1.2 (SettingsProvider wiring, drop removed helpers)#1Julyves wants to merge 2 commits into
Julyves wants to merge 2 commits into
Conversation
Drop the named import of installSettingsSection/settingsNamespace from
@deepseek-ai/dsh-settings: the helpers were removed in dsh-settings
0.1.2-alpha.2, so the module no longer loads on harness cores built on
that line (the import itself threw at ESM instantiation).
Replicate the canonical optional-settings consumer wiring instead with the
public service API that exists on both the removed-helper and older cores:
ctx.inject(['settings'], ...) + settings.register(ns, Config, { base })
with the scope read as the live source and a fallback to the composed
entry when the service is absent or detached. Runtime behaviour is
unchanged: user edits override the bundle config, and each search reads a
fresh snapshot.
Version 0.1.1 ships the settings-service wiring fix.
Pin @deepseek-ai/dsh-{credentials,launch-environment,settings,web}
devDependencies to 0.1.2-rc.1: the caret prerelease ranges resolve to
the newest 0.1.3-alpha prereleases, whose sibling packages declare
stable-style internal ranges (e.g. @deepseek-ai/dsh-brand
>=0.1.2 <0.2.0-0) that cannot match any published prerelease, breaking
a fresh install. Pinning reproduces the harness core the fix targets and
makes local build/test deterministic.
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.
What & why
dsh (
@deepseek-ai/dsh) 0.1.2-rc.1 no longer boots any profile that bundles this plugin:@deepseek-ai/dsh-settingsremoved the free functionsinstallSettingsSection/settingsNamespacestarting in0.1.2-alpha.2(verified against publishedpackages: present in
0.1.1-rc.2, gone in0.1.2-alpha.2). Becausesrc/index.tsimported them by name, the plugin module itself throws at ESM instantiation and
the whole cordis include entry fails — boot is blocked, not just the settings UI.
Change
src/index.tsno longer imports the removed helpers. It now wires the sectionthrough the public settings service, replicating exactly what the removed
installSettingsSectionhelper did internally:ctx.inject(['settings'], ...)to attach while a settings service is mountedsettings.register(ns, Config, { base: config })with the composition entryas the
baselayerscope.get()becomes the live source; on service absence,disposal or reload the code falls back to the composed entry
current())No behavioural change: user edits still override the bundle config, and the
provider keeps working when no settings service is present.
Compatibility: these service APIs (
inject,register,scope.get/watch) existon every
dsh-settingsrelease the old helper depended on, so the plugin loads onboth the pre-
0.1.2harness cores and0.1.2-rc.1+.Version & dev deps
versionto0.1.1for a patch release of this fix.@deepseek-ai/dsh-{credentials,launch-environment,settings,web}devDependencies to
0.1.2-rc.1. The previous caret prerelease ranges resolveto
0.1.3-alphabuilds whose siblings declare stable-style ranges (e.g.@deepseek-ai/dsh-brand >=0.1.2 <0.2.0-0) that no published prereleasesatisfies, so a fresh
pnpm installfails outright. Pinning reproduces thecore this fix targets and makes local build/test deterministic.
Verification
pnpm build—tsctypecheck clean, tsdown bundle succeedspnpm test— 32/32 pass (settings-credentials,loader-composition,bocha)tsconfig.jsonextends../tsconfig.base.json, which is not shipped inthe repo; standalone builds need that sibling file (I created one locally to
verify — not part of this PR).
Release request: after merge, please
npm publishfrommainand tagv0.1.1(no CI/release automation exists in this repo).