Skip to content
dsh.fish
Bundle

dsh-macos-skin

macOS desktop skin for the DeepSeek Harness web GUI + real-time plugin install/runtime error log panel (host route serves ~/.dsh/logs)

Source
hero-goblins
stars
1 stars
License
MIT
Updated
Updated 13 days ago

Readme

# dsh-macos-skin

把网页版 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(`dsh web`)装扮成原生 macOS 桌面应用的 **dsh 插件**,并内置**实时报错日志**:插件安装时、以及插件安装后运行时报错都会实时显示在一个可导出的日志面板里。

![preview](preview.png)

## 功能

- **macOS 桌面皮肤**:毛玻璃菜单栏(文件/显示/窗口/帮助 + 实时时钟)、浮动应用窗口(红绿灯按钮:红/黄=最小化到 Dock、绿=全屏)、底部 Dock(图标悬停放大),明暗主题自动跟随系统。
- **实时报错日志**(`⌘L` 或 Dock 日志图标):
  - 浏览器端错误:`window.onerror`、未处理 Promise、`console.error/warn`(含 cordis 客户端插件加载失败);
  - 服务端运行日志:轮询 `~/.dsh/logs/web.log`(由本插件 host 半端通过 `/dsh-logs/` 路由提供);
  - 插件安装日志:轮询 `~/.dsh/logs/install.log`。
  - 支持按级别过滤、自动滚动、清空、**导出 .log 文件**;有错误时 Dock/标题栏显示红色角标。

## 安装

在 `dsh` 可用的环境(需要 `pnpm`)下:

```bash
# 从 GitHub 直接安装
dsh plugin --profile web add "dsh-macos-skin@github:hero-goblins/dsh-macos-skin"
# 或本地路径
dsh plugin --profile web add "file:/path/to/dsh-macos-skin"
```

重启 `dsh web` 后刷新浏览器即生效。插件通过 `dsh.bundle.patch` 自动加入 profile 层,
通过 `dsh.client` 声明把浏览器半端(`lib/client.js`)注入 `window.__DSH_BOOT__`。

### 让服务端日志持续写入

host 半端只负责**提供** `~/.dsh/logs/*.log` 的读取路由,日志内容由启动方式决定:

- 用 `dsh web 2>&1 | tee -a ~/.dsh/logs/web.log` 启动,则运行日志实时写入;
- 用 `dsh plugin --profile web add <pkg> 2>&1 | tee -a ~/.dsh/logs/install.log` 安装插件,则安装日志实时写入。

即使没有这些文件,浏览器端错误(含客户端插件加载失败)依然会被实时记录。

## 开发

```bash
node build.mjs      # 把 lib/styles.css 内联进 src/client.js 生成 lib/client.js
npm test            # 语法检查
```

结构:

```
dsh-macos-skin/
├── package.json        # dsh.bundle.patch + dsh.client 声明
├── cordis.patch.yml    # 插入一行双面插件 (name: dsh-macos-skin)
├── lib/index.js        # host 半端:/dsh-logs/ 路由服务 ~/.dsh/logs
├── lib/client.js       # 浏览器半端(构建产物,内联 CSS)
├── lib/styles.css      # 皮肤样式源码
└── src/client.js       # 浏览器半端源码(__DSH_CSS__ 占位符)
```

## 卸载

```bash
dsh plugin --profile web remove dsh-macos-skin
```

## 许可证

MIT

Install

dsh plugin --profile web add github:hero-goblins/dsh-macos-skin

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.
  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source