@openclaw/twitch 2026.7.2-beta.1 → 2026.7.2-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.
- package/dist/api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{monitor-BL82UZIL.js → monitor-8jPqCs8-.js} +18 -9
- package/dist/{plugin-DG2hXX7Z.js → plugin-D1zR5fBz.js} +3 -3
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-CSxU-v0y.js → setup-surface-CxAa0pLj.js} +2 -14
- package/npm-shrinkwrap.json +2 -2
- package/package.json +4 -4
package/dist/api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as twitchPlugin } from "./plugin-
|
|
1
|
+
import { t as twitchPlugin } from "./plugin-D1zR5fBz.js";
|
|
2
2
|
export { twitchPlugin };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { n as stripMarkdownForTwitch, r as getOrCreateClientManager } from "./plugin-
|
|
1
|
+
import { n as stripMarkdownForTwitch, r as getOrCreateClientManager } from "./plugin-D1zR5fBz.js";
|
|
2
2
|
import { t as getTwitchRuntime } from "./runtime-B5If4b0g.js";
|
|
3
3
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
|
+
import { createChannelInboundEnvelopeBuilder } from "openclaw/plugin-sdk/channel-inbound";
|
|
5
6
|
import { createChannelIngressResolver, defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
6
7
|
//#region extensions/twitch/src/access-control.ts
|
|
7
8
|
const twitchUserIdentity = defineStableChannelIngressIdentity({
|
|
@@ -127,6 +128,12 @@ function mentionsBot(message, botUsername) {
|
|
|
127
128
|
//#endregion
|
|
128
129
|
//#region extensions/twitch/src/monitor.ts
|
|
129
130
|
/**
|
|
131
|
+
* Twitch message monitor - processes incoming messages and routes to agents.
|
|
132
|
+
*
|
|
133
|
+
* This monitor connects to the Twitch client manager, processes incoming messages,
|
|
134
|
+
* resolves agent routes, and handles replies.
|
|
135
|
+
*/
|
|
136
|
+
/**
|
|
130
137
|
* Process an incoming Twitch message and dispatch to agent.
|
|
131
138
|
*/
|
|
132
139
|
async function processTwitchMessage(params) {
|
|
@@ -157,11 +164,13 @@ async function processTwitchMessage(params) {
|
|
|
157
164
|
});
|
|
158
165
|
const senderId = message.userId ?? message.username;
|
|
159
166
|
const fromLabel = message.displayName ?? message.username;
|
|
160
|
-
const body =
|
|
167
|
+
const body = createChannelInboundEnvelopeBuilder({
|
|
168
|
+
cfg,
|
|
169
|
+
route
|
|
170
|
+
})({
|
|
161
171
|
channel: "Twitch",
|
|
162
172
|
from: fromLabel,
|
|
163
173
|
timestamp: input.timestamp,
|
|
164
|
-
envelope: core.channel.reply.resolveEnvelopeFormatOptions(cfg),
|
|
165
174
|
body: input.rawText
|
|
166
175
|
});
|
|
167
176
|
const ctxPayload = core.channel.inbound.buildContext({
|
|
@@ -182,6 +191,7 @@ async function processTwitchMessage(params) {
|
|
|
182
191
|
},
|
|
183
192
|
route: {
|
|
184
193
|
agentId: route.agentId,
|
|
194
|
+
dmScope: route.dmScope,
|
|
185
195
|
accountId: route.accountId,
|
|
186
196
|
routeSessionKey: route.sessionKey
|
|
187
197
|
},
|
|
@@ -193,7 +203,6 @@ async function processTwitchMessage(params) {
|
|
|
193
203
|
commandBody: input.textForCommands
|
|
194
204
|
}
|
|
195
205
|
});
|
|
196
|
-
const storePath = core.channel.session.resolveStorePath(cfg.session?.store, { agentId: route.agentId });
|
|
197
206
|
const tableMode = core.channel.text.resolveMarkdownTableMode({
|
|
198
207
|
cfg,
|
|
199
208
|
channel: "twitch",
|
|
@@ -203,12 +212,12 @@ async function processTwitchMessage(params) {
|
|
|
203
212
|
cfg,
|
|
204
213
|
channel: "twitch",
|
|
205
214
|
accountId,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
215
|
+
route: {
|
|
216
|
+
agentId: route.agentId,
|
|
217
|
+
dmScope: route.dmScope,
|
|
218
|
+
sessionKey: route.sessionKey
|
|
219
|
+
},
|
|
209
220
|
ctxPayload,
|
|
210
|
-
recordInboundSession: core.channel.session.recordInboundSession,
|
|
211
|
-
dispatchReplyWithBufferedBlockDispatcher: core.channel.reply.dispatchReplyWithBufferedBlockDispatcher,
|
|
212
221
|
delivery: {
|
|
213
222
|
durable: () => ({ to: `twitch:channel:${message.channel}` }),
|
|
214
223
|
deliver: async (payload) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getAccountConfig, c as resolveTwitchAccountContext, d as isAccountConfigured, f as missingTargetError, h as resolveTwitchToken, i as DEFAULT_ACCOUNT_ID, l as resolveTwitchSnapshotAccountId, m as normalizeTwitchChannel, o as listAccountIds, p as normalizeToken, r as twitchSetupWizard, s as resolveDefaultTwitchAccountId, t as twitchSetupAdapter, u as generateMessageId } from "./setup-surface-
|
|
1
|
+
import { a as getAccountConfig, c as resolveTwitchAccountContext, d as isAccountConfigured, f as missingTargetError, h as resolveTwitchToken, i as DEFAULT_ACCOUNT_ID, l as resolveTwitchSnapshotAccountId, m as normalizeTwitchChannel, o as listAccountIds, p as normalizeToken, r as twitchSetupWizard, s as resolveDefaultTwitchAccountId, t as twitchSetupAdapter, u as generateMessageId } from "./setup-surface-CxAa0pLj.js";
|
|
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";
|
|
@@ -374,7 +374,7 @@ async function removeClientManager(accountId) {
|
|
|
374
374
|
* @returns Plain text with markdown removed
|
|
375
375
|
*/
|
|
376
376
|
function stripMarkdownForTwitch(markdown) {
|
|
377
|
-
return markdown.replace(/!\[[^\]]*]\([^)]+\)/g, "").replace(/\[([^\]]+)]\([^)]+\)/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/__([^_]+)__/g, "$1").replace(/\*([^*]+)\*/g, "$1").replace(/_([^_]+)_/
|
|
377
|
+
return markdown.replace(/!\[[^\]]*]\([^)]+\)/g, "").replace(/\[([^\]]+)]\([^)]+\)/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/__([^_]+)__/g, "$1").replace(/\*([^*]+)\*/g, "$1").replace(/(?<![\p{L}\p{N}\p{M}])_(?!_)([^_]+)_(?![\p{L}\p{N}\p{M}])/gu, "$1").replace(/~~([^~]+)~~/g, "$1").replace(/```[\s\S]*?```/g, (block) => block.replace(/```[^\n]*\n?/g, "").replace(/```/g, "")).replace(/`([^`]+)`/g, "$1").replace(/^#{1,6}\s+/gm, "").replace(/^\s*[-*+]\s+/gm, "").replace(/^\s*\d+\.\s+/gm, "").replace(/\r/g, "").replace(/[ \t]+\n/g, "\n").replace(/\n/g, " ").replace(/[ \t]{2,}/g, " ").trim();
|
|
378
378
|
}
|
|
379
379
|
/**
|
|
380
380
|
* Simple word-boundary chunker for Twitch (500 char limit).
|
|
@@ -1403,7 +1403,7 @@ const twitchPlugin = createChatChannelPlugin({
|
|
|
1403
1403
|
await runStoppablePassiveMonitor({
|
|
1404
1404
|
abortSignal: ctx.abortSignal,
|
|
1405
1405
|
start: async () => {
|
|
1406
|
-
const { monitorTwitchProvider } = await import("./monitor-
|
|
1406
|
+
const { monitorTwitchProvider } = await import("./monitor-8jPqCs8-.js");
|
|
1407
1407
|
return monitorTwitchProvider({
|
|
1408
1408
|
account,
|
|
1409
1409
|
accountId,
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as twitchSetupPlugin } from "./setup-surface-
|
|
1
|
+
import { n as twitchSetupPlugin } from "./setup-surface-CxAa0pLj.js";
|
|
2
2
|
export { twitchSetupPlugin };
|
|
@@ -3,7 +3,7 @@ import { randomUUID } from "node:crypto";
|
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { normalizeOptionalAccountId } from "openclaw/plugin-sdk/account-id";
|
|
5
5
|
import { getChatChannelMeta } from "openclaw/plugin-sdk/core";
|
|
6
|
-
import { createSetupTranslator, formatDocsLink, normalizeAccountId as normalizeAccountId$1 } from "openclaw/plugin-sdk/setup";
|
|
6
|
+
import { createSetupTranslator, formatDocsLink, normalizeAccountId as normalizeAccountId$1, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup";
|
|
7
7
|
//#region extensions/twitch/src/token.ts
|
|
8
8
|
/**
|
|
9
9
|
* Twitch access token resolution with environment variable support.
|
|
@@ -480,19 +480,7 @@ const twitchSetupWizard = {
|
|
|
480
480
|
},
|
|
481
481
|
dmPolicy: twitchDmPolicy,
|
|
482
482
|
groupAccess: twitchGroupAccess,
|
|
483
|
-
disable: (cfg) =>
|
|
484
|
-
const twitch = cfg.channels?.twitch;
|
|
485
|
-
return {
|
|
486
|
-
...cfg,
|
|
487
|
-
channels: {
|
|
488
|
-
...cfg.channels,
|
|
489
|
-
twitch: {
|
|
490
|
-
...twitch,
|
|
491
|
-
enabled: false
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
};
|
|
495
|
-
}
|
|
483
|
+
disable: (cfg) => setSetupChannelEnabled(cfg, channel, false)
|
|
496
484
|
};
|
|
497
485
|
const twitchSetupPlugin = {
|
|
498
486
|
id: channel,
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/twitch",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/twitch",
|
|
9
|
-
"version": "2026.7.2-beta.
|
|
9
|
+
"version": "2026.7.2-beta.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@twurple/api-call": "8.1.4",
|
|
12
12
|
"@twurple/auth": "8.1.4",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/twitch",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.3",
|
|
4
4
|
"description": "OpenClaw Twitch channel plugin for chat and moderation workflows.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"minHostVersion": ">=2026.4.10"
|
|
25
25
|
},
|
|
26
26
|
"compat": {
|
|
27
|
-
"pluginApi": ">=2026.7.2-beta.
|
|
27
|
+
"pluginApi": ">=2026.7.2-beta.3"
|
|
28
28
|
},
|
|
29
29
|
"build": {
|
|
30
|
-
"openclawVersion": "2026.7.2-beta.
|
|
30
|
+
"openclawVersion": "2026.7.2-beta.3"
|
|
31
31
|
},
|
|
32
32
|
"channel": {
|
|
33
33
|
"id": "twitch",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"README.md"
|
|
56
56
|
],
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"openclaw": ">=2026.7.2-beta.
|
|
58
|
+
"openclaw": ">=2026.7.2-beta.3"
|
|
59
59
|
},
|
|
60
60
|
"peerDependenciesMeta": {
|
|
61
61
|
"openclaw": {
|