feat: add plugin

- add plugin system that request may included to run before do actual request by type.

Signed-off-by: Pakin <pakin.t@forth.co.th>
This commit is contained in:
Pakin 2026-05-12 12:40:32 +07:00
parent d048dc2437
commit d7f5e12d51
9 changed files with 1492 additions and 15 deletions

10
plugins/plugin.wit Normal file
View file

@ -0,0 +1,10 @@
package server-m2-dev:plugins;
interface handler {
// The plugin takes a message and returns a processed version
process-message: func(input: string) -> string;
}
world plugin-world {
export handler;
}