UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

40 lines • 1.19 kB
type ChannelRuntimeContextKey = { channelId: string; accountId?: string | null; capability: string; }; type ChannelRuntimeContextEvent = { type: "registered" | "unregistered"; key: { channelId: string; accountId?: string; capability: string; }; context?: unknown; }; type ChannelRuntimeContextRegistry = { register: (params: ChannelRuntimeContextKey & { context: unknown; abortSignal?: AbortSignal; }) => { dispose: () => void; }; get: <T = unknown>(params: ChannelRuntimeContextKey) => T | undefined; watch: (params: { channelId?: string; accountId?: string | null; capability?: string; onEvent: (event: ChannelRuntimeContextEvent) => void; }) => () => void; }; /** * Minimal channel-runtime surface exported through the public plugin SDK. * * Gateway startup supplies the full plugin channel runtime, but external callers * may still type context-only helpers against this compatibility surface. */ type ChannelRuntimeSurface = { runtimeContexts: ChannelRuntimeContextRegistry; [key: string]: unknown; }; export { ChannelRuntimeContextRegistry as n, ChannelRuntimeSurface as r, ChannelRuntimeContextKey as t };