fix(host): DSH 0.1.7-rc.2 compatibility (wireStream arity, v4 producer-owned source, agent/created lifecycle) - #103
Merged
Conversation
DSH 0.1.7 moved the stream abort signal from the third to the fifth argument of gateway.wireStream.open (adding an uplink and a peer before it). Detect the new signature by arity (open.length >= 5) and route all four call sites through a compatibility layer, fixing "failed to import" under 0.1.7-rc.2. Fixes omdsh-dev#102.
The v4 session format rejects the retired kind:'plugin' wrapper with "format v4 message requires a producer-owned source kind", which broke sessions prompted through the extension (injected browser snapshots failed to persist). Use the canonical v3->v4 migration mapping (plugin:@yuxianglin/dsh-bridge-browser) and declare the kind on dsh-llm's merge-extensible MessageSourceMap so typechecking stays sound.
Align peerDependencies and devDependencies with DSH 0.1.7-rc.2 so the 0.1.7 compatibility fixes typecheck against the current harness.
DSH 0.1.7 dropped the agent/session-start event (replaced by agent/created as the startup-driving extension point). The old binding silently disabled snapshot injection for deferred sessions; rebind so followed-page context still flushes at materialization.
Re-resolve the dsh dependency tree after the dev dependency bump so pnpm install reproduces the same 0.1.7-rc.2 versions in CI.
emp0000-1
force-pushed
the
feat/dsh-017-compat
branch
from
September 26, 2026 18:44
12b4ee1 to
7bf1579
Compare
Member
|
@codex review this |
Member
|
@emp0000-1 thanks for making this update! |
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.
Three DSH 0.1.7-rc.2 compatibility fixes for
@yuxianglin/dsh-bridge-browser, all verified locally (typecheck clean, 141/141 tests pass) and against a live 0.1.7-rc.2 instance.wireStream.openarity change (fixes 0.1.7 兼容性:wireStream.open 由 3 参变 5 参导致 signal 落位错误,hello.ok 后立即 stream-failed、扩展无限重连 #102) — DSH 0.1.7 moved the abort signal from the 3rd to the 5th argument (adding an uplink and a peer before it). Detect the new signature withopen.length >= 5and route all four call sites through a compatibility layer. Without this, the plugin fails to import under 0.1.7-rc.2.v4 producer-owned source kind — DSH 0.1.7's v4 session format rejects the retired
kind: 'plugin'wrapper (format v4 message requires a producer-owned source kind). Injected browser snapshots used that wrapper, which broke every session prompted through the extension (the injected message failed to persist). Emit the canonical migrated kindplugin:@yuxianglin/dsh-bridge-browserand declare it on dsh-llm's merge-extensibleMessageSourceMapso typechecking stays sound.injectLatestSnapshotstill recognizes legacykind: 'plugin'messages.agent/session-start→agent/created— DSH 0.1.7 dropped theagent/session-startevent; the old binding silently disabled snapshot injection for deferred sessions. Rebind toagent/createdso followed-page context still flushes at materialization.Deps: peer and dev dependencies bumped from
0.1.5-rc.2to0.1.7-rc.2.Verification: local
pnpm run typecheck+pnpm run test(141/141) green; on a live 0.1.7-rc.2 instance the extension reconnects, sessions prompt without the v4 error, and injected snapshots persist withsource.kind = plugin:@yuxianglin/dsh-bridge-browser.