Initial gori agent gateway

This commit is contained in:
zenord
2026-08-14 23:06:31 +08:00
commit 00325efb50
26 changed files with 2779 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
import type { OutgoingMessage, WebhookRequestContext, WebhookResponse } from "./types.js";
export interface PlatformAdapter {
name: string;
handleWebhook(context: WebhookRequestContext): Promise<WebhookResponse>;
sendMessage(message: OutgoingMessage): Promise<void>;
}
export function jsonResponse(body: unknown, status = 200): WebhookResponse {
return { status, body };
}
export function notImplemented(platform: string): WebhookResponse {
return jsonResponse({ ok: false, error: `${platform} inbound webhook is not implemented in v1` }, 501);
}