Skip to content
dsh.fish
Bundle

@visol-456/dsh-web-compat

Web compatibility layer for the DeepSeek Harness UI: polyfills crypto.randomUUID on non-secure contexts (plain-http LAN access) so the official conversation UI no longer crashes when attaching images, and surfaces the context status in Settings

Source
Visol-456
stars
1 stars
License
MIT
Updated
Updated 2 days ago

Readme

# @visol-456/dsh-web-compat

DeepSeek Harness Web 兼容插件:修复通过局域网纯 HTTP(非 secure context)访问 dsh web 时,官方会话界面添加图片附件调用 `crypto.randomUUID()` 崩溃的问题,并在设置页新增「Web 兼容」状态面板。

## 原理

- 浏览器仅在 secure context(HTTPS、localhost、127.0.0.1)暴露 `crypto.randomUUID()`。
- 通过 `http://192.168.3.2:3080` 访问时属于非 secure context,`crypto.randomUUID` 为 `undefined`。
- `crypto.getRandomValues()` 在非 secure context 仍可用,因此插件在 client bundle 模块顶层立即注入 UUID v4 polyfill。
- 插件同时注册 Settings 新 section「Web 兼容」,显示当前是否 secure context 以及 `randomUUID` 来源。

## 使用

```bash
dsh plugin add @visol-456/dsh-web-compat
```

## 开发

```bash
npm install
npm test
npm run build
```

## License

MIT

Install

dsh plugin --profile web add github:Visol-456/dsh-web-compat#c20c65df150a25cd44ab3cdf3a236c790dac91a1

Profile: web

  • This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
Source