Declare notifications.show in the app's actions. The Desktop notifications
resource (notifications:desktop) defaults to Ask. A scheduled script needs
Allow for this effect. Chat has the matching notifications_show tool.
signal.throwIfAborted();
const result = await cap.call('notifications.show', {
title: 'Report ready',
body: 'Open the app to read the latest report.',
silent: true,
});
The host prefixes the native title with Redac and the bound app ID. Callers
cannot select another identity. Use a title of 1–160 characters, within 256
UTF-8 bytes, and one line. The body permits 2,000 characters and at most 8 KiB.
NUL is refused. silent defaults to true. This API sends plain text with no
link, image, custom sound, button, reply handler or OS file access.
submitted: true means the native show call returned. OS permissions, Focus
settings and later native failures can prevent a banner. Keep app results in
the app or its collection as the lasting record. Use text suitable for OS
previews; the API sends real text, which can contain private values.
Each app can attempt five alerts per rolling minute; the whole host permits 30. Further calls fail with rate_limited. Unsupported OS services fail with
unavailable. Native exception text is not returned. Test mode sends no OS
notifications and resets rate admission when test data is reset.
This mutation has no receipt or request key. A second call creates another alert. Do not automatically retry after uncertain delivery. Schedules choose the alert condition in their script; this API does not create a schedule. Phone Chat uses the desktop notification service, not a phone push service.
Sources: SDK schema, capability, native adapter, Electron API.