Plugins: add Twitch runtime barrel
This commit is contained in:
parent
fe84354a33
commit
d1fe30b35f
1
extensions/twitch/runtime-api.ts
Normal file
1
extensions/twitch/runtime-api.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from "openclaw/plugin-sdk/twitch";
|
||||
@ -1,5 +1,5 @@
|
||||
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
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import type { OpenClawConfig } from "../api.js";
|
||||
import type { OpenClawConfig } from "../runtime-api.js";
|
||||
import type { TwitchAccountConfig } from "./types.js";
|
||||
|
||||
/**
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { StaticAuthProvider } from "@twurple/auth";
|
||||
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 { normalizeToken } from "./utils/twitch.js";
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
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 } =
|
||||
createPluginRuntimeStore<PluginRuntime>("Twitch runtime not initialized");
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* 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 { DEFAULT_ACCOUNT_ID, getAccountConfig } from "./config.js";
|
||||
import { resolveTwitchToken } from "./token.js";
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* 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 { resolveTwitchToken } from "./token.js";
|
||||
import type { ChannelAccountSnapshot } from "./types.js";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
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 = {
|
||||
username: "testbot",
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
* 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";
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { RefreshingAuthProvider, StaticAuthProvider } from "@twurple/auth";
|
||||
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 type { ChannelLogSink, TwitchAccountConfig, TwitchChatMessage } from "./types.js";
|
||||
import { normalizeToken } from "./utils/twitch.js";
|
||||
|
||||
@ -22,7 +22,7 @@ import type {
|
||||
OpenClawConfig,
|
||||
OutboundDeliveryResult,
|
||||
RuntimeEnv,
|
||||
} from "../api.js";
|
||||
} from "../runtime-api.js";
|
||||
|
||||
// ============================================================================
|
||||
// Twitch-Specific Types
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user