Skip to content

fix(host): DSH 0.1.7-rc.2 compatibility (wireStream arity, v4 producer-owned source, agent/created lifecycle) - #103

Merged
Lum1104 merged 7 commits into
omdsh-dev:mainfrom
emp0000-1:feat/dsh-017-compat
Sep 29, 2026
Merged

Lum1104 merged 7 commits into
omdsh-dev:mainfrom
emp0000-1:feat/dsh-017-compat

Conversation

@emp0000-1

Copy link
Copy Markdown
Contributor

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.

  1. wireStream.open arity 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 with open.length >= 5 and route all four call sites through a compatibility layer. Without this, the plugin fails to import under 0.1.7-rc.2.

  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 kind plugin:@yuxianglin/dsh-bridge-browser and declare it on dsh-llm's merge-extensible MessageSourceMap so typechecking stays sound. injectLatestSnapshot still recognizes legacy kind: 'plugin' messages.

  3. agent/session-start → agent/created — DSH 0.1.7 dropped the agent/session-start event; the old binding silently disabled snapshot injection for deferred sessions. Rebind to agent/created so followed-page context still flushes at materialization.

Deps: peer and dev dependencies bumped from 0.1.5-rc.2 to 0.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 with source.kind = plugin:@yuxianglin/dsh-bridge-browser.

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.
@Lum1104

Lum1104 commented Sep 29, 2026

Copy link
Copy Markdown
Member

@codex review this

@Lum1104

Lum1104 commented Sep 29, 2026

Copy link
Copy Markdown
Member

@emp0000-1 thanks for making this update!

@Lum1104
Lum1104 merged commit 10347b8 into omdsh-dev:main Sep 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0.1.7 兼容性:wireStream.open 由 3 参变 5 参导致 signal 落位错误,hello.ok 后立即 stream-failed、扩展无限重连

2 participants