// Surface adapter only. The caller and its human proof belong to core. import { PluginError } from "../../src/kinds.mjs"; export const interfaceVersion = 1; const VERBS = new Set([ "room.open", "room.read", "room.send", "project.list", "project.create", "project.archive", "project.unarchive", "thread.list", "thread.create", "thread.messages", "thread.send", "thread.open", "thread.shares", "thread.share", "thread.unshare", "session.list", "session.create", "session.clear", "session.cancel", "session.operation", ]); export async function dispatch({ verb, args }, { call }) { if (!VERBS.has(verb)) throw new PluginError("channel-operation", "unsupported channel operation"); return call(verb, args); }