diff --git a/packages/core/src/config.ts b/packages/core/src/config.ts index 8ff773d64..ef4feac81 100644 --- a/packages/core/src/config.ts +++ b/packages/core/src/config.ts @@ -92,8 +92,8 @@ const OrchestratorConfigSchema = z.object({ projects: z.record(ProjectConfigSchema), notifiers: z.record(NotifierConfigSchema).default({}), notificationRouting: z.record(z.array(z.string())).default({ - urgent: ["desktop", "composio", "openclaw"], - action: ["desktop", "composio", "openclaw"], + urgent: ["desktop", "composio"], + action: ["desktop", "composio"], warning: ["composio"], info: ["composio"], }), diff --git a/packages/core/src/plugin-registry.ts b/packages/core/src/plugin-registry.ts index ef7dd3d39..ccf72d977 100644 --- a/packages/core/src/plugin-registry.ts +++ b/packages/core/src/plugin-registry.ts @@ -44,6 +44,7 @@ const BUILTIN_PLUGINS: Array<{ slot: PluginSlot; name: string; pkg: string }> = { slot: "notifier", name: "desktop", pkg: "@composio/ao-plugin-notifier-desktop" }, { slot: "notifier", name: "slack", pkg: "@composio/ao-plugin-notifier-slack" }, { slot: "notifier", name: "webhook", pkg: "@composio/ao-plugin-notifier-webhook" }, + { slot: "notifier", name: "openclaw", pkg: "@composio/ao-plugin-notifier-openclaw" }, // Terminals { slot: "terminal", name: "iterm2", pkg: "@composio/ao-plugin-terminal-iterm2" }, { slot: "terminal", name: "web", pkg: "@composio/ao-plugin-terminal-web" }, diff --git a/packages/plugins/notifier-openclaw/src/index.ts b/packages/plugins/notifier-openclaw/src/index.ts index f67e8a24d..dd11113c0 100644 --- a/packages/plugins/notifier-openclaw/src/index.ts +++ b/packages/plugins/notifier-openclaw/src/index.ts @@ -122,13 +122,13 @@ function formatMessage(event: OrchestratorEvent): string { } function buildUrl(host: string, port: number): string { - return `http://${host}:${port}/hooks/wake`; + return `http://${host}:${port}/api/sessions/main/message`; } export function create(config?: Record): Notifier { const host = (config?.host as string | undefined) ?? "localhost"; const port = (config?.port as number | undefined) ?? 8080; - const hookToken = (config?.hookToken as string | undefined) ?? (config?.token as string | undefined); + const hookToken = config?.token as string | undefined; const rawRetries = (config?.retries as number) ?? 2; const rawDelay = (config?.retryDelayMs as number) ?? 1000; const retries = Number.isFinite(rawRetries) ? Math.max(0, rawRetries) : 2; @@ -142,7 +142,7 @@ export function create(config?: Record): Notifier { : DEFAULT_EVENTS; if (!hookToken) { - console.warn("[notifier-openclaw] No hookToken configured — notifications will be no-ops"); + console.warn("[notifier-openclaw] No token configured — notifications will be no-ops"); } const url = buildUrl(host, port); @@ -155,7 +155,7 @@ export function create(config?: Record): Notifier { if (!allowedEvents.has(event.type)) return; const text = formatMessage(event); - await postWithRetry(url, { text, mode: "now" }, hookToken, retries, retryDelayMs); + await postWithRetry(url, { message: text }, hookToken, retries, retryDelayMs); }, }; }