Plugins: add Twitch runtime barrel

This commit is contained in:
Val Alexander 2026-03-18 01:29:33 -05:00
parent fe84354a33
commit d1fe30b35f
No known key found for this signature in database
11 changed files with 11 additions and 10 deletions

View File

@ -0,0 +1 @@
export * from "openclaw/plugin-sdk/twitch";

View File

@ -1,5 +1,5 @@
import { z } from "zod"; import { z } from "zod";
import { MarkdownConfigSchema } from "../api.js"; import { MarkdownConfigSchema } from "../runtime-api.js";
/** /**
* Twitch user roles that can be allowed to interact with the bot * Twitch user roles that can be allowed to interact with the bot

View File

@ -1,4 +1,4 @@
import type { OpenClawConfig } from "../api.js"; import type { OpenClawConfig } from "../runtime-api.js";
import type { TwitchAccountConfig } from "./types.js"; import type { TwitchAccountConfig } from "./types.js";
/** /**

View File

@ -1,6 +1,6 @@
import { StaticAuthProvider } from "@twurple/auth"; import { StaticAuthProvider } from "@twurple/auth";
import { ChatClient } from "@twurple/chat"; import { ChatClient } from "@twurple/chat";
import type { BaseProbeResult } from "../api.js"; import type { BaseProbeResult } from "../runtime-api.js";
import type { TwitchAccountConfig } from "./types.js"; import type { TwitchAccountConfig } from "./types.js";
import { normalizeToken } from "./utils/twitch.js"; import { normalizeToken } from "./utils/twitch.js";

View File

@ -1,5 +1,5 @@
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store"; import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
import type { PluginRuntime } from "../api.js"; import type { PluginRuntime } from "../runtime-api.js";
const { setRuntime: setTwitchRuntime, getRuntime: getTwitchRuntime } = const { setRuntime: setTwitchRuntime, getRuntime: getTwitchRuntime } =
createPluginRuntimeStore<PluginRuntime>("Twitch runtime not initialized"); createPluginRuntimeStore<PluginRuntime>("Twitch runtime not initialized");

View File

@ -5,7 +5,7 @@
* They support dependency injection via the `deps` parameter for testability. * They support dependency injection via the `deps` parameter for testability.
*/ */
import type { OpenClawConfig } from "../api.js"; import type { OpenClawConfig } from "../runtime-api.js";
import { getClientManager as getRegistryClientManager } from "./client-manager-registry.js"; import { getClientManager as getRegistryClientManager } from "./client-manager-registry.js";
import { DEFAULT_ACCOUNT_ID, getAccountConfig } from "./config.js"; import { DEFAULT_ACCOUNT_ID, getAccountConfig } from "./config.js";
import { resolveTwitchToken } from "./token.js"; import { resolveTwitchToken } from "./token.js";

View File

@ -4,7 +4,7 @@
* Detects and reports configuration issues for Twitch accounts. * Detects and reports configuration issues for Twitch accounts.
*/ */
import type { ChannelStatusIssue } from "../api.js"; import type { ChannelStatusIssue } from "../runtime-api.js";
import { getAccountConfig } from "./config.js"; import { getAccountConfig } from "./config.js";
import { resolveTwitchToken } from "./token.js"; import { resolveTwitchToken } from "./token.js";
import type { ChannelAccountSnapshot } from "./types.js"; import type { ChannelAccountSnapshot } from "./types.js";

View File

@ -1,5 +1,5 @@
import { afterEach, beforeEach, vi } from "vitest"; import { afterEach, beforeEach, vi } from "vitest";
import type { OpenClawConfig } from "../api.js"; import type { OpenClawConfig } from "../runtime-api.js";
export const BASE_TWITCH_TEST_ACCOUNT = { export const BASE_TWITCH_TEST_ACCOUNT = {
username: "testbot", username: "testbot",

View File

@ -9,7 +9,7 @@
* 2. Environment variable: OPENCLAW_TWITCH_ACCESS_TOKEN (default account only) * 2. Environment variable: OPENCLAW_TWITCH_ACCESS_TOKEN (default account only)
*/ */
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, type OpenClawConfig } from "../api.js"; import { DEFAULT_ACCOUNT_ID, normalizeAccountId, type OpenClawConfig } from "../runtime-api.js";
export type TwitchTokenSource = "env" | "config" | "none"; export type TwitchTokenSource = "env" | "config" | "none";

View File

@ -1,6 +1,6 @@
import { RefreshingAuthProvider, StaticAuthProvider } from "@twurple/auth"; import { RefreshingAuthProvider, StaticAuthProvider } from "@twurple/auth";
import { ChatClient, LogLevel } from "@twurple/chat"; import { ChatClient, LogLevel } from "@twurple/chat";
import type { OpenClawConfig } from "../api.js"; import type { OpenClawConfig } from "../runtime-api.js";
import { resolveTwitchToken } from "./token.js"; import { resolveTwitchToken } from "./token.js";
import type { ChannelLogSink, TwitchAccountConfig, TwitchChatMessage } from "./types.js"; import type { ChannelLogSink, TwitchAccountConfig, TwitchChatMessage } from "./types.js";
import { normalizeToken } from "./utils/twitch.js"; import { normalizeToken } from "./utils/twitch.js";

View File

@ -22,7 +22,7 @@ import type {
OpenClawConfig, OpenClawConfig,
OutboundDeliveryResult, OutboundDeliveryResult,
RuntimeEnv, RuntimeEnv,
} from "../api.js"; } from "../runtime-api.js";
// ============================================================================ // ============================================================================
// Twitch-Specific Types // Twitch-Specific Types