Repository navigation
fix(host): adapt to DSH 0.2.1-alpha.5 — webStartup rename, invariants removal, peer floor - #973
Closed
HuanLinOTO wants to merge 1 commit into
Closed
HuanLinOTO wants to merge 1 commit into
HuanLinOTO wants to merge 1 commit into
Conversation
…removal, peer floor) DSH 0.2.1 (0.2.0-rc.2 -> 0.2.1-alpha.5 corridor, see the upstream upgrade-guide series at docs/upgrade-guide/ on the dsh-v0.2.1-alpha.5 tag) removed the webRuntime service and the runtime-invariants system wholesale, and widened TerminalBlockLabels. On a 0.2.1 host the plugin's row stayed PENDING forever (the injected webRuntime service never appears) and every /sidebar route answered 405 — the sidebar vanished. Adaptation, verified against a locally built 0.2.1-alpha.5 source tree: - webRuntime -> webStartup (J1-03): rename the injected service and the per-request trust-fence read; the trustedHosts field is unchanged. This is the same fix as omdsh-dev#932/omdsh-dev#943/omdsh-dev#970/omdsh-dev#971 but lands it on main together with the rest of the corridor instead of the fence alone. - invariants removal (J1-02): delete src/invariant.ts, the ./invariant export, the lib/invariant.js file entry, the tsdown entry, the @deepseek-ai/dsh-invariants peer/devDep and the ctx.invariants mirror. tests/sidechat-compaction-seed.spec.ts restates the removed session relational rules locally (turn/step counters, tool call/result pairing, contiguous seqs); the real Session.create seed validation and the foldSurface oracle are unchanged and still exercised. - TerminalBlockLabels.commandLine (J1-09): required per-line accessible name for overflowing command lines; added in terminalBlockLabels() and the SideChatView RowLabels, with a sideChatBlockCommandLine entry in all 20 dictionaries (zh copy mirrors the host's own wording). - SideChat save-as-session: navigate through uiWorkspace.openSession (client ISessions.open is gone in 0.2.1); the old member stays as the pre-0.2.1 fallback. - peers ^0.2.0-rc.2 -> ^0.2.1-alpha.5, vendored cordis ~4.0.5-alpha.2, schemastery ~3.18.5-alpha.2, devDeps re-pinned, engines.dsh floor raised, lockfile regenerated (lockfile-only). The alpha.5 client tarballs additionally bare-import zod/picomatch — promoted into devDependencies per the repo's own dev-tree convention. - CI mount lane pins @deepseek-ai/dsh@0.2.1-alpha.5; the user-facing npx fallback in scripts/install.sh moves off its stale 0.1.7-alpha.1 pin; README/README_ZH badges + support lines and the AGENTS baseline notes follow the repo's release-commit doc set. - market-manifest's peer-shape guard now pins the 0.2.1 tuple; plugin-meta's tarball listing parser strips the trailing CR Windows bsdtar emits. Verification: tsc --noEmit clean; vitest 2642 passed / 3 failed — all three are local-environment artifacts, not regressions (smoke.spec's git log --all picks this working copy's stash head; e2e-aggregate-auth needs a POSIX bash; git-worktree's rename case exceeds 30s only under the full parallel pool and passes in isolation). Built lib/ rescanned: no webRuntime / invariants residue outside migration comments.
Collaborator
Author
|
Closing in favor of #979 (supersedes this PR). Upstream |
Collaborator
Author
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.
Adapts the plugin to the DSH
0.2.0-rc.2 → 0.2.1-alpha.5corridor (upstream compare, upgrade-guide series underdocs/upgrade-guide/at the tag). On a 0.2.1 host the plugin's row stayed PENDING forever — the injectedwebRuntimeservice never appears — and every/sidebar/*route answered 405, so the whole sidebar vanished. This PR moves the support line to0.2.1-alpha.5+without a runtime compatibility layer, per the repo's established policy.Changes
webRuntime→webStartup(root cause of the vanishing sidebar)src/index.ts:injectrenameswebRuntime→webStartup; the trust fence readsctx.webStartup.trustedHostsper request (field name unchanged — it now comes from repeatable--trusted-hostflags).src/context-types.ts:SidebarWebRuntime→SidebarWebStartup, member renamed; all 11 test stubs follow.Runtime-invariants system removed wholesale upstream
src/invariant.ts, the./invariantexport subpath,lib/invariant.jsfromfiles, the tsdown entry, the@deepseek-ai/dsh-invariantspeer + devDep, and thectx.invariantsstructural mirror.tests/sidechat-compaction-seed.spec.ts: the@deepseek-ai/dsh-session/invariantoracle (subpath deleted upstream) is restated as a local relational checker (turn/step counters, tool call/result pairing, contiguous seqs). The real oracles that survive —Session.create's seed validation and thefoldSurfacesurface-equivalence fold — are unchanged.TerminalBlockLabels.commandLine(new required member)terminalBlockLabels()helper + the inlineRowLabelsinSideChatView; newsideChatBlockCommandLinedictionary key in all 20 locales (zh copy mirrors the host's own命令第 {n} 行wording).Client navigation drift
uiWorkspace.openSession(clientISessions.openis gone in 0.2.1 — navigation moved to view owners); the old member remains as the pre-0.2.1 fallback, matching the patternSubagentViewalready uses.Manifest / CI / docs
^0.2.0-rc.2→^0.2.1-alpha.5; vendored@deepseek-ai/cordis~4.0.5-alpha.2;@deepseek-ai/schemastery(dependency)~3.18.5-alpha.2; devDeps re-pinned to0.2.1-alpha.5;engines.dsh→>=0.2.1-alpha.5; lockfile regenerated (lockfile-only run).zod/picomatch— promoted into devDependencies (same convention as the earlieranser/shiki/katexpromotions).@deepseek-ai/dsh@0.2.1-alpha.5;scripts/install.sh's user-facing npx fallback moves off its stale0.1.7-alpha.1pin; README badges + version-pick tables, the external-plugin guide's support line, and the AGENTS baseline notes follow the release-commit doc set.market-manifest's peer-shape guard pins the0.2.1tuple;plugin-meta's tarball listing parser strips the trailing CR Windowsbsdtaremits.Left to the maintainer's release commit (per the repo's
chore(release)convention, cf. a0cfd30): version bump + CHANGELOG entry.Verification
Against a locally built
0.2.1-alpha.5dsh source tree (all@deepseek-ai/*resolutions probed at0.2.1-alpha.5, vendored peers at4.0.5-alpha.2/3.18.5-alpha.2/1.8.6-alpha.2):tsc --noEmit— clean (coverssrc+tests).vitest run— 2642 passed / 5 skipped / 3 failed; all three failures are local-environment artifacts, not regressions:smoke.spec.ts"renders commit diffs": this working copy's git stash head winsgit log --all --topo-order, and a stash WIP commit has no first-parent diff (clean checkout: passes);e2e-aggregate-auth.spec.ts: needs a POSIX bash (Windows WSL shim + CRLF scripts);git-worktree.spec.tsrename-budget case: exceeds the 30 s default only under the full parallel pool — passes in isolation (8/8).lib/rescanned post-build: zerowebRuntime/invariants/ removed-symbol residue outside migration comments;lib/invariant.jsgone.Host-surface audit (stand-ins hand-diffed)
Because this plugin mirrors host services structurally (typecheck cannot catch drift there), every mirrored face was diffed by hand against the alpha.5 tree:
webServer.register/registerUpgrade, hostsessions.get/snapshotEvents,AgentRegistry.create/resume(meta.isSeeded+inheritedEventCountintact — sidechat seeding unaffected),SubagentRuntime.listDescendants,sessionTitle.rename,sessionPersistence.open/stat/read/close,SettingsForms.describe/update/configure,BlockAssembler/createUserMessage/ReasoningEffortId, clientsessions.list/subagentAddress/fork/binding/scope/refreshProjections,sidebarRight.openTab/openResource/closeIn,slots,sidebarRightTabs,uiWorkspace.openSession— all present with compatible signatures. J1-05's delegation rework does not touch this plugin (it never calledstart/startContinuable/settleRun).@huanlin/dsh-plugin-better-localestays an optional peer — the integration is a guarded structuralctx.get('betterLocale')read with no value import, so the declaration is honest even with that plugin uninstalled.Supersedes the fence-only variants of #905/#932/#943/#970/#971 for main (those branches may still carry useful extra hardening worth merging independently).