DeepSeek Harness 插件

dsh-pwa

DSH PWA plugin: serves manifest + service worker + installable icons, with basePath support for reverse-proxy deployments(英文原文)

跳到安装方式

来源信息

GitHub 仓库
haoliangwu/dsh-pwa
最近更新
2026年8月20日
分类
模型与服务商
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-21

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/haoliangwu/dsh-pwa
插件名:dsh-pwa
作者:haoliangwu

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

<h1 align="center">dsh-pwa</h1>

<p align="center">Makes a running dsh web instance installable as a PWA — manifest + service worker + icons, with basePath support for reverse-proxy deployments.</p>

<p align="center"><img src="docs/pwa-standalone-window.png" alt="DeepSeek Harness PWA running as a standalone macOS app window" width="640"></p>

A pure host-side plugin for DeepSeek Harness. The web frontend already ships a manifest and favicon in its dist, but no service worker or SW registration script — so Chrome's installability check fails. This plugin fills that gap and lets the app be mounted under a reverse-proxy sub-path.

Install

dsh plugin --profile web add github:haoliangwu/dsh-pwa

Built lib/ and assets/ are committed, so the git install is one line — no prepare script, no build step. Restart dsh --profile web after install (bundle layer stacks compose at boot).

Configure

basePath defaults to / (install at the origin root). For a reverse-proxy deployment mounted at /dsh/, add the plugin to your profile's cordis.patch.yml (~/.dsh/profiles/web/cordis.patch.yml) via the insert form (the config-overlay form only tunes plugins already listed in dsh.profile.bundles):

- insert:
    - id: dsh-pwa
      name: dsh-pwa
      config:
        basePath: /dsh/

After a dsh plugin add install, the bare - id: dsh-pwa row is already in place; only append the config: block to tune basePath.

Normalization applies automatically: ''/'/''/', '/dsh''/dsh/', 'dsh/''/dsh/', '/dsh/' unchanged. Values containing ? or # are rejected.

How it works

On apply(ctx, config), the plugin registers five WebServer routes under ${basePath}pwa/*:

  • manifest.webmanifest → the web manifest, built in JS with basePath-rooted URLs, served as application/manifest+json
  • sw.jsassets/sw.js, served as text/javascript
  • icon-192.png / icon-512.pngassets/icon-192.png / assets/icon-512.png, served as image/png
  • favicon.svgassets/favicon.svg, served as image/svg+xml

Each static asset is read once at apply time and cached in the handler closure (no per-request disk reads), and the returned disposers are released through ctx.effect so HMR/unload cleans up.

It also taps ctx.webServer.tapIndex(transform) to rewrite index.html:

  • repoints <link rel="manifest"> to ${basePath}pwa/manifest.webmanifest
  • repoints <link rel="icon" ...> to ${basePath}pwa/favicon.svg
  • injects before </body> a serviceWorker.register('${basePath}pwa/sw.js', { scope: '${basePath}' }) script

Verify

1. Start dsh --profile web. 2. Open Chrome DevTools → Application panel → Manifest. Confirm the name, icons (192/512/svg), and start_url/scope rooted at basePath. 3. ApplicationService Workers should list one active worker from ${basePath}pwa/sw.js. 4. Open Lighthouse (or check Application → the installability banner) — the site should now pass the install checklist and show beforeinstallprompt on first visit.

Build from source

pnpm install
pnpm gen-icons   # regenerates assets/icon-192.png + assets/icon-512.png from assets/favicon.svg
pnpm build       # emits lib/index.js, lib/invariant.js
pnpm test        # config normalization + manifest/tapIndex unit tests

lib/ and assets/ are committed so git installs work without a build step. After changing source, run pnpm build (and pnpm gen-icons when the icon source changes) and commit both trees.

License

MIT