Notifications
@eduwork/notifications · v0.1.0-dev.1 · MulanPSL-2.0 AND MIT
A notification hub for business plugins: a plugin registers a source, pushes items, and the hub takes care of deduplication, updates, withdrawal and click routing. Presentation is shared with Agent session notifications (tray, system notification and the optional desktop pet) without requiring the pet to run.
The package ships both halves: a Host service that plugins inject to register sources, and a Web client service that dispatches user actions back to the source's handler.
Highlights
- Host service
notificationsat protocolversion 1, which other plugins inject to callregister. - Source definitions declare up to
32events and anonActionhandler; duplicate source ids are rejected. - Per-source bounded queue of
200items, with accounts of the same source sharing that capacity. - Registry helpers for the UI:
subscribe,catalog,snapshot,running(at most 200 entries),seen(key, revision)andreconcile. - Preferences live in the
eduwork-plugin-notificationssettings namespace as a per-event boolean map, applied live and re-read onloader/volatile-update. - Client half (
dsh.client, platformweb,immediately) exposes thenotificationActionsservice withregister,visibleanddispatch. - Presentation is delegated to a desktop adapter advertising protocol 1, so the tray, OS notifications and pet behave the same as for Agent work.
Install
Install this directory as a local DSH plugin bundle. From a shell:
dsh plugin --profile web add /absolute/path/to/notifications
Or add the directory through the Plugins panel in DSH (local bundle). Restart the DSH app after installation; plugins are activated from the bundle patch (cordis.patch.yml).
Configuration
No configuration keys: the bundle patch inserts the plugin with defaults.
Sources and their event names are declared in code by the calling plugin; the user-facing switches are stored per event in the eduwork-plugin-notifications settings namespace.
Requirements
- DeepSeek Harness >=0.2.1 <0.3.0
- Peer packages: @deepseek-ai/cordis, @deepseek-ai/schemastery, @deepseek-ai/dsh-settings
Notes and limits
- Registering a source is Host-only; the client half can only dispatch actions and report what is visible.
- Without a presentation adapter, an accepted item is not reported as delivered to the desktop.
- On Windows the desktop keeps tray balloons, and Toast integration is deferred.
- Development-stage build: the version is
0.1.0-dev.1.
中文文档
License
MulanPSL-2.0 AND MIT — see LICENSE and, where present, LICENSE-MIT. Extracted from the ECNU EduWork distribution (https://github.com/ECNU/EduWork); upstream copyright and license notices are preserved.
No comments yet. Be the first to write one.