Replies: 2 comments
|
This is the same bug already root caused in #6227, and it matches your diagnosis exactly. I checked the current upstream master and confirmed index.ts still has inject = ['credentials'] and rpc-host.ts still resolves owner.webServer directly inside register(), so it is not fixed yet. wsxwj123 in #6227 verified a working fix against a real profile with 4 rpc.handle() consumers (dsh-automation, dsh-appearance-gallery, dsh-session-manager, dsh-turn-scrubber), not just a unit test. The idea: the connection plugin adopts the webServer-injected context from its own apply() through a new attachWebContext() method, and register() resolves webServer through that adopted context instead of the caller's owner, while still keeping owner.effect() as the outer wrapper so the route dies with the calling plugin, not with connection itself. There is a full diff and a fork branch posted there: https://github.com/wsxwj123/deepseek-harness/tree/fix/client-connection-rpc-handle-webcontext Worth linking your case into #6227 too. More independent reproductions add weight to getting this into an actual release, and yours has one of the clearest root-cause writeups of the three or four threads on this same bug. |
|
确认这个回归,并把根因定位到具体行 —— 补一个已验证的修复。 不是“第三方插件用错了 API”,是这条 API 自己坏了: // dsh-client-connection/lib/index.js
const owner = this.ctx; // :541 —— 该行只 inject [webRuntime]
handle: (channel, handler) => this.register(owner, channel, handler), // :543
return owner.effect(() => owner.webServer.register(route), ...); // :618 —— 必然抛官方 复现(隔离 DSH_HOME):插件启动时调 修复: - id: connection
inject: [webRuntime, webServer]修后 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
@deepseek-ai/dsh-client-connectionappears to regress private RPC channel registration in the DSH 0.1.5 Web composition. Third-party plugins that callconnection.rpc.handle()cannot mount their channels.Environment
0.1.5-rc.1@deepseek-ai/dsh-client-connection:0.1.5-rc.2Reproduction
A plugin registers a private channel in the documented pattern:
In the current Web composition, registration fails with:
The relevant implementation still does:
The caller scope injects
connection, but notwebServer. The current Web connection entry injectswebRuntime, and the package-level connection injection declarescredentials; thereforewebServeris unavailable through the property lookup.User-visible symptoms
The private RPC routes are not registered. For example:
POST /tool-lazy-gate/discoverreturns HTTP 405POST /cpa/configreturns HTTP 405POST /workbuddy/statusreturns HTTP 405These requests fall through the SPA static fallback, which returns 405 for non-GET/HEAD requests. The core
/apiroute still reaches its authentication layer and returns 401 without a browser session, so the failure is specific to third-partyrpc.handle()channel registration.This also prevents dynamic discovery of plugin metadata. For example,
dsh-tool-lazy-gatefalls back to its built-in browser/computer associations even though adapted plugins publish validmetadata['dsh:gate']entries.Regression indication
In
dsh-v0.1.2-rc.1, the connection package declared:In
0.1.5-rc.2, it declares only:while
rpc.handle()still accessesowner.webServer. The change appears related to making the connection service usable without a Web carrier, but the private-channel registration path was not updated accordingly.Expected behavior
A third-party plugin injecting only
connectionshould be able to register a private RPC channel when the Web carrier is present. The returned disposer should remain owned by the caller fiber. The connection service should remain loadable without a Web carrier if that is still an intended invariant.Could you confirm the intended fix or provide a patched release? A regression test using a child consumer context that injects only
connectionwould help prevent this from recurring.All reactions