@openclaw/twitch 2026.11.1 → 2026.11.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.
@@ -1,6 +1,6 @@
1
- import { n as sendMessageTwitchInternal, r as getOrCreateClientManager } from "./plugin-DQbaBSx7.mjs";
2
- import { l as normalizeTwitchChannel } from "./setup-surface-8f7RsuJw.mjs";
3
- import { t as getTwitchRuntime } from "./runtime-DrwVh6hF.mjs";
1
+ import { n as sendMessageTwitchInternal, r as getOrCreateClientManager } from "./plugin-BoinLbED.mjs";
2
+ import { l as normalizeTwitchChannel } from "./setup-surface-BHuTmMZL.mjs";
3
+ import { t as getTwitchRuntime } from "./runtime-B5If4b0g.mjs";
4
4
  import { createChannelIngressError, createChannelIngressMonitor } from "openclaw/plugin-sdk/channel-outbound";
5
5
  import { createChannelInboundEnvelopeBuilderAsync } from "openclaw/plugin-sdk/channel-inbound";
6
6
  import { collectErrorGraphCandidates, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -8,7 +8,7 @@ import { normalizeLowercaseStringOrEmpty, normalizeNullableString } from "opencl
8
8
  import { HttpStatusCodeError } from "@twurple/api-call";
9
9
  import { resolveOutboundMediaUrls } from "openclaw/plugin-sdk/reply-payload";
10
10
  import { defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
11
- // extensions/twitch/src/access-control.ts
11
+ //#region extensions/twitch/src/access-control.ts
12
12
  const twitchUserIdentity = defineStableChannelIngressIdentity({
13
13
  key: "sender-id",
14
14
  entryIdPrefix: "twitch-user-entry"
@@ -120,7 +120,8 @@ function mentionsBot(message, botUsername) {
120
120
  while ((match = mentionRegex.exec(message)) !== null) if ((match[1] ? normalizeLowercaseStringOrEmpty(match[1]) : "") === expected) return true;
121
121
  return false;
122
122
  }
123
- // extensions/twitch/src/twitch-ingress.ts
123
+ //#endregion
124
+ //#region extensions/twitch/src/twitch-ingress.ts
124
125
  const TWITCH_INGRESS_PAYLOAD_VERSION = 1;
125
126
  const TWITCH_INGRESS_DRAIN_INTERVAL_MS = 1e3;
126
127
  const TwitchIngressPermanentError = createChannelIngressError("TwitchIngressPermanentError");
@@ -259,7 +260,8 @@ function createTwitchIngress(options) {
259
260
  }
260
261
  };
261
262
  }
262
- // extensions/twitch/src/monitor.ts
263
+ //#endregion
264
+ //#region extensions/twitch/src/monitor.ts
263
265
  async function monitorTwitchProvider(options) {
264
266
  const { account, accountId, channelRuntime, config, runtime, abortSignal, statusSink } = options;
265
267
  const core = getTwitchRuntime();
@@ -452,4 +454,5 @@ async function monitorTwitchProvider(options) {
452
454
  }, { once: true });
453
455
  return { stop };
454
456
  }
457
+ //#endregion
455
458
  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-8f7RsuJw.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-BHuTmMZL.mjs";
2
2
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
3
3
  import { MarkdownConfigSchema, buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
4
4
  import { buildChannelOutboundSessionRoute, createChatChannelPlugin, stripChannelTargetPrefix } from "openclaw/plugin-sdk/channel-core";
@@ -19,7 +19,7 @@ import { z } from "zod";
19
19
  import { runChannelProbe, withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
20
20
  import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
21
21
  import { HttpStatusCodeError, callTwitchApi } from "@twurple/api-call";
22
- // extensions/twitch/src/actions.ts
22
+ //#region extensions/twitch/src/actions.ts
23
23
  function readSendValue(value) {
24
24
  return typeof value === "string" || typeof value === "number" || typeof value === "boolean" ? String(value).trim() : void 0;
25
25
  }
@@ -35,7 +35,8 @@ const twitchMessageActions = {
35
35
  } : null;
36
36
  }
37
37
  };
38
- // extensions/twitch/src/twitch-client.ts
38
+ //#endregion
39
+ //#region extensions/twitch/src/twitch-client.ts
39
40
  const TWITCH_CHAT_AUTH_INTENTS = ["chat"];
40
41
  var TwitchClientManager = class {
41
42
  constructor(logger, statusSink) {
@@ -305,7 +306,8 @@ var TwitchClientManager = class {
305
306
  return `${account.username}:${account.channel}`;
306
307
  }
307
308
  };
308
- // extensions/twitch/src/client-manager-registry.ts
309
+ //#endregion
310
+ //#region extensions/twitch/src/client-manager-registry.ts
309
311
  const registry = /* @__PURE__ */ new Map();
310
312
  function getOrCreateClientManager(accountId, logger, statusSink) {
311
313
  const existing = registry.get(accountId);
@@ -334,7 +336,8 @@ async function removeClientManager(accountId) {
334
336
  entry.logger.info(`Unregistered client manager for account: ${accountId}`);
335
337
  }
336
338
  }
337
- // extensions/twitch/src/config-schema.ts
339
+ //#endregion
340
+ //#region extensions/twitch/src/config-schema.ts
338
341
  const TwitchRoleSchema = z.enum([
339
342
  "moderator",
340
343
  "owner",
@@ -386,7 +389,8 @@ const MultiAccountSchema = z.object({
386
389
  accounts: z.record(z.string(), TwitchAccountSchema)
387
390
  }).refine((val) => Object.keys(val.accounts).length > 0, { message: "accounts must contain at least one entry" });
388
391
  const TwitchConfigSchema = z.union([SimplifiedSchema, MultiAccountSchema]);
389
- // extensions/twitch/src/send.ts
392
+ //#endregion
393
+ //#region extensions/twitch/src/send.ts
390
394
  function createTwitchSendReceipt(messageId, channel) {
391
395
  return createMessageReceiptFromOutboundResults({
392
396
  results: messageId ? [{
@@ -413,7 +417,8 @@ async function sendMessageTwitchInternal(params) {
413
417
  receipt: createTwitchSendReceipt(messageId, params.channel)
414
418
  };
415
419
  }
416
- // extensions/twitch/src/target.ts
420
+ //#endregion
421
+ //#region extensions/twitch/src/target.ts
417
422
  function parseTwitchMessagingTarget(target) {
418
423
  const providerTarget = stripChannelTargetPrefix(target, "twitch", "twitch-chat");
419
424
  const kindMatch = /^(user|dm|channel|group|conversation|room):/i.exec(providerTarget);
@@ -437,7 +442,8 @@ function normalizeTwitchMessagingTarget(target) {
437
442
  function isTwitchDirectMessageTarget(target) {
438
443
  return parseTwitchMessagingTarget(target).isDirectMessage;
439
444
  }
440
- // extensions/twitch/src/outbound.ts
445
+ //#endregion
446
+ //#region extensions/twitch/src/outbound.ts
441
447
  const twitchOutbound = {
442
448
  deliveryMode: "direct",
443
449
  deliveryCapabilities: { durableFinal: {
@@ -502,7 +508,8 @@ const twitchMessageAdapter = createChannelMessageAdapterFromOutbound({
502
508
  id: "twitch",
503
509
  outbound: twitchOutbound
504
510
  });
505
- // extensions/twitch/src/probe.ts
511
+ //#endregion
512
+ //#region extensions/twitch/src/probe.ts
506
513
  async function probeTwitch(account, timeoutMs) {
507
514
  let client;
508
515
  try {
@@ -564,7 +571,8 @@ async function probeTwitch(account, timeoutMs) {
564
571
  } catch {}
565
572
  }
566
573
  }
567
- // extensions/twitch/src/resolver.ts
574
+ //#endregion
575
+ //#region extensions/twitch/src/resolver.ts
568
576
  const TWITCH_HELIX_USER_LOOKUP_TIMEOUT_MS = 1e4;
569
577
  function normalizeUsername(input) {
570
578
  const trimmed = input.trim();
@@ -658,7 +666,8 @@ async function resolveTwitchTargets(inputs, account, _kind, log) {
658
666
  }
659
667
  return results;
660
668
  }
661
- // extensions/twitch/src/status.ts
669
+ //#endregion
670
+ //#region extensions/twitch/src/status.ts
662
671
  function collectTwitchStatusIssues(accounts) {
663
672
  const issues = [];
664
673
  for (const entry of accounts) {
@@ -711,7 +720,8 @@ function collectTwitchStatusIssues(accounts) {
711
720
  }
712
721
  return issues;
713
722
  }
714
- // extensions/twitch/src/plugin.ts
723
+ //#endregion
724
+ //#region extensions/twitch/src/plugin.ts
715
725
  const twitchPlugin = createChatChannelPlugin({
716
726
  pairing: {
717
727
  idLabel: "twitchUserId",
@@ -826,7 +836,7 @@ const twitchPlugin = createChatChannelPlugin({
826
836
  await runPassiveAccountLifecycle({
827
837
  abortSignal: ctx.abortSignal,
828
838
  start: async () => {
829
- const { monitorTwitchProvider } = await import("./monitor-BcIEp3sb.mjs");
839
+ const { monitorTwitchProvider } = await import("./monitor-XFQjqI0k.mjs");
830
840
  return monitorTwitchProvider({
831
841
  account,
832
842
  accountId,
@@ -864,4 +874,5 @@ const twitchPlugin = createChatChannelPlugin({
864
874
  }
865
875
  }
866
876
  });
877
+ //#endregion
867
878
  export { sendMessageTwitchInternal as n, getOrCreateClientManager as r, twitchPlugin as t };
@@ -1,7 +1,8 @@
1
1
  import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
2
- // extensions/twitch/src/runtime.ts
2
+ //#region extensions/twitch/src/runtime.ts
3
3
  const { setRuntime: setTwitchRuntime, getRuntime: getTwitchRuntime } = createPluginRuntimeStore({
4
4
  pluginId: "twitch",
5
5
  errorMessage: "Twitch runtime not initialized"
6
6
  });
7
+ //#endregion
7
8
  export { setTwitchRuntime as n, getTwitchRuntime as t };
@@ -0,0 +1,3 @@
1
+ import { t as twitchSetupPlugin } from "./setup-surface-BHuTmMZL.mjs";
2
+ import "../setup-plugin-api.js";
3
+ export { twitchSetupPlugin };
@@ -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();
@@ -35,7 +35,8 @@ function resolveTwitchToken(cfg, opts = {}) {
35
35
  source: "none"
36
36
  };
37
37
  }
38
- // extensions/twitch/src/utils/twitch.ts
38
+ //#endregion
39
+ //#region extensions/twitch/src/utils/twitch.ts
39
40
  function normalizeTwitchChannel(channel) {
40
41
  const trimmed = normalizeLowercaseStringOrEmpty(channel);
41
42
  return trimmed.startsWith("#") ? trimmed.slice(1) : trimmed;
@@ -47,7 +48,8 @@ function isAccountConfigured(account, resolvedToken) {
47
48
  const token = resolvedToken ?? account.accessToken;
48
49
  return Boolean(account.username && token && account.clientId);
49
50
  }
50
- // extensions/twitch/src/config.ts
51
+ //#endregion
52
+ //#region extensions/twitch/src/config.ts
51
53
  const { listAccountIds, resolveDefaultAccountId: resolveDefaultTwitchAccountId } = createAccountListHelpers("twitch", {
52
54
  normalizeAccountId,
53
55
  fallbackAccountIdWhenEmpty: false,
@@ -128,7 +130,8 @@ const twitchConfigAdapter = {
128
130
  isConfigured: (account, cfg) => resolveTwitchAccountContext(cfg, account.accountId).configured,
129
131
  isEnabled: (account) => account?.enabled !== false
130
132
  };
131
- // extensions/twitch/src/setup-surface.ts
133
+ //#endregion
134
+ //#region extensions/twitch/src/setup-surface.ts
132
135
  const channel = "twitch";
133
136
  const t = createSetupTranslator();
134
137
  const INVALID_ACCOUNT_ID_MESSAGE = "Invalid Twitch account id";
@@ -440,4 +443,5 @@ const twitchSetupPlugin = {
440
443
  setupContract: twitchSetupContract,
441
444
  setupWizard: twitchSetupWizard
442
445
  };
446
+ //#endregion
443
447
  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 };
package/dist/api.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as twitchPlugin } from "./.setup/plugin-DQbaBSx7.mjs";
2
- import { n as setTwitchRuntime } from "./.setup/runtime-DrwVh6hF.mjs";
1
+ import { t as twitchPlugin } from "./.setup/plugin-BoinLbED.mjs";
2
+ import { n as setTwitchRuntime } from "./.setup/runtime-B5If4b0g.mjs";
3
3
  export { setTwitchRuntime, twitchPlugin };
@@ -1 +1,2 @@
1
- export { t as twitchPlugin } from "./.setup/plugin-DQbaBSx7.mjs";
1
+ import { t as twitchPlugin } from "./.setup/plugin-BoinLbED.mjs";
2
+ export { twitchPlugin };
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-DCp5heMU.mjs", import.meta.url).href),
7
+ specifier: fileURLToPath(new URL(".setup/setup-plugin-api-BC-Kt0o_.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,2 @@
1
- export { t as twitchSetupPlugin } from "./.setup/setup-surface-8f7RsuJw.mjs";
1
+ import { t as twitchSetupPlugin } from "./.setup/setup-surface-BHuTmMZL.mjs";
2
+ export { twitchSetupPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/twitch",
3
- "version": "2026.11.1",
3
+ "version": "2026.11.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.1"
34
+ "pluginApi": ">=2026.11.2"
35
35
  },
36
36
  "build": {
37
- "openclawVersion": "2026.11.1"
37
+ "openclawVersion": "2026.11.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.1"
77
+ "openclaw": ">=2026.11.2"
78
78
  },
79
79
  "peerDependenciesMeta": {
80
80
  "openclaw": {
@@ -1,2 +0,0 @@
1
- export { t as twitchSetupPlugin } from "./setup-surface-8f7RsuJw.mjs";
2
- import "../setup-plugin-api.js";
@@ -1 +0,0 @@
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-BcIEp3sb.mjs","sha256":"cb0433871a8d2e6609ef5912188bcccda34b309eeaa62893332464c60b373059","facadeSource":"extensions/twitch/src/monitor.ts","sources":["extensions/twitch/src/access-control.ts","extensions/twitch/src/monitor.ts","extensions/twitch/src/twitch-ingress.ts"]},{"output":".setup/plugin-DQbaBSx7.mjs","sha256":"2a522587b7b8d2df91908f64ac7ac32ad0b02f5fef2a5f3a771474b5b4c9f8ee","facadeSource":null,"sources":["extensions/twitch/src/actions.ts","extensions/twitch/src/client-manager-registry.ts","extensions/twitch/src/config-schema.ts","extensions/twitch/src/outbound.ts","extensions/twitch/src/plugin.ts","extensions/twitch/src/probe.ts","extensions/twitch/src/resolver.ts","extensions/twitch/src/send.ts","extensions/twitch/src/status.ts","extensions/twitch/src/target.ts","extensions/twitch/src/twitch-client.ts"]},{"output":".setup/runtime-DrwVh6hF.mjs","sha256":"3617013b885cf1d86fd26001e27a0701f88851d853668218820ece37fafaf014","facadeSource":null,"sources":["extensions/twitch/src/runtime.ts"]},{"output":".setup/setup-plugin-api-DCp5heMU.mjs","sha256":"973936c3ed15061983cb2c633ad0070a0032ca7f091d8d16c3078e6f9127da1d","facadeSource":"extensions/twitch/setup-plugin-api.ts","sources":[]},{"output":".setup/setup-surface-8f7RsuJw.mjs","sha256":"ce0a8b74b0f640a3db87f6a5ce500c93611155b2cd276e6ca492e49fc0c3e4c0","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":"b1def76ad376e836d113fc75dd07bfa081445ffb51c0fe2af7cb8bd7b51417f2","facadeSource":"extensions/twitch/api.ts","sources":[]},{"output":"channel-plugin-api.js","sha256":"677641f19ed5ef255d3c9222299eeb2c4cfd08b2f176c4e9b5e5143018db3487","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":"8d4bb618699fb5498c3df4fa7e0f1accac475b732b08c42407e3d6b07a917f23","facadeSource":"extensions/twitch/setup-entry.ts","sources":["extensions/twitch/setup-entry.ts"]},{"output":"setup-plugin-api.js","sha256":"d1d232f8767fd877552e54a815cdc1518c185f42261273780dff6abbb19a28d1","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"]}