Files
openclaw/extensions/mattermost/index.ts
2026-04-06 16:40:41 +01:00

38 lines
1.1 KiB
TypeScript

import {
defineBundledChannelEntry,
loadBundledEntryExportSync,
} from "openclaw/plugin-sdk/channel-entry-contract";
import type { OpenClawPluginApi } from "openclaw/plugin-sdk/channel-entry-contract";
function registerSlashCommandRoute(api: OpenClawPluginApi): void {
const register = loadBundledEntryExportSync<(api: OpenClawPluginApi) => void>(import.meta.url, {
specifier: "./runtime-api.js",
exportName: "registerSlashCommandRoute",
});
register(api);
}
export default defineBundledChannelEntry({
id: "mattermost",
name: "Mattermost",
description: "Mattermost channel plugin",
importMetaUrl: import.meta.url,
plugin: {
specifier: "./channel-plugin-api.js",
exportName: "mattermostPlugin",
},
secrets: {
specifier: "./src/secret-contract.js",
exportName: "channelSecrets",
},
runtime: {
specifier: "./runtime-api.js",
exportName: "setMattermostRuntime",
},
registerFull(api) {
// Actual slash-command registration happens after the monitor connects and
// knows the team id; the route itself can be wired here.
registerSlashCommandRoute(api);
},
});