openvibers/openvibe.sdk Commits

openvibe-sdk 0.39.0: openvibe-sdk/notifications (push a notification through Network) (#35)

OP OpenVibers committed 10 Oct 2026 · tag v0.39. · 0 files, +0 −0

**New: `openvibe-sdk/notifications`** (server): `createNotificationsClient(client).push({ subjectId | userId, type, title, message, url, category, priority, icon, rich_content })` sends a person one notification through OpenVibe.Network.

- It resolves the subject with `identity.subject.resolve`, then `POST /internal/notifications/push` (network.notification-push-request@1, capability `network.notifications.push`) with Network's user id.
- It answers `{ sent: true, skipped }`, where skipped means the person switched that category off and Network decided, or `{ sent: false, reason: 'unknown_subject' }` for a subject Network does not know or a deleted account. Any other refusal throws the client's OpenVibeError.
- **Attempted once:** Network keeps no idempotency record for a push, so an automatic retry could notify twice. The caller retries from its own queue and owns the dedupe.

Why now: OpenVibe.Watch's notification action (plan T18 step 4) is next. Today a watch with "Notify me" fires and nobody is told. Search already carries its own copy of this client; it can move to the shared one.

0.39.0 (minor: a new subpath). Exports map, ESM wrapper, types, README table and changelog are updated. `test/notifications.test.js` covers the resolve then push body, delivered-but-skipped, unknown subject, a direct user id, and a refusal that is not retried. The subpath count and the browser-blocked list include it. `ov test`: green.

This commit has no diff to show.