返回目录
消息通讯 插件

dsh-kde-notify

ThomasTZh/dsh-kde-notify

KDE Connect notifications for DeepSeek Harness approvals and questions, with the delivery module used by the bundle.

Stars
0
Forks
0
Issues
0
更新
22 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:ThomasTZh/dsh-kde-notify

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-kde-notify

A DeepSeek Harness bundle that sends KDE Connect notifications when a DSH session actually needs a human decision, with the delivery module it imports in the same repository.

Abstract

A long-running session can wait on an approval or a question while the user is away from the terminal. This bundle watches the approval and question paths, suppresses alerts for calls another plugin already auto-approved, and pushes one message per decision to every available KDE Connect device. It notifies on nothing else: turn completion, failure, blocked work, and capped output stay silent. Delivery is best effort and never changes a decision.

Layout

Path Contents
plugins/dsh-kde-notify/ The bundle: package.json, cordis.patch.yml, the plugin, and its tests
plugins/notifications/ The delivery module: config read, device discovery, send, failure log
notifications.mjs Symlink to the module. The plugin imports ../../../notifications.mjs, which resolves to this link in the repository and to $LOCAL_AI/notifications.mjs after install

Behaviour

The plugin notifies only for:

  • an approval request that reaches the human answerers;
  • a user question that needs an answer.

When the current session uses the workspace-write-mcp permission preset, the dsh-mcp-auto-permission plugin claims MCP approval requests before the human answerers. This plugin asks that plugin through its mcpAutoPermission.autoApproves(session, toolName) service and skips the notification for those calls. The approval is still audited and the tool still runs; only the false "approval required" alert is removed.

If the mcp-auto plugin is absent, or its lookup fails, the notification is sent as before.

Why the service lookup

The approval service appends approval/asked before dispatching approval/request, so event order alone cannot distinguish an auto-approved call. The mcp-auto plugin owns the exact predicate. Asking it through a small service keeps the preset name and MCP prefix in one place instead of duplicating them in the notifier.

Install

LOCAL_AI=${LOCAL_AI:-$HOME/.config/local-ai}
COMPONENTS=${COMPONENTS:-$HOME/dsh-components}
git clone https://github.com/ThomasTZh/dsh-kde-notify "$COMPONENTS/dsh-kde-notify"
mkdir -p "$LOCAL_AI/plugins"
cp -r "$COMPONENTS/dsh-kde-notify/plugins/dsh-kde-notify" "$LOCAL_AI/plugins/"
cp "$COMPONENTS/dsh-kde-notify/plugins/notifications/notifications.mjs" "$LOCAL_AI/notifications.mjs"

The module has to sit at $LOCAL_AI/notifications.mjs: that is what the plugin's ../../../notifications.mjs import reaches from $LOCAL_AI/plugins/dsh-kde-notify/lib/index.js.

Register the bundle in the profile:

"@local/dsh-kde-notify": "link:<absolute path to $LOCAL_AI>/plugins/dsh-kde-notify"

and list @local/dsh-kde-notify in dsh.profile.bundles, then run pnpm install in the profile directory and restart DSH.

Verification

Check Command Result
Unit tests node --test plugins/dsh-kde-notify/test/index.test.mjs pass, 5 tests
Modules parse node --check on both .js modules and the delivery module pass
Import resolution plugin import path resolved from a simulated $LOCAL_AI/plugins/dsh-kde-notify/lib/ layout pass; the installed module path resolves
Delivery smoke test node plugins/notifications/notifications.mjs --test not run here: it needs kdeconnect-cli and a paired device

Not tested: live delivery to a phone, which depends on KDE Connect, a paired device, and a running desktop session.

Limitations

  • Notifications are best effort and never block or change a decision.
  • Device discovery and delivery use kdeconnect-cli; failures are logged at ~/.local/state/local-ai/notifications.log and never raised.
  • The plugin does not infer auto-approval from event order or timing. If another plugin auto-approves approvals without exposing a predicate, this plugin cannot know and still notifies.
  • The enable flag is read from ~/.config/local-ai/notifications.json; a missing file means enabled.

Acknowledgements

The harness and its approval and question services are the work of the DeepSeek Harness project [1]. KDE Connect is a separate program, used through its command-line client and not distributed here [2].

References

  1. DeepSeek Harness. https://github.com/deepseek-ai/deepseek-harness. MIT.
  2. KDE Connect. https://invent.kde.org/network/kdeconnect-kde. GPL-2.0-or-later.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类消息通讯
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: notification、notifications。