Files
openclaw/extensions/slack/src/runtime.ts
2026-07-13 13:37:21 -07:00

21 lines
689 B
TypeScript

// Slack plugin module implements runtime behavior.
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, tryGetRuntime: getOptionalSlackRuntime } =
createPluginRuntimeStore<SlackRuntime>({
pluginId: "slack",
errorMessage: "Slack runtime not initialized",
});
export { getOptionalSlackRuntime, setSlackRuntime };