ningbainb/deepseek-harness-desktop--packages-dsh-desktop-client491

@linxin666/dsh-desktop-client

Safe, versioned Desktop Contract client for DSH web plugins without Electron or DSH runtime internals.

包名
@linxin666/dsh-desktop-client
版本
1.1.0
许可证
BSD-3-Clause
最近更新
2026年9月12日

安装

此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗

Configuration

No configuration or Desktop-only import is required.

import {
  getDockEntryState,
  hasCapability,
  openDesktopSurface,
  openWorkspaceFile,
  showNotification,
  subscribeDeepLinks,
  taskDeepLink,
} from '@linxin666/dsh-desktop-client'

const dock = await getDockEntryState()
if (dock.available) {
  await openDesktopSurface('extensions')
}

if (await hasCapability('notifications.show')) {
  await showNotification({
    category: 'task',
    id: 'task:example:complete',
    title: 'Task complete',
    body: 'The example task completed.',
    deepLink: taskDeepLink('example'),
  })
}

if (await hasCapability('workspace-files.open')) {
  await openWorkspaceFile({ root: workspaceRoot, path: 'reports/result.md' })
}

const dispose = subscribeDeepLinks((link) => console.info('Desktop route', link))
// Dispose when the plugin unloads.
dispose()