插件目录 / Network / dsh-randomuuid-polyfill
dsh-randomuuid-polyfill
已验证 · 实测可装 Lehmaning
功能简介
为不安全源安装 crypto.randomUUID
可用 — 实测通过,早期项目
为不安全源安装 crypto.randomUUID 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
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 <path-to-this-package>
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
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-randomuuid-polyfill」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:Lehmaning/dsh-randomuuid-polyfill Headless(CLI)profile:
dsh plugin --profile headless add github:Lehmaning/dsh-randomuuid-polyfill 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。
使用场景
给 agent 网络能力——请求、API、代理或协议——让它能触达外部系统。
适合谁
任务涉及网络的人——调 API、抓资源或与远端服务通信。
二次开发建议
适配器和请求整形是缝——加协议、鉴权处理器、重试和端点抽象。