Replies: 2 comments
|
Independent confirmation from a third-party plugin author, with the version boundary measured rather than inferred. Where: Windows 11 + WSL 2 (Ubuntu 24.04.4), Node 24.19, host built from What I see // plugin apply(ctx)
const connection = ctx.get('connection') // present
connection.rpc.handle('/lab-probe', handler) // throws
// Error: cannot get property "webServer" without injectThe channel never registers, so It is not caller-side misuse. Injecting the web server as well does not help — verified with a probe plugin: ctx.inject(['connection'], (c) => c.get('connection').rpc.handle('/a', h)) // throws "…webServer without inject"
ctx.inject(['connection', 'webServer'], (c) => c.get('connection').rpc.handle('/b', h)) // throws the same( Measured boundary (
So Second-order effect worth knowing (same root refactor): because Workaround I did not adopt: registering the route directly on an injected Full evidence (probe code, session archives, tool schemas, npm-pack sweep): https://github.com/SISCHOI/daruma/blob/main/docs/aegis/evidence/2026-09-11-latest-harness-compat.md |
|
确认你的诊断,并补上定位与已验证的修复。 抛错点在这里(与你的描述一致): // dsh-client-connection/lib/index.js
register(owner, channel, handler) {
return owner.effect(() => owner.webServer.register(route), ...); // :618
}而 复现与修复验证
修复就是给那一行补上它读的服务: - id: connection
inject: [webRuntime, webServer]打包成了组合包(也验证过 bundle 形态可用):dsh-connection-rpc-fix,或者直接贴上面两行进 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
In
@deepseek-ai/dsh@0.1.5-rc.1, the publicconnection.rpc.handle(channel, handler)API throws synchronously on every call, so no plugin RPC channel is ever registered on the web server. Browser requests for those channels fall through to the SPA/static handler, which answers 405 for any non-GET/HEAD request.Environment
@deepseek-ai/dsh0.1.5-rc.1 (npmlatest)@deepseek-ai/cordis4.0.2@deepseek-ai/dsh-client-connection0.1.5-rc.1webdsh-mnemon0.5.5 / 0.5.6 / 0.5.7 (all ship the same code),dsh-vision-router2.1.4Root cause
packages/client/connection→HostConnectionService:this.ctxinside the class resolves to the service's own context (the plugin's declaredinjectis["credentials"]), not the reader-scoped context — even though the doc comment on the surrounding API says "scoped to the Context reading this service". With cordis 4.0.2, accessing a service that is not in that context's inject set throws instead of returningundefined:Because the throw is synchronous inside
handle(), the channel route never reacheswebServer, and there is no log line anywhere — the failure is completely silent.Why this is not a caller-side problem
Measured live in the running host (0.1.5-rc.1):
ctx.webServeron a context that injected['webServer','connection']true)ctx.effect(() => ctx.webServer !== undefined)on the same contexttrue)ctx.connection.ctx === ctx(reader-scoped proxy)truectx.connection.rpc.handle('/probe', ...)from that same contextcannot get property "webServer" without injectctx.webServer.register({kind:'prefix', path:'/probe', handler})directlySince
connection.ctxis the reader context andreader.webServeris provably readable inside an effect, theownerused insideregister()cannot be that same reader context — it is the raw service context. So no amount of correct injection on the plugin side can work around it.No package in the DSH core actually calls
rpc.handle(verified by scanning every@deepseek-ai/*lib/**.js), so this regression is not covered by the in-repo test suite.Observed impact
The web server prefix table contains zero plugin RPC channels:
User-visible: the Mnemon memory panel shows
Mnemon 尚未就绪plustransport failure for /dsh-mnemon-read/status-summary: HTTP 405, while all host-side tools keep working (they are in-process and never touch HTTP) — which makes the failure look like a plugin bug.Suggested fix
Use the lenient accessor (or thread the reader-scoped context through explicitly):
Verified against the live 0.1.5-rc.1 process: with this change,
rpc.handle()no longer throws, all 7/dsh-mnemon-*prefix routes register, and the panel's requests stop returning 405.Minimal reproduction
Related
All reactions