본문으로 건너뛰기
L

dsh-plugin-noticeme

lw-storm/dsh-plugin-noticeme

백그라운드 알림 플러그인입니다. 페이지가 백그라운드 탭일 때 승인 요청이나 사용자 질문 카드가 나타나면 데스크톱 알림을 표시하고, 대안으로 탭 제목을 바꿉니다. 호스트는 동일 출처 엔드포인트 뒤에 승인/질문 이벤트를 대기시키며 클라이언트가 3초마다 확인합니다. 알림을 누르면 페이지에 포커스되고 페이지가 보이면 탭 제목을 복원합니다.

설치

dsh plugin --profile web add github:lw-storm/dsh-plugin-noticeme

README

dsh-plugin-noticeme

Notify me when DSH needs me: desktop notification (with tab-title fallback) when an approval prompt or an ask-user-question card appears while the page is in the background.After testing, this plugin can implement notification functionality in a lightweight manner.

image

Install

dsh plugin --profile web add link:/absolute/path/to/this/pkg
# published form:
dsh plugin add github:lw-storm/dsh-plugin-noticeme

Restart DSH after installing. On first page load the browser asks for notification permission — allow it.

Behavior

  • Watches approval/request (approval prompts) and tools/result for ask_user_question (question cards) on the host.
  • Host keeps a short-lived queue, exposed at GET /dsh-noticeme/pending (same-origin only). Reading drains the queue: each item is notified once.
  • Client polls every 3 s. While the page is visible nothing is shown; while hidden, a desktop Notification is raised (click → focus the page). If the Notification permission is unavailable, the tab title is prefixed with ⚠ 需要你确认 · and restored when the page becomes visible again.

Files

  • lib/index.js — host entry (ESM, Node)
  • client/client.js — browser entry (hand-written ModuleLoader bundle, no build step)
  • cordis.patch.yml — profile layer insertion

License

MIT

관련 플러그인