Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

add xspace-agent/packages/core/src/queue/processors/notification-processor.ts

overstepping8a3ce3cd52ec
diff --git a/xspace-agent/packages/core/src/queue/processors/notification-processor.ts b/xspace-agent/packages/core/src/queue/processors/notification-processor.ts
new file mode 100644
index 000000000..2e9821dda
--- /dev/null
+++ b/xspace-agent/packages/core/src/queue/processors/notification-processor.ts
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright 2026 nirholas (https://github.com/nirholas/xspace-agent) [§32]
+
+// =============================================================================
+// Queue Processor — Notifications
+// =============================================================================
+
+import type { Job } from 'bullmq'
+import type { NotificationJob } from '../types'
+
+/**
+ * Dispatches notifications via the appropriate channel (in-app, push, Slack, email).
+ *
+ * In production this would integrate with push services, Slack webhooks, etc.
+ */
+export async function notificationProcessor(
+ job: Job<NotificationJob>,
+): Promise<{ delivered: boolean; channel: string }> {
+ const { type, recipientId, orgId, title, body, data, channel } = job.data
+
+ console.log(
+ `[notification-processor] type=${type} recipient=${recipientId} org=${orgId} title="${title}"`,
+ )
+
+ switch (type) {
+ case 'in-app':
+ // Placeholder: store in notifications table / broadcast via Socket.IO
+ break
+ case 'push':
+ // Placeholder: deliver via FCM / APNs
+ break
+ case 'slack':
+ // Placeholder: post to Slack webhook
+ if (!channel) throw new Error('Slack notifications require a channel')
+ break
+ case 'email':
+ // Placeholder: delegate to email processor or send directly
+ break
+ default:
+ throw new Error(`Unknown notification type: ${type}`)
+ }
+
+ return { delivered: true, channel: type }
+}
+
+