@openclaw/twitch 2026.11.5-beta.1 → 2026.11.5-beta.2
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-DfA87gBg.mjs → monitor-BStOwZKj.mjs} +6 -4
- package/dist/.setup/{plugin-B2l8TCND.mjs → plugin-D_NszQlS.mjs} +22 -12
- package/dist/.setup/setup-plugin-api-Czqbbgip.mjs +2 -0
- package/dist/.setup/{setup-surface-mdCyd7g7.mjs → setup-surface-DuCk_ZHo.mjs} +8 -4
- 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 +2 -1
- package/dist/setup-entry.js +3 -2
- package/dist/setup-plugin-api.js +1 -1
- package/package.json +4 -4
- package/dist/.setup/setup-plugin-api-EN3PbyIC.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-DuCk_ZHo.mjs";
|
|
2
|
+
import { i as getTwitchRuntime, n as sendMessageTwitchInternal, r as getOrCreateClientManager } from "./plugin-D_NszQlS.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
|
+
//#region 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,7 +112,8 @@ function createTwitchIngress(options) {
|
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region extensions/twitch/src/monitor.ts
|
|
116
117
|
const twitchUserIdentity = defineStableChannelIngressIdentity({
|
|
117
118
|
key: "sender-id",
|
|
118
119
|
entryIdPrefix: "twitch-user-entry"
|
|
@@ -363,4 +364,5 @@ async function monitorTwitchProvider(options) {
|
|
|
363
364
|
}, { once: true });
|
|
364
365
|
return { stop };
|
|
365
366
|
}
|
|
367
|
+
//#endregion
|
|
366
368
|
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-DuCk_ZHo.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,12 +25,13 @@ 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
|
+
//#region 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
|
-
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region extensions/twitch/src/oauth-owner.ts
|
|
34
35
|
const tasks = /* @__PURE__ */ new WeakMap();
|
|
35
36
|
function lineageOf(account, token) {
|
|
36
37
|
return createHash("sha256").update(JSON.stringify([
|
|
@@ -298,7 +299,8 @@ async function createManagedTwitchAuthProvider(account, token, accountId) {
|
|
|
298
299
|
}
|
|
299
300
|
};
|
|
300
301
|
}
|
|
301
|
-
|
|
302
|
+
//#endregion
|
|
303
|
+
//#region extensions/twitch/src/twitch-client.ts
|
|
302
304
|
var TwitchClientManager = class {
|
|
303
305
|
constructor(logger, statusSink) {
|
|
304
306
|
this.logger = logger;
|
|
@@ -489,7 +491,8 @@ var TwitchClientManager = class {
|
|
|
489
491
|
}
|
|
490
492
|
}
|
|
491
493
|
};
|
|
492
|
-
|
|
494
|
+
//#endregion
|
|
495
|
+
//#region extensions/twitch/src/client-manager-registry.ts
|
|
493
496
|
const registry = /* @__PURE__ */ new Map();
|
|
494
497
|
function getOrCreateClientManager(accountId, logger, statusSink) {
|
|
495
498
|
const existing = registry.get(accountId);
|
|
@@ -510,7 +513,8 @@ async function removeClientManager(accountId) {
|
|
|
510
513
|
registry.delete(accountId);
|
|
511
514
|
await manager.disconnectAll();
|
|
512
515
|
}
|
|
513
|
-
|
|
516
|
+
//#endregion
|
|
517
|
+
//#region extensions/twitch/src/config-schema.ts
|
|
514
518
|
const TwitchRoleSchema = z.enum([
|
|
515
519
|
"moderator",
|
|
516
520
|
"owner",
|
|
@@ -562,7 +566,8 @@ const MultiAccountSchema = z.object({
|
|
|
562
566
|
accounts: z.record(z.string(), TwitchAccountSchema)
|
|
563
567
|
}).refine((val) => Object.keys(val.accounts).length > 0, { message: "accounts must contain at least one entry" });
|
|
564
568
|
const TwitchConfigSchema = z.union([SimplifiedSchema, MultiAccountSchema]);
|
|
565
|
-
|
|
569
|
+
//#endregion
|
|
570
|
+
//#region extensions/twitch/src/send.ts
|
|
566
571
|
function createTwitchSendReceipt(messageId, channel) {
|
|
567
572
|
return createMessageReceiptFromOutboundResults({
|
|
568
573
|
results: messageId ? [{
|
|
@@ -589,7 +594,8 @@ async function sendMessageTwitchInternal(params) {
|
|
|
589
594
|
receipt: createTwitchSendReceipt(messageId, params.channel)
|
|
590
595
|
};
|
|
591
596
|
}
|
|
592
|
-
|
|
597
|
+
//#endregion
|
|
598
|
+
//#region extensions/twitch/src/target.ts
|
|
593
599
|
function parseTwitchMessagingTarget(target) {
|
|
594
600
|
const providerTarget = stripChannelTargetPrefix(target, "twitch", "twitch-chat");
|
|
595
601
|
const kindMatch = /^(user|dm|channel|group|conversation|room):/i.exec(providerTarget);
|
|
@@ -613,7 +619,8 @@ function normalizeTwitchMessagingTarget(target) {
|
|
|
613
619
|
function isTwitchDirectMessageTarget(target) {
|
|
614
620
|
return parseTwitchMessagingTarget(target).isDirectMessage;
|
|
615
621
|
}
|
|
616
|
-
|
|
622
|
+
//#endregion
|
|
623
|
+
//#region extensions/twitch/src/outbound.ts
|
|
617
624
|
const twitchOutbound = {
|
|
618
625
|
deliveryMode: "direct",
|
|
619
626
|
deliveryCapabilities: { durableFinal: {
|
|
@@ -677,7 +684,8 @@ const twitchMessageAdapter = createChannelMessageAdapterFromOutbound({
|
|
|
677
684
|
id: "twitch",
|
|
678
685
|
outbound: twitchOutbound
|
|
679
686
|
});
|
|
680
|
-
|
|
687
|
+
//#endregion
|
|
688
|
+
//#region extensions/twitch/src/resolver.ts
|
|
681
689
|
const TWITCH_HELIX_USER_LOOKUP_TIMEOUT_MS = 1e4;
|
|
682
690
|
async function resolveTwitchTargets(inputs, account, _kind, log) {
|
|
683
691
|
if (!account.clientId || !account.accessToken) {
|
|
@@ -765,7 +773,8 @@ async function resolveTwitchTargets(inputs, account, _kind, log) {
|
|
|
765
773
|
}
|
|
766
774
|
return results;
|
|
767
775
|
}
|
|
768
|
-
|
|
776
|
+
//#endregion
|
|
777
|
+
//#region extensions/twitch/src/plugin.ts
|
|
769
778
|
function readSendValue(value) {
|
|
770
779
|
return typeof value === "string" || typeof value === "number" || typeof value === "boolean" ? String(value).trim() : void 0;
|
|
771
780
|
}
|
|
@@ -982,7 +991,7 @@ const twitchPlugin = createChatChannelPlugin({
|
|
|
982
991
|
await runPassiveAccountLifecycle({
|
|
983
992
|
abortSignal: ctx.abortSignal,
|
|
984
993
|
start: async () => {
|
|
985
|
-
const { monitorTwitchProvider } = await import("./monitor-
|
|
994
|
+
const { monitorTwitchProvider } = await import("./monitor-BStOwZKj.mjs");
|
|
986
995
|
return monitorTwitchProvider({
|
|
987
996
|
account,
|
|
988
997
|
accountId,
|
|
@@ -1020,4 +1029,5 @@ const twitchPlugin = createChatChannelPlugin({
|
|
|
1020
1029
|
}
|
|
1021
1030
|
}
|
|
1022
1031
|
});
|
|
1032
|
+
//#endregion
|
|
1023
1033
|
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
|
+
//#region extensions/twitch/src/token.ts
|
|
10
10
|
function normalizeTwitchToken(raw) {
|
|
11
11
|
if (!raw) return;
|
|
12
12
|
const trimmed = raw.trim();
|
|
@@ -26,7 +26,8 @@ function resolveTwitchToken(cfg, accountIdInput) {
|
|
|
26
26
|
if (envToken) return { token: envToken };
|
|
27
27
|
return { token: "" };
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region extensions/twitch/src/utils/twitch.ts
|
|
30
31
|
function normalizeTwitchChannel(channel) {
|
|
31
32
|
const trimmed = normalizeLowercaseStringOrEmpty(channel);
|
|
32
33
|
return trimmed.startsWith("#") ? trimmed.slice(1) : trimmed;
|
|
@@ -38,7 +39,8 @@ function isAccountConfigured(account, resolvedToken) {
|
|
|
38
39
|
const token = resolvedToken ?? account.accessToken;
|
|
39
40
|
return Boolean(account.username && token && account.clientId);
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region extensions/twitch/src/config.ts
|
|
42
44
|
const { listAccountIds, resolveDefaultAccountId: resolveDefaultTwitchAccountId } = createAccountListHelpers("twitch", {
|
|
43
45
|
normalizeAccountId,
|
|
44
46
|
fallbackAccountIdWhenEmpty: false,
|
|
@@ -118,7 +120,8 @@ const twitchConfigAdapter = {
|
|
|
118
120
|
isConfigured: (account, cfg) => resolveTwitchAccountContext(cfg, account.accountId).configured,
|
|
119
121
|
isEnabled: (account) => account?.enabled !== false
|
|
120
122
|
};
|
|
121
|
-
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region extensions/twitch/src/setup-surface.ts
|
|
122
125
|
const channel = "twitch";
|
|
123
126
|
const t = createSetupTranslator();
|
|
124
127
|
const INVALID_ACCOUNT_ID_MESSAGE = "Invalid Twitch account id";
|
|
@@ -427,4 +430,5 @@ const twitchSetupPlugin = {
|
|
|
427
430
|
setupContract: twitchSetupContract,
|
|
428
431
|
setupWizard: twitchSetupWizard
|
|
429
432
|
};
|
|
433
|
+
//#endregion
|
|
430
434
|
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-BStOwZKj.mjs","sha256":"8f64ae037a7ee5da4158b0d63f710d2a5131aa74314faabc8566b7bc382a4137","facadeSource":"extensions/twitch/src/monitor.ts","sources":["extensions/twitch/src/monitor.ts","extensions/twitch/src/twitch-ingress.ts"]},{"output":".setup/plugin-D_NszQlS.mjs","sha256":"1d772eddf1dc22fa6ea49ec031f34c3f9a345a7fb8bfa8988be8e0df7664bed2","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-Czqbbgip.mjs","sha256":"d471b6390dee2d3ff328ac697116b6bce9427c7ea69b4faae11bdd8ed10651ad","facadeSource":"extensions/twitch/setup-plugin-api.ts","sources":[]},{"output":".setup/setup-surface-DuCk_ZHo.mjs","sha256":"33f824642cd537e09539446677e5be5bfbc2b793f19e370f53a9a1a44719ac16","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":"32083b4a8c33ce0fbd9e8746e2fd48f37dacbb1cd63cc2cbb9ff5f61dd021645","facadeSource":"extensions/twitch/api.ts","sources":[]},{"output":"channel-plugin-api.js","sha256":"ad746544a10a1ed0cc457557c52ec8d000c86f3a5ca0a24116d4886fe231d588","facadeSource":"extensions/twitch/channel-plugin-api.ts","sources":[]},{"output":"index.js","sha256":"4abcaf190b4f945d2c7547c73893858486037a13c2a40ae97a3d59688ca41527","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":"2362c29a61500c56756e77adb1b9a0c719d90c7a85731d4fbefaa49a9ac23a09","facadeSource":"extensions/twitch/setup-entry.ts","sources":["extensions/twitch/setup-entry.ts"]},{"output":"setup-plugin-api.js","sha256":"8e06c5e1fbee06c13643bda4064253b7f71e715b43e47a1a5330cef79cbe896b","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-D_NszQlS.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as twitchPlugin } from "./.setup/plugin-
|
|
1
|
+
export { t as twitchPlugin } from "./.setup/plugin-D_NszQlS.mjs";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
|
-
|
|
2
|
+
//#region extensions/twitch/index.ts
|
|
3
3
|
var twitch_default = defineBundledChannelEntry({
|
|
4
4
|
id: "twitch",
|
|
5
5
|
name: "Twitch",
|
|
@@ -14,4 +14,5 @@ var twitch_default = defineBundledChannelEntry({
|
|
|
14
14
|
exportName: "setTwitchRuntime"
|
|
15
15
|
}
|
|
16
16
|
});
|
|
17
|
+
//#endregion
|
|
17
18
|
export { twitch_default as default };
|
package/dist/setup-entry.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
|
|
3
|
+
//#region 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-Czqbbgip.mjs", import.meta.url).href),
|
|
8
8
|
exportName: "twitchSetupPlugin"
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
+
//#endregion
|
|
11
12
|
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-DuCk_ZHo.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/twitch",
|
|
3
|
-
"version": "2026.11.5-beta.
|
|
3
|
+
"version": "2026.11.5-beta.2",
|
|
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.5-beta.
|
|
34
|
+
"pluginApi": ">=2026.11.5-beta.2"
|
|
35
35
|
},
|
|
36
36
|
"build": {
|
|
37
|
-
"openclawVersion": "2026.11.5-beta.
|
|
37
|
+
"openclawVersion": "2026.11.5-beta.2"
|
|
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.5-beta.
|
|
77
|
+
"openclaw": ">=2026.11.5-beta.2"
|
|
78
78
|
},
|
|
79
79
|
"peerDependenciesMeta": {
|
|
80
80
|
"openclaw": {
|