Repository navigation
Replies: 1 comment
|
Adding a data point from the plugin side β we hit the same injection contract while adapting our own bundle for desktop. A host half declaring a static So +1 on restoring a host-side webServer/webRuntime (the ephemeral loopback + IPC forwarding sketch looks reasonable to me). From the ecosystem side the practical effect is that a chunk of the current catalog can't run on desktop, which is also why "what actually works on desktop" is hard to answer today. We collect this surface-compatibility data in a plugin-ops tool we maintain β happy to share findings if useful. |
Uh oh!
There was an error while loading. Please reload this page.
Summary / ??????
In the official DeepSeek Harness Desktop application (
apps/desktop-host),webserverandweb-runtimeare currently disabled indesktop.cordis.patch.yml.Because Cordis enforces strict dependency injection, any plugin in the ecosystem declaring
inject: ['webServer', ...]orinject: ['webRuntime', ...](e.g.,dsh-better-sidebar,dsh-file-mentions,dsh-harbor,dsh-skills-manager,dsh-archive-manager,dsh-ego-browser) remains permanentlypending.Upon boot, the container aborts startup and triggers the emergency recovery screen:
Furthermore, in
apps/desktop-host,runDesktopHostroutes frontendfetch(command, body)requests by passing/api/to core RPC and everything else to static assets. Even if a dummy service was injected, plugin backend HTTP endpoints (/api/<plugin>/*,/_dsh/*) would receive 404 or index HTML fallback.Root Cause Analysis / ??????
In
apps/desktop-host/config/desktop.cordis.patch.yml, disablingwebserverandweb-runtimeremoves these services from the desktop container.Cordis holds plugins with unsatisfied static
injectrequirements inpendingstate. The boot checkctx.start()strictly fails if any entry remains unactivated.In Electron, the renderer communicates over
dsh-app://app/.... InrunDesktopHost:dsh-client-modules:In
packages/client/modules/src/index.ts:webServeris present, theelsebranch callsregisterWebCarrier(ctx)wherectxhas not declaredinject: ['webServer'], throwingcannot get property "webServer" without inject.Proposed Solution / ??????
We propose a seamless, transparent host-level solution that restores 100% ecosystem compatibility without exposing an open external port or conflicting with other apps:
Mount Ephemeral-Port Loopback WebServer in Desktop Host:
In
runDesktopHost()prepare phase (apps/desktop-host/src/index.ts), mountWebServeron127.0.0.1:0.webRuntimewithlanAddresses: ['127.0.0.1']andtrustedHosts: ['127.0.0.1', 'localhost', 'app'].webServerorwebRuntimeactivate cleanly.Transparent IPC Forwarding via
webServer.match():In
runDesktopHost.fetch():const routeMatch = webServer?.match(url.pathname).http://127.0.0.1:${webServer.port}with synthetichostandoriginheaders so CSRF checks pass.Page Tap Interception & Port Injection:
In
assetHandler:globalThis.__DSH_SERVER_PORT__into the head script.webServer.applyIndexTaps(body)so plugins intercepting HTML pages work properly.Expose
match()indsh-host-webserver:Make
match(pathname: string): WebRoute | undefinedpublic inpackages/host/webserver/src/index.tsand exporthasRoute(pathname: string): boolean.Fix
dsh-client-modules:In
packages/client/modules/src/index.ts, change to unconditionalctx.inject(['webServer'], registerWebCarrier).Patch / ???????n
1.
apps/desktop-host/src/index.ts2.
packages/host/webserver/src/index.ts3.
packages/client/modules/src/index.tsVerification / ??????
dsh-better-sidebar,dsh-file-mentions,dsh-harbor,dsh-skills-manager,dsh-archive-manager,dsh-ego-browser).dsh-app://app/api/<plugin>/checkIPC fetches succeed with 200 OK.All reactions