@openclaw/twitch 2026.11.5-beta.1 → 2026.11.5-beta.3

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.
@@ -1,5 +1,5 @@
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";
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
- // extensions/twitch/src/twitch-ingress.ts
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
- // extensions/twitch/src/monitor.ts
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-mdCyd7g7.mjs";
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
- // extensions/twitch/src/runtime.ts
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
- // extensions/twitch/src/oauth-owner.ts
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
- // extensions/twitch/src/twitch-client.ts
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
- // extensions/twitch/src/client-manager-registry.ts
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
- // extensions/twitch/src/config-schema.ts
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
- // extensions/twitch/src/send.ts
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
- // extensions/twitch/src/target.ts
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
- // extensions/twitch/src/outbound.ts
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
- // extensions/twitch/src/resolver.ts
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
- // extensions/twitch/src/plugin.ts
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-DfA87gBg.mjs");
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 };
@@ -0,0 +1,2 @@
1
+ export { t as twitchSetupPlugin } from "./setup-surface-DuCk_ZHo.mjs";
2
+ import "../setup-plugin-api.js";
@@ -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
- // extensions/twitch/src/token.ts
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
- // extensions/twitch/src/utils/twitch.ts
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
- // extensions/twitch/src/config.ts
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
- // extensions/twitch/src/setup-surface.ts
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-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"]}
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-B2l8TCND.mjs";
1
+ export { a as setTwitchRuntime, t as twitchPlugin } from "./.setup/plugin-D_NszQlS.mjs";
@@ -1 +1 @@
1
- export { t as twitchPlugin } from "./.setup/plugin-B2l8TCND.mjs";
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
- // extensions/twitch/index.ts
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 };
@@ -1,11 +1,12 @@
1
1
  import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
2
2
  import { fileURLToPath } from "node:url";
3
- // extensions/twitch/setup-entry.ts
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-EN3PbyIC.mjs", import.meta.url).href),
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 };
@@ -1 +1 @@
1
- export { t as twitchSetupPlugin } from "./.setup/setup-surface-mdCyd7g7.mjs";
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.1",
3
+ "version": "2026.11.5-beta.3",
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.1"
34
+ "pluginApi": ">=2026.11.5-beta.3"
35
35
  },
36
36
  "build": {
37
- "openclawVersion": "2026.11.5-beta.1"
37
+ "openclawVersion": "2026.11.5-beta.3"
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.1"
77
+ "openclaw": ">=2026.11.5-beta.3"
78
78
  },
79
79
  "peerDependenciesMeta": {
80
80
  "openclaw": {
@@ -1,2 +0,0 @@
1
- export { t as twitchSetupPlugin } from "./setup-surface-mdCyd7g7.mjs";
2
- import "../setup-plugin-api.js";