Lehmaning/dsh-randomuuid-polyfill ↗★ 0
dsh-randomuuid-polyfill
在不安全来源上安装 crypto.randomUUID,修复局域网 HTTP 下的调用报错。 适合通过局域网 HTTP 访问 Web UI 并遇到该报错的用户。
安裝
此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗
說明文件
閱讀完整 README ↗dsh-randomuuid-polyfill
A DeepSeek Harness client plugin that installs crypto.randomUUID when the page is not a secure context.
Why
crypto.randomUUID is gated to secure contexts (HTTPS, or localhost). When the dsh web UI is served over plain HTTP on a LAN address, every client RPC throws:
TypeError: crypto.randomUUID is not a function
The workspace picker ("open folder") is the first place most people hit it, because choosing a workspace issues a listDirectory RPC. The root cause is upstream: AbstractApiClient.mintRpcId() in packages/host/apiproxy/src/fetch/client.ts calls crypto.randomUUID() unconditionally, and the composer's browserDraftAttachment() in packages/client/ui-conversation/src/client/service.ts does the same.
This plugin restores the missing API at boot, backed by crypto.getRandomValues (available on insecure origins), so the UI works over plain HTTP without waiting for an upstream fix.
Install
Build and install the package into the harness environment, then start the web UI:
pnpm build
npm install
npx @deepseek-ai/dsh web
The harness discovers the plugin from the dsh manifest field and injects the client bundle at boot (immediately: true).
Alternatives
- Open the UI at
http://localhost:3080(SSH tunnel into the host) —localhostis a secure context, so nothing is needed. - The proper fix lives in the source: use a
crypto.getRandomValues-based UUID inmintRpcId/browserDraftAttachment. A patched fork is available at Lehmaning/deepseek-harness on thefix/randomuuid-secure-contextbranch.
License
MIT