dsh-host-web-compat
其他 活跃维护

dsh-host-web-compat

kelai141/dsh-host-web-compat

宿主插件,依托webserver钩子向页面自动注入旧内核浏览器polyfill,无需改动页面原有代码即可完成兼容适配,轻量无侵入,兼容多类常见旧内核,部署流程简单。

2
Stars 标星
0
Forks 分支
2
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
44 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:kelai141/dsh-host-web-compat
git clone https://github.com/kelai141/dsh-host-web-compat.git
git clone git@github.com:kelai141/dsh-host-web-compat.git
README.md main

dsh-host-web-compat

🌐 中文说明 / 中文 README

DeepSeek Harness × Android 生态 · dsh-mobile-apk(壳 APK)· dsh-shell-termux(shell)· dsh-client-ui-responsive(移动 UI)

Host plugin for DeepSeek Harness that injects
legacy-browser polyfills into every served page via the webserver tapIndex hook. Fixes the
in-app directory picker and other RPC flows on older WebView/browser kernels.

Background

Old kernels (e.g. MuMu's bundled browser, older WebViews) lack AbortSignal.any(), which breaks
the workspace directory picker's concurrent RPC cancellation (list renders empty). This plugin
injects idempotent polyfills at the HTML level — no browser-side changes needed.

Quick start

1. Install — package into the profile's node_modules.

2. Mount — in the profile's cordis.patch.yml:

- insert:
    - id: web-compat
      name: '@dsh-android/dsh-host-web-compat'
      disabled: !!js process.platform !== 'android'

3. Restart the service; the picker works again in old kernels.

Polyfills injected

API condition note
AbortSignal.any missing Chrome 116+ / Node 20.3+; older WebViews need it
structuredClone missing Chrome 98+ / Node 17+

Idempotent: skipped when already present.

Notes

  • Keep this plugin even in the shell-APK form as a last-mile fallback for old system WebViews.
  • If you move to a native SAF picker, the page still benefits from the other polyfills.

License

MIT.