Browse topics
RobinPath Overview
Notifications API
Send native OS notifications from your custom resource.
The Notifications API sends native operating system notifications from your resource.
Capability required: notifications:send
Frontend (iframe)
import { createResourceClient } from "@rightplace/sdk";
const rp = createResourceClient();
await rp.ready();
// Simple notification
await rp.notifications.send("Sync Complete");
// Notification with body text
await rp.notifications.send("Build Failed", {
body: "Error in main.js line 42: unexpected token",
});
Backend (Node.js)
import { createResourceServer } from "@rightplace/sdk/server";
const server = createResourceServer({
methods: {
processData: async (params, { rp }) => {
// ... long-running work ...
await rp.notifications.send("Processing Complete", {
body: `Processed ${params.count} items`,
});
return { ok: true };
},
},
});
server.start();
MCP
Not exposed as an MCP tool yet. Agents surface user-facing updates through the activity system (rightplace_activities) - activity entries include a severity/toast field that the app can elevate to a native notification.
RobinPath Bridge
There is no rightplace.notifications_send. A script can still get the user’s attention by writing an activity (activity events flow through the app’s notification pipeline):
# Use the bridge to dispatch a custom activity via MCP
rightplace.mcp "rightplace_activities" {
action: "create",
kind: "script.complete",
title: "Backup finished",
message: "Wrote 412 files in 1m 12s",
severity: "info"
}
For OS-native notifications without an activity, call the iframe SDK from inside a resource or spawn a @robinpath/notification module command from RobinPath.
API Reference
rp.notifications.send(title, opts?)
| Parameter | Type | Description |
|---|---|---|
title | string | The notification title |
opts.body | string (optional) | The notification body text |
| Returns | Promise<void> |
Manifest Configuration
{
"capabilities": [
"notifications:send"
]
}
Notes
- Notifications use the native OS notification system (macOS Notification Center).
- The user’s system notification settings apply - notifications may be silenced by Focus modes.
- Keep notifications brief and actionable. Avoid spamming notifications from cron tasks or background processes.