Files
openclaw/extensions/slack/src/runtime.ts
Gustavo Madeira Santana 78ac118427 fix(plugins): stabilize bundled setup runtimes (#67200)
Merged via squash.

Prepared head SHA: e8d6738fd0
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-15 12:35:18 -04:00

24 lines
743 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;
};
export type SlackRuntime = PluginRuntime & {
channel: PluginRuntime["channel"] & {
slack?: SlackChannelRuntime;
};
};
const {
setRuntime: setSlackRuntime,
clearRuntime: clearSlackRuntime,
tryGetRuntime: getOptionalSlackRuntime,
getRuntime: getSlackRuntime,
} = createPluginRuntimeStore<SlackRuntime>({
pluginId: "slack",
errorMessage: "Slack runtime not initialized",
});
export { clearSlackRuntime, getOptionalSlackRuntime, getSlackRuntime, setSlackRuntime };