Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSH Bridge

English | 简体中文

DSH Bridge is an open-source, native macOS menu bar entry point for DeepSeek Harness. It is designed for one focused workflow: summon a Quick Bar from anywhere, send a task to a selected workspace, inspect the live agent activity, and return to work.

Project status: developer preview. A downloadable Apple Silicon preview is available, but it is ad-hoc signed and not notarized by Apple.

English

Why DSH Bridge

DSH Bridge is not another full chat client or a wrapper around DSH Web. It provides a small system-level surface for DeepSeek Harness:

Option+Space
    -> enter a task
    -> optionally attach clipboard text
    -> run in the selected workspace
    -> inspect live tool activity and approvals
    -> receive the result and a macOS notification

The app does not start DSH Web or listen on 127.0.0.1:3080.

Current features

  • Native SwiftUI menu bar app with AppKit panels and windows.
  • Global Option+Space Quick Bar.
  • Prompt submission to one default workspace.
  • Explicit plain-text clipboard attachment with a three-line preview and a 64 KB limit.
  • DeepSeek API key storage in macOS Keychain.
  • Bundled official macOS arm64 DeepSeek Harness runtime; users do not need Node.js, npm, pnpm, or dsh.
  • New and resumable embedded Harness sessions with local history.
  • Live, bounded activity timeline with paired tool-call and tool-result rows.
  • Native one-shot approval UI for sensitive Bash operations; unavailable approval channels fail closed.
  • Final response rendering with lightweight Markdown support.
  • Completion and failure notifications containing privacy-safe session routing only.
  • Runtime crash reporting, stderr logs, request timeouts, graceful shutdown, and redacted diagnostics.
  • Runtime checksum, architecture, helper, native capability, and clean-environment smoke validation.

Requirements and limitations

  • Apple Silicon Mac (arm64).
  • macOS 14 or later.
  • Xcode 16 or later for source builds.
  • A DeepSeek API key.
  • The app UI is currently Simplified Chinese only.
  • Only one task can run at a time.
  • Stop Task is not implemented yet; quitting the app performs graceful runtime shutdown.
  • The public preview is ad-hoc signed and not notarized; there is no auto-update channel, onboarding flow, Intel build, or Windows build yet.
  • DeepSeek Harness and the bundled runtime are still pre-release dependencies and may introduce compatibility-breaking changes.

Download and install

Download the latest preview and its SHA-256 checksum from GitHub Releases. The current package supports Apple Silicon only.

  1. Open the downloaded DMG.
  2. Drag DSH Bridge to Applications.
  3. Configure the DeepSeek API key and default workspace from the menu bar Settings item.

This preview is ad-hoc signed and not notarized. If macOS blocks the first launch, Control-click the app in Finder and choose Open, or select Open Anyway in System Settings → Privacy & Security. Do not bypass Gatekeeper for builds obtained from untrusted sources.

Verify the download with the accompanying checksum file:

shasum -a 256 -c DSHBridge-0.1.0-alpha.1-macos-arm64.dmg.sha256

Build and run

DSH Bridge must run as a macOS application bundle because it uses app-bundle resources and macOS User Notifications. Do not launch the raw SwiftPM executable with swift run or Xcode's generated executable scheme.

Build and launch the development app:

./Scripts/build-app.sh
open .build/DSHBridge.app

To produce a local release build:

CONFIGURATION=release ./Scripts/build-app.sh

Both commands use ad-hoc signing. The release packaging script uses the same signing mode and verifies the app bundle and generated disk image before producing a checksum:

./Scripts/package-dmg.sh 0.1.0-alpha.1

Xcode can still be used to edit the package and run tests. To debug the app, launch the generated bundle first, then attach Xcode's debugger to the DSHBridge process.

If the repository has been moved, clean Swift's path-dependent build cache once before rebuilding:

swift package clean

Configure the API key and default workspace from the menu bar Settings item. Option+Space then opens the Quick Bar.

Validation

