Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardized webhook processors/interfaces for any service #37

Closed
0x4007 opened this issue Apr 2, 2024 · 2 comments
Closed

Standardized webhook processors/interfaces for any service #37

0x4007 opened this issue Apr 2, 2024 · 2 comments

Comments

@0x4007
Copy link
Member

0x4007 commented Apr 2, 2024

It would be interesting to start research on supporting Telegram webhooks and Google Drive webhooks.

I'm not sure if it's possible for us to have separate plugins listen for webhooks, that way we can keep the kernel super lean.

Google Drive

https://developers.google.com/drive/api/guides/push

For Ubiquity DAO, GitHub houses 95% of the r&d teams work, but for contributors outside of product, a lot of their work is on Google Drive.

It would be fantastic to develop more plugins that can offer rewards for contributions in Google Docs, Sheets etc. Perhaps eventually an email plugin as well.

Scope

I want to standardize I/O interfaces for webhook "processors" (not sure what to call them) where we can make unit tests and have open priced tasks for anybody to implement. This way we can scale up integration efforts rapidly (almost like a zapier!) for the bot to listen to events from various platforms. It would also be ideal to have separate codebases/plugins.

Let's post research here and create tasks from those research efforts.

@0x4007 0x4007 changed the title Google Drive Listener Standardized webhook processors/interfaces for any service Apr 3, 2024
@gentlementlegen
Copy link
Member

@0x4007 I think we can start by creating some @ubiquibot/kernel package that would expose the PluginInputs that are send to every plugin. This would be to avoid having each and every plugin redefining the type, as if it changes inside the kernel it will break all the plugins linked to it, and would also avoid duplicating code. There is a first implementation inside the assistive-pricing plugin here that could be reused.

So later on we would just do something like

import { PluginInputs } from "@ubiquibot/kernel"

directly in the plugins.

Likewise, we could define a return type that the kernel understands, the same way.

@0x4007
Copy link
Member Author

0x4007 commented Sep 30, 2024

It seems like the solution is to create "microkernels" which handle their own services. For example, we have a Telegram microkernel implementation in the works at ubiquity-os-marketplace/ubiquity-os-kernel-telegram#2

This microkernel receives events in a Cloudflare Worker, and routes them to a GitHub Action for longer running processes. This, like our main kernel, routes requests elsewhere based on what type of event it is.

This type of architecture seems to scale for all of our needs across all platforms. We can make a Google Drive microkernel, which some sort of Google Drive "app" would need to relay all webhook events to.

@0x4007 0x4007 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants