@openclaw/twitch 2026.11.5 → 2026.11.10-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{monitor-BStOwZKj.mjs → monitor-DfA87gBg.mjs} +4 -6
- package/dist/.setup/{plugin-D_NszQlS.mjs → plugin-B2l8TCND.mjs} +12 -22
- package/dist/.setup/setup-plugin-api-EN3PbyIC.mjs +2 -0
- package/dist/.setup/{setup-surface-DuCk_ZHo.mjs → setup-surface-mdCyd7g7.mjs} +4 -8
- package/dist/.source-module-urls/e92ae748f4a308f6cf1a5ef62518f7ba0627945de435d928747fa07ea1b4421f.json +1 -1
- package/dist/api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/index.js +1 -2
- package/dist/setup-entry.js +2 -3
- package/dist/setup-plugin-api.js +1 -1
- package/package.json +4 -4
- package/dist/.setup/setup-plugin-api-Czqbbgip.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as normalizeTwitchChannel } from "./setup-surface-
|
|
2
|
-
import { i as getTwitchRuntime, n as sendMessageTwitchInternal, r as getOrCreateClientManager } from "./plugin-
|
|
1
|
+
import { l as normalizeTwitchChannel } from "./setup-surface-mdCyd7g7.mjs";
|
|
2
|
+
import { i as getTwitchRuntime, n as sendMessageTwitchInternal, r as getOrCreateClientManager } from "./plugin-B2l8TCND.mjs";
|
|
3
3
|
import { bindIngressLifecycleToReplyOptions, createChannelIngressError, createChannelIngressMonitor } from "openclaw/plugin-sdk/channel-outbound";
|
|
4
4
|
import { collectErrorGraphCandidates, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
5
5
|
import { createChannelInboundEnvelopeBuilderAsync } from "openclaw/plugin-sdk/channel-inbound";
|
|
@@ -7,7 +7,7 @@ import { normalizeLowercaseStringOrEmpty, normalizeNullableString } from "opencl
|
|
|
7
7
|
import { HttpStatusCodeError } from "@twurple/api-call";
|
|
8
8
|
import { defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
9
9
|
import { resolveOutboundMediaUrls } from "openclaw/plugin-sdk/reply-payload";
|
|
10
|
-
|
|
10
|
+
// extensions/twitch/src/twitch-ingress.ts
|
|
11
11
|
const TWITCH_INGRESS_PAYLOAD_VERSION = 1;
|
|
12
12
|
const TWITCH_INGRESS_DRAIN_INTERVAL_MS = 1e3;
|
|
13
13
|
const TwitchIngressPermanentError = createChannelIngressError("TwitchIngressPermanentError");
|
|
@@ -112,8 +112,7 @@ function createTwitchIngress(options) {
|
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
|
|
116
|
-
//#region extensions/twitch/src/monitor.ts
|
|
115
|
+
// extensions/twitch/src/monitor.ts
|
|
117
116
|
const twitchUserIdentity = defineStableChannelIngressIdentity({
|
|
118
117
|
key: "sender-id",
|
|
119
118
|
entryIdPrefix: "twitch-user-entry"
|
|
@@ -364,5 +363,4 @@ async function monitorTwitchProvider(options) {
|
|
|
364
363
|
}, { once: true });
|
|
365
364
|
return { stop };
|
|
366
365
|
}
|
|
367
|
-
//#endregion
|
|
368
366
|
export { monitorTwitchProvider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as resolveTwitchAccountContext, c as normalizeToken, i as resolveDefaultTwitchAccountId, l as normalizeTwitchChannel, n as DEFAULT_ACCOUNT_ID$1, o as twitchConfigAdapter, r as getAccountConfig, s as isAccountConfigured, t as twitchSetupPlugin, u as resolveTwitchToken } from "./setup-surface-
|
|
1
|
+
import { a as resolveTwitchAccountContext, c as normalizeToken, i as resolveDefaultTwitchAccountId, l as normalizeTwitchChannel, n as DEFAULT_ACCOUNT_ID$1, o as twitchConfigAdapter, r as getAccountConfig, s as isAccountConfigured, t as twitchSetupPlugin, u as resolveTwitchToken } from "./setup-surface-mdCyd7g7.mjs";
|
|
2
2
|
import { StaticAuthProvider, accessTokenIsExpired, getTokenInfo } from "@twurple/auth";
|
|
3
3
|
import { ChatClient, LogLevel } from "@twurple/chat";
|
|
4
4
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
@@ -25,13 +25,12 @@ import { normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "opencla
|
|
|
25
25
|
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
26
26
|
import { z } from "zod";
|
|
27
27
|
import { HttpStatusCodeError, callTwitchApi } from "@twurple/api-call";
|
|
28
|
-
|
|
28
|
+
// extensions/twitch/src/runtime.ts
|
|
29
29
|
const { setRuntime: setTwitchRuntime, getRuntime: getTwitchRuntime } = createPluginRuntimeStore({
|
|
30
30
|
pluginId: "twitch",
|
|
31
31
|
errorMessage: "Twitch runtime not initialized"
|
|
32
32
|
});
|
|
33
|
-
|
|
34
|
-
//#region extensions/twitch/src/oauth-owner.ts
|
|
33
|
+
// extensions/twitch/src/oauth-owner.ts
|
|
35
34
|
const tasks = /* @__PURE__ */ new WeakMap();
|
|
36
35
|
function lineageOf(account, token) {
|
|
37
36
|
return createHash("sha256").update(JSON.stringify([
|
|
@@ -299,8 +298,7 @@ async function createManagedTwitchAuthProvider(account, token, accountId) {
|
|
|
299
298
|
}
|
|
300
299
|
};
|
|
301
300
|
}
|
|
302
|
-
|
|
303
|
-
//#region extensions/twitch/src/twitch-client.ts
|
|
301
|
+
// extensions/twitch/src/twitch-client.ts
|
|
304
302
|
var TwitchClientManager = class {
|
|
305
303
|
constructor(logger, statusSink) {
|
|
306
304
|
this.logger = logger;
|
|
@@ -491,8 +489,7 @@ var TwitchClientManager = class {
|
|
|
491
489
|
}
|
|
492
490
|
}
|
|
493
491
|
};
|
|
494
|
-
|
|
495
|
-
//#region extensions/twitch/src/client-manager-registry.ts
|
|
492
|
+
// extensions/twitch/src/client-manager-registry.ts
|
|
496
493
|
const registry = /* @__PURE__ */ new Map();
|
|
497
494
|
function getOrCreateClientManager(accountId, logger, statusSink) {
|
|
498
495
|
const existing = registry.get(accountId);
|
|
@@ -513,8 +510,7 @@ async function removeClientManager(accountId) {
|
|
|
513
510
|
registry.delete(accountId);
|
|
514
511
|
await manager.disconnectAll();
|
|
515
512
|
}
|
|
516
|
-
|
|
517
|
-
//#region extensions/twitch/src/config-schema.ts
|
|
513
|
+
// extensions/twitch/src/config-schema.ts
|
|
518
514
|
const TwitchRoleSchema = z.enum([
|
|
519
515
|
"moderator",
|
|
520
516
|
"owner",
|
|
@@ -566,8 +562,7 @@ const MultiAccountSchema = z.object({
|
|
|
566
562
|
accounts: z.record(z.string(), TwitchAccountSchema)
|
|
567
563
|
}).refine((val) => Object.keys(val.accounts).length > 0, { message: "accounts must contain at least one entry" });
|
|
568
564
|
const TwitchConfigSchema = z.union([SimplifiedSchema, MultiAccountSchema]);
|
|
569
|
-
|
|
570
|
-
//#region extensions/twitch/src/send.ts
|
|
565
|
+
// extensions/twitch/src/send.ts
|
|
571
566
|
function createTwitchSendReceipt(messageId, channel) {
|
|
572
567
|
return createMessageReceiptFromOutboundResults({
|
|
573
568
|
results: messageId ? [{
|
|
@@ -594,8 +589,7 @@ async function sendMessageTwitchInternal(params) {
|
|
|
594
589
|
receipt: createTwitchSendReceipt(messageId, params.channel)
|
|
595
590
|
};
|
|
596
591
|
}
|
|
597
|
-
|
|
598
|
-
//#region extensions/twitch/src/target.ts
|
|
592
|
+
// extensions/twitch/src/target.ts
|
|
599
593
|
function parseTwitchMessagingTarget(target) {
|
|
600
594
|
const providerTarget = stripChannelTargetPrefix(target, "twitch", "twitch-chat");
|
|
601
595
|
const kindMatch = /^(user|dm|channel|group|conversation|room):/i.exec(providerTarget);
|
|
@@ -619,8 +613,7 @@ function normalizeTwitchMessagingTarget(target) {
|
|
|
619
613
|
function isTwitchDirectMessageTarget(target) {
|
|
620
614
|
return parseTwitchMessagingTarget(target).isDirectMessage;
|
|
621
615
|
}
|
|
622
|
-
|
|
623
|
-
//#region extensions/twitch/src/outbound.ts
|
|
616
|
+
// extensions/twitch/src/outbound.ts
|
|
624
617
|
const twitchOutbound = {
|
|
625
618
|
deliveryMode: "direct",
|
|
626
619
|
deliveryCapabilities: { durableFinal: {
|
|
@@ -684,8 +677,7 @@ const twitchMessageAdapter = createChannelMessageAdapterFromOutbound({
|
|
|
684
677
|
id: "twitch",
|
|
685
678
|
outbound: twitchOutbound
|
|
686
679
|
});
|
|
687
|
-
|
|
688
|
-
//#region extensions/twitch/src/resolver.ts
|
|
680
|
+
// extensions/twitch/src/resolver.ts
|
|
689
681
|
const TWITCH_HELIX_USER_LOOKUP_TIMEOUT_MS = 1e4;
|
|
690
682
|
async function resolveTwitchTargets(inputs, account, _kind, log) {
|
|
691
683
|
if (!account.clientId || !account.accessToken) {
|
|
@@ -773,8 +765,7 @@ async function resolveTwitchTargets(inputs, account, _kind, log) {
|
|
|
773
765
|
}
|
|
774
766
|
return results;
|
|
775
767
|
}
|
|
776
|
-
|
|
777
|
-
//#region extensions/twitch/src/plugin.ts
|
|
768
|
+
// extensions/twitch/src/plugin.ts
|
|
778
769
|
function readSendValue(value) {
|
|
779
770
|
return typeof value === "string" || typeof value === "number" || typeof value === "boolean" ? String(value).trim() : void 0;
|
|
780
771
|
}
|
|
@@ -991,7 +982,7 @@ const twitchPlugin = createChatChannelPlugin({
|
|
|
991
982
|
await runPassiveAccountLifecycle({
|
|
992
983
|
abortSignal: ctx.abortSignal,
|
|
993
984
|
start: async () => {
|
|
994
|
-
const { monitorTwitchProvider } = await import("./monitor-
|
|
985
|
+
const { monitorTwitchProvider } = await import("./monitor-DfA87gBg.mjs");
|
|
995
986
|
return monitorTwitchProvider({
|
|
996
987
|
account,
|
|
997
988
|
accountId,
|
|
@@ -1029,5 +1020,4 @@ const twitchPlugin = createChatChannelPlugin({
|
|
|
1029
1020
|
}
|
|
1030
1021
|
}
|
|
1031
1022
|
});
|
|
1032
|
-
//#endregion
|
|
1033
1023
|
export { setTwitchRuntime as a, getTwitchRuntime as i, sendMessageTwitchInternal as n, getOrCreateClientManager as r, twitchPlugin as t };
|
|
@@ -6,7 +6,7 @@ import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
|
|
|
6
6
|
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
7
7
|
import { getChatChannelMeta } from "openclaw/plugin-sdk/core";
|
|
8
8
|
import { createSetupTranslator, formatDocsLink, normalizeAccountId as normalizeAccountId$1, patchTopLevelChannelConfigSection, setSetupChannelEnabled, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
9
|
-
|
|
9
|
+
// extensions/twitch/src/token.ts
|
|
10
10
|
function normalizeTwitchToken(raw) {
|
|
11
11
|
if (!raw) return;
|
|
12
12
|
const trimmed = raw.trim();
|
|
@@ -26,8 +26,7 @@ function resolveTwitchToken(cfg, accountIdInput) {
|
|
|
26
26
|
if (envToken) return { token: envToken };
|
|
27
27
|
return { token: "" };
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
//#region extensions/twitch/src/utils/twitch.ts
|
|
29
|
+
// extensions/twitch/src/utils/twitch.ts
|
|
31
30
|
function normalizeTwitchChannel(channel) {
|
|
32
31
|
const trimmed = normalizeLowercaseStringOrEmpty(channel);
|
|
33
32
|
return trimmed.startsWith("#") ? trimmed.slice(1) : trimmed;
|
|
@@ -39,8 +38,7 @@ function isAccountConfigured(account, resolvedToken) {
|
|
|
39
38
|
const token = resolvedToken ?? account.accessToken;
|
|
40
39
|
return Boolean(account.username && token && account.clientId);
|
|
41
40
|
}
|
|
42
|
-
|
|
43
|
-
//#region extensions/twitch/src/config.ts
|
|
41
|
+
// extensions/twitch/src/config.ts
|
|
44
42
|
const { listAccountIds, resolveDefaultAccountId: resolveDefaultTwitchAccountId } = createAccountListHelpers("twitch", {
|
|
45
43
|
normalizeAccountId,
|
|
46
44
|
fallbackAccountIdWhenEmpty: false,
|
|
@@ -120,8 +118,7 @@ const twitchConfigAdapter = {
|
|
|
120
118
|
isConfigured: (account, cfg) => resolveTwitchAccountContext(cfg, account.accountId).configured,
|
|
121
119
|
isEnabled: (account) => account?.enabled !== false
|
|
122
120
|
};
|
|
123
|
-
|
|
124
|
-
//#region extensions/twitch/src/setup-surface.ts
|
|
121
|
+
// extensions/twitch/src/setup-surface.ts
|
|
125
122
|
const channel = "twitch";
|
|
126
123
|
const t = createSetupTranslator();
|
|
127
124
|
const INVALID_ACCOUNT_ID_MESSAGE = "Invalid Twitch account id";
|
|
@@ -430,5 +427,4 @@ const twitchSetupPlugin = {
|
|
|
430
427
|
setupContract: twitchSetupContract,
|
|
431
428
|
setupWizard: twitchSetupWizard
|
|
432
429
|
};
|
|
433
|
-
//#endregion
|
|
434
430
|
export { resolveTwitchAccountContext as a, normalizeToken as c, resolveDefaultTwitchAccountId as i, normalizeTwitchChannel as l, DEFAULT_ACCOUNT_ID$1 as n, twitchConfigAdapter as o, getAccountConfig as r, isAccountConfigured as s, twitchSetupPlugin as t, resolveTwitchToken as u };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"entries":[{"output":"api.js","source":"extensions/twitch/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/twitch/channel-plugin-api.ts"},{"output":"index.js","source":"extensions/twitch/index.ts"},{"output":"runtime-api.js","source":"extensions/twitch/runtime-api.ts"},{"output":"setup-entry.js","source":"extensions/twitch/setup-entry.ts"},{"output":"setup-plugin-api.js","source":"extensions/twitch/setup-plugin-api.ts"}],"chunks":[{"output":".setup/monitor-
|
|
1
|
+
{"version":3,"entries":[{"output":"api.js","source":"extensions/twitch/api.ts"},{"output":"channel-plugin-api.js","source":"extensions/twitch/channel-plugin-api.ts"},{"output":"index.js","source":"extensions/twitch/index.ts"},{"output":"runtime-api.js","source":"extensions/twitch/runtime-api.ts"},{"output":"setup-entry.js","source":"extensions/twitch/setup-entry.ts"},{"output":"setup-plugin-api.js","source":"extensions/twitch/setup-plugin-api.ts"}],"chunks":[{"output":".setup/monitor-DfA87gBg.mjs","sha256":"28bbe69f10993056749d7c92f370a2511a62a9a7666a8fb107c76c4764bab063","facadeSource":"extensions/twitch/src/monitor.ts","sources":["extensions/twitch/src/monitor.ts","extensions/twitch/src/twitch-ingress.ts"]},{"output":".setup/plugin-B2l8TCND.mjs","sha256":"5e1d7403adb3255e206948c15af4b9b2bddb507a081673615772b946670c918e","facadeSource":null,"sources":["extensions/twitch/src/client-manager-registry.ts","extensions/twitch/src/config-schema.ts","extensions/twitch/src/oauth-owner.ts","extensions/twitch/src/outbound.ts","extensions/twitch/src/plugin.ts","extensions/twitch/src/resolver.ts","extensions/twitch/src/runtime.ts","extensions/twitch/src/send.ts","extensions/twitch/src/target.ts","extensions/twitch/src/twitch-client.ts"]},{"output":".setup/setup-plugin-api-EN3PbyIC.mjs","sha256":"837b4fa3de7efa3b714647fb5ad9040341d149f1f3d8d14aee6d46131d1a92ea","facadeSource":"extensions/twitch/setup-plugin-api.ts","sources":[]},{"output":".setup/setup-surface-mdCyd7g7.mjs","sha256":"cb37314653ba1c4f98ce194c18045ed4c8b586c8c6c8bc1f3bc89beb5f0c3154","facadeSource":null,"sources":["extensions/twitch/src/config.ts","extensions/twitch/src/setup-surface.ts","extensions/twitch/src/token.ts","extensions/twitch/src/utils/twitch.ts"]},{"output":"api.js","sha256":"79b63b1f8d3f518b9d673902d59b69a5c7c38b5b9d4805f1bdd622e6327cb262","facadeSource":"extensions/twitch/api.ts","sources":[]},{"output":"channel-plugin-api.js","sha256":"19c33464582bcfddd646a89fbb4907c9bf7468a8cbf5653b2b3fc9099fb2a1d1","facadeSource":"extensions/twitch/channel-plugin-api.ts","sources":[]},{"output":"index.js","sha256":"ae12fa88716486195f5e255ab8bd0824c67979d83593c2be4f4c3a423bfc8307","facadeSource":"extensions/twitch/index.ts","sources":["extensions/twitch/index.ts"]},{"output":"runtime-api.js","sha256":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","facadeSource":"extensions/twitch/runtime-api.ts","sources":[]},{"output":"setup-entry.js","sha256":"0ffb6b00dfc6c7e3b7aef0dcbd2e1227a7e41cb6221bc9d9f39a89799e3d9fc9","facadeSource":"extensions/twitch/setup-entry.ts","sources":["extensions/twitch/setup-entry.ts"]},{"output":"setup-plugin-api.js","sha256":"dadde5bc1583d4f26e558d07d0a73da68803bfe0e8093c12da539f2768fcc854","facadeSource":"extensions/twitch/setup-plugin-api.ts","sources":[]}],"unrenderedSources":["extensions/twitch/api.ts","extensions/twitch/channel-plugin-api.ts","extensions/twitch/runtime-api.ts","extensions/twitch/setup-plugin-api.ts","extensions/twitch/src/constants.ts"]}
|
package/dist/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as setTwitchRuntime, t as twitchPlugin } from "./.setup/plugin-
|
|
1
|
+
export { a as setTwitchRuntime, t as twitchPlugin } from "./.setup/plugin-B2l8TCND.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as twitchPlugin } from "./.setup/plugin-
|
|
1
|
+
export { t as twitchPlugin } from "./.setup/plugin-B2l8TCND.mjs";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
|
-
|
|
2
|
+
// extensions/twitch/index.ts
|
|
3
3
|
var twitch_default = defineBundledChannelEntry({
|
|
4
4
|
id: "twitch",
|
|
5
5
|
name: "Twitch",
|
|
@@ -14,5 +14,4 @@ var twitch_default = defineBundledChannelEntry({
|
|
|
14
14
|
exportName: "setTwitchRuntime"
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
-
//#endregion
|
|
18
17
|
export { twitch_default as default };
|
package/dist/setup-entry.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
|
|
3
|
+
// extensions/twitch/setup-entry.ts
|
|
4
4
|
var setup_entry_default = defineBundledChannelSetupEntry({
|
|
5
5
|
importMetaUrl: import.meta.url,
|
|
6
6
|
plugin: {
|
|
7
|
-
specifier: fileURLToPath(new URL(".setup/setup-plugin-api-
|
|
7
|
+
specifier: fileURLToPath(new URL(".setup/setup-plugin-api-EN3PbyIC.mjs", import.meta.url).href),
|
|
8
8
|
exportName: "twitchSetupPlugin"
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
//#endregion
|
|
12
11
|
export { setup_entry_default as default };
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as twitchSetupPlugin } from "./.setup/setup-surface-
|
|
1
|
+
export { t as twitchSetupPlugin } from "./.setup/setup-surface-mdCyd7g7.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/twitch",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.10-beta.1",
|
|
4
4
|
"description": "OpenClaw Twitch channel plugin for chat and moderation workflows.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"minHostVersion": ">=2026.4.10"
|
|
32
32
|
},
|
|
33
33
|
"compat": {
|
|
34
|
-
"pluginApi": ">=2026.11.
|
|
34
|
+
"pluginApi": ">=2026.11.10-beta.1"
|
|
35
35
|
},
|
|
36
36
|
"build": {
|
|
37
|
-
"openclawVersion": "2026.11.
|
|
37
|
+
"openclawVersion": "2026.11.10-beta.1"
|
|
38
38
|
},
|
|
39
39
|
"channel": {
|
|
40
40
|
"id": "twitch",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"assets/activity.svg"
|
|
75
75
|
],
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"openclaw": ">=2026.11.
|
|
77
|
+
"openclaw": ">=2026.11.10-beta.1"
|
|
78
78
|
},
|
|
79
79
|
"peerDependenciesMeta": {
|
|
80
80
|
"openclaw": {
|