swift-format lint --strict -r Sources Tests Package.swift
swift test --disable-sandbox
node --test Tests/RuntimePlugin/*.test.mjs
./Scripts/build-app.sh
codesign --verify --deep --strict --verbose=2 .build/DSHBridge.app
./Scripts/smoke-runtime.sh

Maintainers can launch the app with DSH_BRIDGE_UI_SMOKE=1 to open the Quick Bar immediately and show the Activity window when a run completes or fails.

Architecture

App / AppState
├── UI
│   ├── MenuBar
│   ├── QuickBar (SwiftUI hosted by AppKit NSPanel)
│   ├── Activity and History
│   ├── Approval Panel
│   ├── Status HUD
│   └── Settings
├── Domain
│   ├── HarnessEvent
│   ├── RunContext / RunResult
│   └── Session models
└── Services
    ├── SessionManager / SessionProvider
    ├── HarnessService
    │   ├── HarnessAdapter
    │   ├── JSONRPCClient
    │   ├── SessionChannel / ApprovalChannel
    │   ├── RuntimeProcess
    │   └── RuntimeResources
    ├── ClipboardService
    ├── ShortcutService
    ├── NotificationService
    ├── KeychainService
    ├── DiagnosticsService
    └── WorkspaceService

The UI does not depend on JSON-RPC. Protocol and process details remain behind HarnessService; UI code consumes bridge-owned domain events and session models.

Security and privacy

  • The API key is stored in Keychain and is injected only into the child runtime process.
  • Clipboard text is read when the Quick Bar opens and enters the agent context only after explicit attachment.
  • Clipboard contents are not stored in the Bridge session index or notification body.
  • Session summaries and diagnostics redact common credential assignments.
  • Sensitive Bash commands require a native, one-shot approval before execution.
  • The selected workspace is an agent execution boundary, not a read-only preview. Review approval prompts and use trusted repositories.

DeepSeek Harness community discovery

DSH Bridge embeds Bridge-specific Cordis plugins, but the repository is currently a macOS application rather than a conventional installable dsh plugin add bundle. Adding the GitHub topic dsh-plugin makes a public repository discoverable from the DeepSeek Harness community topic page; it does not publish or install the macOS app by itself.

Before presenting DSH Bridge as a standard DSH plugin, either:

  1. keep the product described clearly as a macOS companion app with embedded Harness plugins; or
  2. extract the reusable Cordis layer into a documented npm package with a dsh.bundle manifest and installation test.

Distribution status

The GitHub Releases page provides an explicitly labeled, unnotarized preview for testing. For a trusted public download outside the Mac App Store, a future release must be signed with a Developer ID Application certificate, use hardened runtime, be notarized by Apple, and have its ticket stapled. The current ad-hoc build does not meet those trust requirements.

The Mac App Store is not the recommended first distribution channel because DSH Bridge intentionally executes tools in user-selected workspaces. A Store build would require App Sandbox support, security-scoped bookmarks, correctly sandboxed helper executables, and a separate App Review feasibility pass.

Bundled runtime and license

DSH Bridge vendors the official deepseek-harness-runtime-bin 0.1.0rc7 macOS arm64 wheel. The build verifies its SHA-256 checksum and extracts its MIT license and third-party notices into the app bundle. See Vendor/Runtime/README.md, Docs/runtime-native-dependencies.md, and Docs/runtime-protocol.md.

DSH Bridge source code is available under the MIT License. Bundled third-party components remain subject to their respective licenses and notices.


简体中文

产品定位

DSH Bridge 是 DeepSeek Harness 的原生 macOS 菜单栏快速入口,不是完整聊天客户端,也不是 DSH Web 的套壳。

Option+Space
    -> 输入任务
    -> 可选附加剪贴板文本
    -> 在选定工作区执行
    -> 查看实时工具活动与敏感操作授权
    -> 获取结果和 macOS 通知

应用不会启动 DSH Web,也不会监听 127.0.0.1:3080

当前功能

  • SwiftUI + AppKit 原生菜单栏应用、面板和窗口。
  • Option+Space 全局 Quick Bar。
  • 在一个默认工作区中提交任务。
  • 显式附加纯文本剪贴板,提供三行预览和 64 KB 限制。
  • 使用 macOS 钥匙串保存 DeepSeek API Key。
  • 内置官方 macOS arm64 DeepSeek Harness Runtime,用户不需要安装 Node.js、npm、pnpm 或 dsh
  • 支持新建、恢复和继续 Embedded Harness Session,并保存本地历史。
  • 实时且有界的执行时间线,配对展示工具调用和结果。
  • 敏感 Bash 操作使用原生单次授权;授权通道不可用时默认拒绝。
  • 最终结果支持轻量 Markdown 渲染。
  • 完成和失败通知只携带安全的 Session 路由信息。
  • Runtime 崩溃诊断、stderr 日志、请求超时、优雅退出和脱敏诊断。
  • Runtime 校验和、架构、辅助程序、原生能力和干净环境 smoke 验证。

要求与已知限制

  • Apple Silicon Mac(arm64)。
  • macOS 14 或更高版本。
  • 从源码构建需要 Xcode 16 或更高版本。
  • 需要 DeepSeek API Key。
  • 当前应用界面仅支持简体中文。
  • 同一时间只能运行一个任务。
  • Stop Task 尚未实现;退出应用时会优雅关闭 Runtime。
  • 公开预览版使用 ad-hoc 签名且未经过 Apple 公证;暂不提供自动更新、首次引导、Intel 版本和 Windows 版本。
  • DeepSeek Harness 和内置 Runtime 仍是预发布依赖,后续可能出现破坏性兼容变更。

下载与安装

请从 GitHub Releases 下载最新预览版和对应的 SHA-256 校验文件。当前安装包仅支持 Apple Silicon。

  1. 打开下载的 DMG。
  2. DSH Bridge 拖到 Applications
  3. 从菜单栏“设置”中配置 DeepSeek API Key 和默认工作区。

该预览版使用 ad-hoc 签名,尚未经过 Apple 公证。如果 macOS 首次启动时阻止打开,请在 Finder 中按住 Control 点击应用并选择“打开”,或前往“系统设置 → 隐私与安全性”选择“仍要打开”。不要对来源不可信的构建绕过 Gatekeeper。

使用随附的校验文件验证下载:

shasum -a 256 -c DSHBridge-0.1.0-alpha.1-macos-arm64.dmg.sha256

构建与运行

DSH Bridge 必须以 macOS App Bundle 形式运行,因为系统通知和应用资源依赖有效的 .app Bundle。请不要使用 swift run,也不要直接运行 Xcode 自动生成的 Swift Package executable scheme。

构建并启动开发版应用:

./Scripts/build-app.sh
open .build/DSHBridge.app

生成本地 Release 构建:

CONFIGURATION=release ./Scripts/build-app.sh

以上构建都使用 ad-hoc 签名。发布打包脚本使用相同签名方式,并在生成校验和之前验证 App Bundle 和 DMG:

./Scripts/package-dmg.sh 0.1.0-alpha.1

Xcode 仍可用于编辑 Package 和运行测试。需要断点调试时,请先启动生成的 App Bundle,再使用 Xcode 附加到 DSHBridge 进程。

如果移动过仓库目录,请在重新构建前清理一次包含旧绝对路径的 Swift 构建缓存:

swift package clean

在菜单栏的“设置”中配置 API Key 和默认工作区,随后使用 Option+Space 打开 Quick Bar。

验证

swift-format lint --strict -r Sources Tests Package.swift
swift test --disable-sandbox
node --test Tests/RuntimePlugin/*.test.mjs
./Scripts/build-app.sh
codesign --verify --deep --strict --verbose=2 .build/DSHBridge.app
./Scripts/smoke-runtime.sh

维护者可以设置 DSH_BRIDGE_UI_SMOKE=1 启动应用:Quick Bar 会立即出现,任务完成或失败后会自动显示 Activity 窗口。

架构

App / AppState
├── UI:MenuBar、QuickBar、Activity、History、Approval、Status HUD、Settings
├── Domain:HarnessEvent、RunContext、RunResult、Session models
└── Services
    ├── SessionManager / SessionProvider
    ├── HarnessService
    │   ├── HarnessAdapter
    │   ├── JSONRPCClient
    │   ├── SessionChannel / ApprovalChannel
    │   ├── RuntimeProcess
    │   └── RuntimeResources
    ├── ClipboardService / ShortcutService / NotificationService
    └── KeychainService / DiagnosticsService / WorkspaceService

UI 不依赖 JSON-RPC。协议和进程细节封装在 HarnessService 后面,UI 只消费 Bridge 自己的领域事件与 Session 模型。

安全与隐私

  • API Key 只保存在钥匙串中,仅注入子 Runtime 进程。
  • Quick Bar 打开时读取剪贴板,但只有用户明确附加后才会进入 Agent 上下文。
  • 剪贴板内容不会写入 Bridge Session 索引或系统通知正文。
  • Session 摘要和诊断信息会脱敏常见凭据赋值。
  • 敏感 Bash 命令执行前需要原生单次授权。
  • 选定工作区是 Agent 的执行边界,不是只读预览;请检查授权提示并只使用可信仓库。

DSH 社区入口

DSH Bridge 内置了 Bridge 专用 Cordis 插件,但当前仓库的产品形态是 macOS 应用,并不是常规的 dsh plugin add 安装包。给公开 GitHub 仓库添加 dsh-plugin Topic 后,可以出现在 DeepSeek Harness 社区 Topic 页面;该 Topic 本身不会发布或安装 macOS 应用。

对外宣传为标准 DSH 插件前,建议二选一:

  1. 明确定位为“内置 Harness 插件的 macOS Companion App”;或
  2. 把可复用 Cordis 层拆成带 dsh.bundle manifest、安装文档和安装测试的 npm 包。

分发状态

GitHub Releases 页面现在提供明确标注为“未公证”的测试预览版。未来若要在 Mac App Store 之外提供可信下载,需要使用 Developer ID Application 证书签名、启用 Hardened Runtime、提交 Apple 公证并装订公证票据。当前 ad-hoc 构建不满足这些信任要求。

不建议第一阶段优先走 Mac App Store。DSH Bridge 需要在用户选择的工作区中执行工具;商店版本必须额外完成 App Sandbox、Security-Scoped Bookmark、Helper 沙箱签名,并单独验证 App Review 可行性。

内置 Runtime 与许可证

DSH Bridge 内置官方 deepseek-harness-runtime-bin 0.1.0rc7 macOS arm64 wheel。构建过程会校验 SHA-256,并把其 MIT License 和第三方声明提取到 App Bundle。详见 Vendor/Runtime/README.mdDocs/runtime-native-dependencies.mdDocs/runtime-protocol.md

DSH Bridge 源代码采用 MIT License。内置第三方组件仍分别遵循其许可证和第三方声明。

About

DSH Bridge 是 DeepSeek Harness 的原生 macOS 菜单栏快速入口,不是完整聊天客户端,也不是 DSH Web 的套壳。

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages