mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 20:40:42 +00:00
23 lines
688 B
TypeScript
23 lines
688 B
TypeScript
import type { PluginRuntime } from "openclaw/plugin-sdk/channel-core";
|
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
|
|
type SlackChannelRuntime = {
|
|
handleSlackAction?: typeof import("./action-runtime.js").handleSlackAction;
|
|
};
|
|
|
|
type SlackRuntime = PluginRuntime & {
|
|
channel: PluginRuntime["channel"] & {
|
|
slack?: SlackChannelRuntime;
|
|
};
|
|
};
|
|
|
|
const {
|
|
setRuntime: setSlackRuntime,
|
|
clearRuntime: clearSlackRuntime,
|
|
tryGetRuntime: getOptionalSlackRuntime,
|
|
} = createPluginRuntimeStore<SlackRuntime>({
|
|
pluginId: "slack",
|
|
errorMessage: "Slack runtime not initialized",
|
|
});
|
|
export { clearSlackRuntime, getOptionalSlackRuntime, setSlackRuntime };
|