mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-19 14:00:51 +00:00
Plugins: internalize twitch SDK imports
This commit is contained in:
@@ -1 +1,2 @@
|
||||
export * from "openclaw/plugin-sdk/twitch";
|
||||
export * from "./src/setup-surface.js";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { MarkdownConfigSchema } from "openclaw/plugin-sdk/twitch";
|
||||
import { z } from "zod";
|
||||
import { MarkdownConfigSchema } from "../api.js";
|
||||
|
||||
/**
|
||||
* Twitch user roles that can be allowed to interact with the bot
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/twitch";
|
||||
import type { OpenClawConfig } from "../api.js";
|
||||
import type { TwitchAccountConfig } from "./types.js";
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* resolves agent routes, and handles replies.
|
||||
*/
|
||||
|
||||
import type { ReplyPayload, OpenClawConfig } from "openclaw/plugin-sdk/twitch";
|
||||
import { createReplyPrefixOptions } from "openclaw/plugin-sdk/twitch";
|
||||
import type { ReplyPayload, OpenClawConfig } from "../api.js";
|
||||
import { createReplyPrefixOptions } from "../api.js";
|
||||
import { checkTwitchAccessControl } from "./access-control.js";
|
||||
import { getOrCreateClientManager } from "./client-manager-registry.js";
|
||||
import { getTwitchRuntime } from "./runtime.js";
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
* This is the primary entry point for the Twitch channel integration.
|
||||
*/
|
||||
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/twitch";
|
||||
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/twitch";
|
||||
import { buildPassiveProbedChannelStatusSummary } from "../../shared/channel-status-summary.js";
|
||||
import type { OpenClawConfig } from "../api.js";
|
||||
import { buildChannelConfigSchema } from "../api.js";
|
||||
import { twitchMessageActions } from "./actions.js";
|
||||
import { removeClientManager } from "./client-manager-registry.js";
|
||||
import { TwitchConfigSchema } from "./config-schema.js";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { StaticAuthProvider } from "@twurple/auth";
|
||||
import { ChatClient } from "@twurple/chat";
|
||||
import type { BaseProbeResult } from "openclaw/plugin-sdk/twitch";
|
||||
import type { BaseProbeResult } from "../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 "openclaw/plugin-sdk/twitch";
|
||||
import type { PluginRuntime } from "../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 "openclaw/plugin-sdk/twitch";
|
||||
import type { OpenClawConfig } from "../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 "openclaw/plugin-sdk/twitch";
|
||||
import type { ChannelStatusIssue } from "../api.js";
|
||||
import { getAccountConfig } from "./config.js";
|
||||
import { resolveTwitchToken } from "./token.js";
|
||||
import type { ChannelAccountSnapshot } from "./types.js";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/twitch";
|
||||
import { afterEach, beforeEach, vi } from "vitest";
|
||||
import type { OpenClawConfig } from "../api.js";
|
||||
|
||||
export const BASE_TWITCH_TEST_ACCOUNT = {
|
||||
username: "testbot",
|
||||
|
||||
@@ -9,11 +9,7 @@
|
||||
* 2. Environment variable: OPENCLAW_TWITCH_ACCESS_TOKEN (default account only)
|
||||
*/
|
||||
|
||||
import {
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
normalizeAccountId,
|
||||
type OpenClawConfig,
|
||||
} from "openclaw/plugin-sdk/twitch";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, type OpenClawConfig } from "../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 "openclaw/plugin-sdk/twitch";
|
||||
import type { OpenClawConfig } from "../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 "openclaw/plugin-sdk/twitch";
|
||||
} from "../api.js";
|
||||
|
||||
// ============================================================================
|
||||
// Twitch-Specific Types
|
||||
|
||||
Reference in New Issue
Block a user