feat: add OpenClaw agent as third notification consumer 🦞#234
Open
feat: add OpenClaw agent as third notification consumer 🦞#234
Conversation
Add a webhook-based consumer that delivers DAO proposal notifications to an OpenClaw AI agent for automated governance analysis and vote drafting. ## What this does When a new proposal is detected in any monitored DAO, the system can now forward it to an OpenClaw agent via authenticated webhook — enabling AI-powered proposal analysis, vote reasoning, and governance research as part of the notification pipeline. ## New files - `interfaces/openclaw-client.interface.ts` — client contract - `clients/openclaw.client.ts` — HTTP webhook client with Bearer auth - `services/bot/openclaw-bot.service.ts` — BotServiceInterface impl - `docs/openclaw-consumer.md` — setup guide, payload spec, DB registration ## Changes - `consumers/app.ts` — wire OpenClaw as conditional third consumer - `consumers/index.ts` — instantiate client from env config - `consumers/config/env.ts` — add OPENCLAW_WEBHOOK_URL + OPENCLAW_API_KEY - `dispatcher/app.ts` — register 'openclaw' channel in notification factory - `docker-compose.yml` — pass new env vars to consumers container - `example.env` — document new optional env vars ## Design decisions - **Conditional initialization**: no RabbitMQ queue or consumer created unless OPENCLAW_WEBHOOK_URL is set. Zero overhead when disabled. - **Follows existing patterns**: same interface/client/service structure as Telegram and Slack consumers. - **Auth required**: webhook endpoint enforces Bearer token authentication. - **Notification-only**: no interactive bot commands — just receives and forwards structured proposal data via webhook POST. ## Setup required after merge 1. Set OPENCLAW_WEBHOOK_URL and OPENCLAW_API_KEY in consumers env 2. Register openclaw user via subscription API (see docs/openclaw-consumer.md) 3. Redeploy consumers service
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a webhook-based consumer that delivers DAO proposal notifications to an OpenClaw AI agent for automated governance analysis and vote drafting.
How it works
When a new proposal is detected in any monitored DAO, the dispatcher routes it to the
openclawchannel (alongside Telegram and Slack). The OpenClaw consumer forwards the notification via authenticatedPOSTto a configured webhook URL, where the receiving AI agent can analyze the proposal and draft voting recommendations.Changes
interfaces/openclaw-client.interface.tsclients/openclaw.client.tsservices/bot/openclaw-bot.service.tsdocs/openclaw-consumer.mdconsumers/app.tsconsumers/index.tsconsumers/config/env.tsOPENCLAW_WEBHOOK_URL+OPENCLAW_API_KEYdispatcher/app.tsopenclawchannel in notification factorydocker-compose.ymlexample.envDesign decisions
OPENCLAW_WEBHOOK_URLis setAuthorization: Bearer <key>headerSetup after merge
OPENCLAW_WEBHOOK_URLandOPENCLAW_API_KEYin consumers envFull documentation: docs/openclaw-consumer.md