@openclaw/twitch 2026.10.10-beta.5 → 2026.10.33

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,4 +1,4 @@
1
- import { n as sendMessageTwitchInternal, r as getOrCreateClientManager } from "./plugin-Ds8927WG.mjs";
1
+ import { n as sendMessageTwitchInternal, r as getOrCreateClientManager } from "./plugin-CkRhClVg.mjs";
2
2
  import { l as normalizeTwitchChannel } from "./setup-surface-BHuTmMZL.mjs";
3
3
  import { t as getTwitchRuntime } from "./runtime-B5If4b0g.mjs";
4
4
  import { createChannelIngressError, createChannelIngressMonitor } from "openclaw/plugin-sdk/channel-outbound";
@@ -130,7 +130,7 @@ var TwitchClientManager = class {
130
130
  switch (level) {
131
131
  case LogLevel.CRITICAL:
132
132
  case LogLevel.ERROR:
133
- this.logger.error(message);
133
+ this.logger.error(message.startsWith("Error parsing message: ") ? "Twitch IRC message parsing failed" : message);
134
134
  break;
135
135
  case LogLevel.WARNING:
136
136
  this.logger.warn(message);
@@ -418,6 +418,31 @@ async function sendMessageTwitchInternal(params) {
418
418
  };
419
419
  }
420
420
  //#endregion
421
+ //#region extensions/twitch/src/target.ts
422
+ function parseTwitchMessagingTarget(target) {
423
+ const providerTarget = stripChannelTargetPrefix(target, "twitch", "twitch-chat");
424
+ const kindMatch = /^(user|dm|channel|group|conversation|room):/i.exec(providerTarget);
425
+ const kind = kindMatch?.[1]?.toLowerCase();
426
+ return {
427
+ channelTarget: kindMatch ? providerTarget.slice(kindMatch[0].length) : providerTarget,
428
+ isDirectMessage: kind === "user" || kind === "dm"
429
+ };
430
+ }
431
+ /**
432
+ * Normalizes a Twitch messaging target to the bare channel name used by routing
433
+ * and the chat transport. Accepts internal addresses such as
434
+ * `twitch:channel:<channel>` and their `twitch-chat:` alias. Direct-message
435
+ * targets are unsupported and normalize to an empty string.
436
+ */
437
+ function normalizeTwitchMessagingTarget(target) {
438
+ const parsed = parseTwitchMessagingTarget(target);
439
+ return parsed.isDirectMessage ? "" : normalizeTwitchChannel(parsed.channelTarget);
440
+ }
441
+ /** Direct-message/user addresses are unsupported and must not fall back to a channel. */
442
+ function isTwitchDirectMessageTarget(target) {
443
+ return parseTwitchMessagingTarget(target).isDirectMessage;
444
+ }
445
+ //#endregion
421
446
  //#region extensions/twitch/src/outbound.ts
422
447
  const twitchOutbound = {
423
448
  deliveryMode: "direct",
@@ -432,8 +457,8 @@ const twitchOutbound = {
432
457
  const trimmed = to?.trim() ?? "";
433
458
  const allowListRaw = normalizeStringEntries(allowFrom ?? []);
434
459
  const hasWildcard = allowListRaw.includes("*");
435
- const allowList = allowListRaw.filter((entry) => entry !== "*").map((entry) => normalizeTwitchChannel(entry)).filter((entry) => entry.length > 0);
436
- const normalizedTo = normalizeTwitchChannel(trimmed);
460
+ const allowList = allowListRaw.filter((entry) => entry !== "*").map((entry) => normalizeTwitchMessagingTarget(entry)).filter((entry) => entry.length > 0);
461
+ const normalizedTo = normalizeTwitchMessagingTarget(trimmed);
437
462
  if (normalizedTo && (!(mode === "implicit" || mode === "heartbeat") || hasWildcard || allowList.length === 0 || allowList.includes(normalizedTo))) return {
438
463
  ok: true,
439
464
  to: normalizedTo
@@ -448,13 +473,13 @@ const twitchOutbound = {
448
473
  if (params.signal?.aborted) throw new Error("Outbound delivery aborted");
449
474
  const { account, accountId: normalizedAccountId, availableAccountIds, configured } = resolveTwitchAccountContext(cfg, accountId);
450
475
  if (!account) throw new Error(`Twitch account not found: ${accountId ?? normalizedAccountId}. Available accounts: ${availableAccountIds.join(", ") || "none"}`);
451
- const channel = to || account.channel;
452
- if (!channel) throw new Error("No channel specified and no default channel in account config");
453
- if (!configured) throw new Error(`Account ${normalizedAccountId} is not properly configured. Required: username, clientId, and accessToken (config or env for default account).`);
454
- const deliveryChannel = normalizeTwitchChannel(channel) || account.channel;
476
+ const target = to.trim();
477
+ if (isTwitchDirectMessageTarget(target)) throw new Error("Delivering to Twitch requires target <channel-name>");
478
+ const deliveryChannel = normalizeTwitchMessagingTarget(target) || normalizeTwitchChannel(account.channel);
455
479
  if (!deliveryChannel) throw new Error("No channel specified and no default channel in account config");
480
+ if (!configured) throw new Error(`Account ${normalizedAccountId} is not properly configured. Required: username, clientId, and accessToken (config or env for default account).`);
456
481
  const result = await sendMessageTwitchInternal({
457
- channel: normalizeTwitchChannel(deliveryChannel),
482
+ channel: deliveryChannel,
458
483
  text,
459
484
  cfg,
460
485
  account,
@@ -697,14 +722,6 @@ function collectTwitchStatusIssues(accounts) {
697
722
  }
698
723
  //#endregion
699
724
  //#region extensions/twitch/src/plugin.ts
700
- function normalizeTwitchMessagingTarget(target) {
701
- const providerTarget = stripChannelTargetPrefix(target, "twitch", "twitch-chat");
702
- const kindMatch = /^(user|dm|channel|group|conversation|room):/i.exec(providerTarget);
703
- const kind = kindMatch?.[1]?.toLowerCase();
704
- if (kind === "user" || kind === "dm") return "";
705
- const channelTarget = kindMatch ? providerTarget.slice(kindMatch[0].length) : providerTarget;
706
- return normalizeTwitchChannel(channelTarget);
707
- }
708
725
  const twitchPlugin = createChatChannelPlugin({
709
726
  pairing: {
710
727
  idLabel: "twitchUserId",
@@ -819,7 +836,7 @@ const twitchPlugin = createChatChannelPlugin({
819
836
  await runPassiveAccountLifecycle({
820
837
  abortSignal: ctx.abortSignal,
821
838
  start: async () => {
822
- const { monitorTwitchProvider } = await import("./monitor-DH2GTYQv.mjs");
839
+ const { monitorTwitchProvider } = await import("./monitor-B-jILw-H.mjs");
823
840
  return monitorTwitchProvider({
824
841
  account,
825
842
  accountId,
@@ -0,0 +1,3 @@
1
+ import { t as twitchSetupPlugin } from "./setup-surface-BHuTmMZL.mjs";
2
+ import "../setup-plugin-api.js";
3
+ export { twitchSetupPlugin };
package/dist/api.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as twitchPlugin } from "./.setup/plugin-Ds8927WG.mjs";
1
+ import { t as twitchPlugin } from "./.setup/plugin-CkRhClVg.mjs";
2
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-Ds8927WG.mjs";
1
+ import { t as twitchPlugin } from "./.setup/plugin-CkRhClVg.mjs";
2
+ export { twitchPlugin };
@@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url";
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-VbVHO_SG.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
  });
@@ -1 +1,2 @@
1
- export { t as twitchSetupPlugin } from "./.setup/setup-surface-BHuTmMZL.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.10.10-beta.5",
3
+ "version": "2026.10.33",
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.10.10-beta.5"
34
+ "pluginApi": ">=2026.11.4"
35
35
  },
36
36
  "build": {
37
- "openclawVersion": "2026.10.10-beta.5"
37
+ "openclawVersion": "2026.10.33"
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.10.10-beta.5"
77
+ "openclaw": ">=2026.11.4"
78
78
  },
79
79
  "peerDependenciesMeta": {
80
80
  "openclaw": {
@@ -1,2 +0,0 @@
1
- export { t as twitchSetupPlugin } from "./setup-surface-BHuTmMZL.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-DH2GTYQv.mjs","sha256":"f1027e8a9a50730c00e352c0d0eae9c59615e1c6b19f3f36707b00702c1d4398","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-Ds8927WG.mjs","sha256":"fbd4696f95f1bfc91b7d1991559efc182c95c88dbc1c9669f42f3754d2333316","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/twitch-client.ts"]},{"output":".setup/runtime-B5If4b0g.mjs","sha256":"1482ac52cae0fbaa600d2f622bf66feec37434646264743bd3d70529f4129317","facadeSource":null,"sources":["extensions/twitch/src/runtime.ts"]},{"output":".setup/setup-plugin-api-VbVHO_SG.mjs","sha256":"01c62c46acd12ec5144b6c1aaa60122efb60606652269a6a77c785eed24bc9d5","facadeSource":"extensions/twitch/setup-plugin-api.ts","sources":[]},{"output":".setup/setup-surface-BHuTmMZL.mjs","sha256":"22d501bd048dcef00597aed0b5ed02560416d6b97fd3a5bee45560deda7971bc","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":"67c922c17abe5b12e7456e35e4caa6e3f3d7392d6d4ecf04a618321addb401ec","facadeSource":"extensions/twitch/api.ts","sources":[]},{"output":"channel-plugin-api.js","sha256":"af61b2478c49fb61db7f5e44f1ca515da17e5546176a6561b213130f5ea53a47","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":"bb76ee8b720de1462ab57f1f4651fe6adfa7e5b85af938fdb187edc6d639a827","facadeSource":"extensions/twitch/setup-entry.ts","sources":["extensions/twitch/setup-entry.ts"]},{"output":"setup-plugin-api.js","sha256":"c706977485ac4fe748e1bcfa1e2aa890b37622a2b48ddaf00b9d6aa99554f75a","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"]}