@openclaw/twitch 2026.7.1 → 2026.7.2-beta.1
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-DuF1m2_8.js → monitor-BL82UZIL.js} +6 -8
- package/dist/{plugin-C5o3rImF.js → plugin-DG2hXX7Z.js} +51 -31
- package/npm-shrinkwrap.json +3 -36
- package/package.json +6 -6
- package/node_modules/@twurple/api/LICENSE +0 -21
- package/node_modules/@twurple/api/README.md +0 -24
- package/node_modules/@twurple/api/lib/client/ApiClient.d.ts +0 -98
- package/node_modules/@twurple/api/lib/client/ApiClient.js +0 -107
- package/node_modules/@twurple/api/lib/client/BaseApiClient.d.ts +0 -167
- package/node_modules/@twurple/api/lib/client/BaseApiClient.js +0 -446
- package/node_modules/@twurple/api/lib/client/ContextApiCallOptions.d.ts +0 -21
- package/node_modules/@twurple/api/lib/client/ContextApiCallOptions.js +0 -1
- package/node_modules/@twurple/api/lib/client/NoContextApiClient.d.ts +0 -5
- package/node_modules/@twurple/api/lib/client/NoContextApiClient.js +0 -14
- package/node_modules/@twurple/api/lib/client/UserContextApiClient.d.ts +0 -6
- package/node_modules/@twurple/api/lib/client/UserContextApiClient.js +0 -20
- package/node_modules/@twurple/api/lib/endpoints/BaseApi.d.ts +0 -4
- package/node_modules/@twurple/api/lib/endpoints/BaseApi.js +0 -17
- package/node_modules/@twurple/api/lib/endpoints/bits/CheermoteDisplayInfo.d.ts +0 -48
- package/node_modules/@twurple/api/lib/endpoints/bits/CheermoteDisplayInfo.js +0 -1
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsApi.d.ts +0 -38
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsApi.js +0 -61
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsLeaderboard.d.ts +0 -17
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsLeaderboard.js +0 -39
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsLeaderboardEntry.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsLeaderboardEntry.js +0 -57
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixCheermoteList.d.ts +0 -23
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixCheermoteList.js +0 -44
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixAdSchedule.d.ts +0 -35
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixAdSchedule.js +0 -50
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannel.d.ts +0 -64
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannel.js +0 -103
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelApi.d.ts +0 -185
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelApi.js +0 -371
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelEditor.d.ts +0 -25
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelEditor.js +0 -45
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelFollower.d.ts +0 -29
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelFollower.js +0 -51
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelReference.d.ts +0 -43
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelReference.js +0 -71
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixFollowedChannel.d.ts +0 -29
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixFollowedChannel.js +0 -51
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixSnoozeNextAdResult.d.ts +0 -20
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixSnoozeNextAdResult.js +0 -29
- package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixChannelPointsApi.d.ts +0 -117
- package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixChannelPointsApi.js +0 -228
- package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixCustomReward.d.ts +0 -94
- package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixCustomReward.js +0 -152
- package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixCustomRewardRedemption.d.ts +0 -88
- package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixCustomRewardRedemption.js +0 -138
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityApi.d.ts +0 -39
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityApi.js +0 -66
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaign.d.ts +0 -54
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaign.js +0 -88
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaignAmount.d.ts +0 -29
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaignAmount.js +0 -40
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaignDonation.d.ts +0 -34
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaignDonation.js +0 -58
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChannelEmote.d.ts +0 -31
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChannelEmote.js +0 -49
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatApi.d.ts +0 -224
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatApi.js +0 -446
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatBadgeSet.d.ts +0 -23
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatBadgeSet.js +0 -37
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatBadgeVersion.d.ts +0 -35
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatBadgeVersion.js +0 -49
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatChatter.d.ts +0 -25
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatChatter.js +0 -45
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatSettings.d.ts +0 -45
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatSettings.js +0 -64
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmote.d.ts +0 -14
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmote.js +0 -20
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmoteBase.d.ts +0 -48
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmoteBase.js +0 -68
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmoteFromSet.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmoteFromSet.js +0 -67
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixPrivilegedChatSettings.d.ts +0 -17
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixPrivilegedChatSettings.js +0 -26
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixSentChatMessage.d.ts +0 -24
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixSentChatMessage.js +0 -35
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixSharedChatSession.d.ts +0 -34
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixSharedChatSession.js +0 -58
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixSharedChatSessionParticipant.d.ts +0 -17
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixSharedChatSessionParticipant.js +0 -33
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixUserEmote.d.ts +0 -37
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixUserEmote.js +0 -58
- package/node_modules/@twurple/api/lib/endpoints/clip/HelixClip.d.ts +0 -98
- package/node_modules/@twurple/api/lib/endpoints/clip/HelixClip.js +0 -152
- package/node_modules/@twurple/api/lib/endpoints/clip/HelixClipApi.d.ts +0 -99
- package/node_modules/@twurple/api/lib/endpoints/clip/HelixClipApi.js +0 -192
- package/node_modules/@twurple/api/lib/endpoints/contentClassificationLabels/HelixContentClassificationLabel.d.ts +0 -20
- package/node_modules/@twurple/api/lib/endpoints/contentClassificationLabels/HelixContentClassificationLabel.js +0 -24
- package/node_modules/@twurple/api/lib/endpoints/contentClassificationLabels/HelixContentClassificationLabelApi.d.ts +0 -25
- package/node_modules/@twurple/api/lib/endpoints/contentClassificationLabels/HelixContentClassificationLabelApi.js +0 -38
- package/node_modules/@twurple/api/lib/endpoints/entitlements/HelixDropsEntitlement.d.ts +0 -46
- package/node_modules/@twurple/api/lib/endpoints/entitlements/HelixDropsEntitlement.js +0 -75
- package/node_modules/@twurple/api/lib/endpoints/entitlements/HelixEntitlementApi.d.ts +0 -68
- package/node_modules/@twurple/api/lib/endpoints/entitlements/HelixEntitlementApi.js +0 -122
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubApi.d.ts +0 -780
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubApi.js +0 -1150
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubConduit.d.ts +0 -32
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubConduit.js +0 -53
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubConduitShard.d.ts +0 -20
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubConduitShard.js +0 -29
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubSubscription.d.ts +0 -44
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubSubscription.js +0 -80
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixPaginatedEventSubSubscriptionsRequest.d.ts +0 -20
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixPaginatedEventSubSubscriptionsRequest.js +0 -40
- package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionBitsProduct.d.ts +0 -32
- package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionBitsProduct.js +0 -48
- package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionTransaction.d.ts +0 -69
- package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionTransaction.js +0 -111
- package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionsApi.d.ts +0 -84
- package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionsApi.js +0 -143
- package/node_modules/@twurple/api/lib/endpoints/game/HelixGame.d.ts +0 -47
- package/node_modules/@twurple/api/lib/endpoints/game/HelixGame.js +0 -71
- package/node_modules/@twurple/api/lib/endpoints/game/HelixGameApi.d.ts +0 -89
- package/node_modules/@twurple/api/lib/endpoints/game/HelixGameApi.js +0 -162
- package/node_modules/@twurple/api/lib/endpoints/goals/HelixGoal.d.ts +0 -49
- package/node_modules/@twurple/api/lib/endpoints/goals/HelixGoal.js +0 -81
- package/node_modules/@twurple/api/lib/endpoints/goals/HelixGoalApi.d.ts +0 -20
- package/node_modules/@twurple/api/lib/endpoints/goals/HelixGoalApi.js +0 -34
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrain.d.ts +0 -70
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrain.js +0 -112
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainAllTimeHigh.d.ts +0 -20
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainAllTimeHigh.js +0 -29
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainApi.d.ts +0 -26
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainApi.js +0 -37
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainContribution.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainContribution.js +0 -57
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainSharedParticipant.d.ts +0 -25
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainSharedParticipant.js +0 -45
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainStatus.d.ts +0 -22
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainStatus.js +0 -41
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixAutoModSettings.d.ts +0 -52
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixAutoModSettings.js +0 -77
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixAutoModStatus.d.ts +0 -16
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixAutoModStatus.js +0 -23
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBan.d.ts +0 -29
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBan.js +0 -48
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBanUser.d.ts +0 -35
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBanUser.js +0 -64
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBlockedTerm.d.ts +0 -37
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBlockedTerm.js +0 -54
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModeratedChannel.d.ts +0 -30
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModeratedChannel.js +0 -51
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModerationApi.d.ts +0 -281
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModerationApi.js +0 -580
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModerator.d.ts +0 -25
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModerator.js +0 -45
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixShieldModeStatus.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixShieldModeStatus.js +0 -57
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixUnbanRequest.d.ts +0 -83
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixUnbanRequest.js +0 -131
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixWarning.d.ts +0 -37
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixWarning.js +0 -63
- package/node_modules/@twurple/api/lib/endpoints/poll/HelixPoll.d.ts +0 -62
- package/node_modules/@twurple/api/lib/endpoints/poll/HelixPoll.js +0 -100
- package/node_modules/@twurple/api/lib/endpoints/poll/HelixPollApi.d.ts +0 -71
- package/node_modules/@twurple/api/lib/endpoints/poll/HelixPollApi.js +0 -130
- package/node_modules/@twurple/api/lib/endpoints/poll/HelixPollChoice.d.ts +0 -24
- package/node_modules/@twurple/api/lib/endpoints/poll/HelixPollChoice.js +0 -35
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPrediction.d.ts +0 -66
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPrediction.js +0 -115
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictionApi.d.ts +0 -86
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictionApi.js +0 -151
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictionOutcome.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictionOutcome.js +0 -58
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictor.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictor.js +0 -57
- package/node_modules/@twurple/api/lib/endpoints/raids/HelixRaid.d.ts +0 -16
- package/node_modules/@twurple/api/lib/endpoints/raids/HelixRaid.js +0 -23
- package/node_modules/@twurple/api/lib/endpoints/raids/HelixRaidApi.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/raids/HelixRaidApi.js +0 -58
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixPaginatedScheduleSegmentRequest.d.ts +0 -9
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixPaginatedScheduleSegmentRequest.js +0 -31
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixSchedule.d.ts +0 -38
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixSchedule.js +0 -66
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixScheduleApi.d.ts +0 -95
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixScheduleApi.js +0 -171
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixScheduleSegment.d.ts +0 -45
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixScheduleSegment.js +0 -76
- package/node_modules/@twurple/api/lib/endpoints/search/HelixChannelSearchResult.d.ts +0 -58
- package/node_modules/@twurple/api/lib/endpoints/search/HelixChannelSearchResult.js +0 -95
- package/node_modules/@twurple/api/lib/endpoints/search/HelixSearchApi.d.ts +0 -59
- package/node_modules/@twurple/api/lib/endpoints/search/HelixSearchApi.js +0 -94
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStream.d.ts +0 -88
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStream.js +0 -137
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamApi.d.ts +0 -140
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamApi.js +0 -303
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamMarker.d.ts +0 -24
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamMarker.js +0 -45
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamMarkerWithVideo.d.ts +0 -23
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamMarkerWithVideo.js +0 -38
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixPaginatedSubscriptionsRequest.d.ts +0 -16
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixPaginatedSubscriptionsRequest.js +0 -34
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixSubscription.d.ts +0 -58
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixSubscription.js +0 -88
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixSubscriptionApi.d.ts +0 -66
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixSubscriptionApi.js +0 -119
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixUserSubscription.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixUserSubscription.js +0 -57
- package/node_modules/@twurple/api/lib/endpoints/team/HelixTeam.d.ts +0 -51
- package/node_modules/@twurple/api/lib/endpoints/team/HelixTeam.js +0 -84
- package/node_modules/@twurple/api/lib/endpoints/team/HelixTeamApi.d.ts +0 -43
- package/node_modules/@twurple/api/lib/endpoints/team/HelixTeamApi.js +0 -92
- package/node_modules/@twurple/api/lib/endpoints/team/HelixTeamWithUsers.d.ts +0 -14
- package/node_modules/@twurple/api/lib/endpoints/team/HelixTeamWithUsers.js +0 -21
- package/node_modules/@twurple/api/lib/endpoints/user/HelixFollow.d.ts +0 -45
- package/node_modules/@twurple/api/lib/endpoints/user/HelixFollow.js +0 -76
- package/node_modules/@twurple/api/lib/endpoints/user/HelixPrivilegedUser.d.ts +0 -19
- package/node_modules/@twurple/api/lib/endpoints/user/HelixPrivilegedUser.js +0 -28
- package/node_modules/@twurple/api/lib/endpoints/user/HelixUser.d.ts +0 -134
- package/node_modules/@twurple/api/lib/endpoints/user/HelixUser.js +0 -183
- package/node_modules/@twurple/api/lib/endpoints/user/HelixUserApi.d.ts +0 -137
- package/node_modules/@twurple/api/lib/endpoints/user/HelixUserApi.js +0 -280
- package/node_modules/@twurple/api/lib/endpoints/user/HelixUserBlock.d.ts +0 -25
- package/node_modules/@twurple/api/lib/endpoints/user/HelixUserBlock.js +0 -45
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixBaseExtension.d.ts +0 -18
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixBaseExtension.js +0 -22
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixInstalledExtension.d.ts +0 -20
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixInstalledExtension.js +0 -34
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixInstalledExtensionList.d.ts +0 -14
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixInstalledExtensionList.js +0 -26
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixUserExtension.d.ts +0 -18
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixUserExtension.js +0 -26
- package/node_modules/@twurple/api/lib/endpoints/video/HelixVideo.d.ts +0 -105
- package/node_modules/@twurple/api/lib/endpoints/video/HelixVideo.js +0 -195
- package/node_modules/@twurple/api/lib/endpoints/video/HelixVideoApi.d.ts +0 -85
- package/node_modules/@twurple/api/lib/endpoints/video/HelixVideoApi.js +0 -162
- package/node_modules/@twurple/api/lib/endpoints/whisper/HelixWhisperApi.d.ts +0 -36
- package/node_modules/@twurple/api/lib/endpoints/whisper/HelixWhisperApi.js +0 -53
- package/node_modules/@twurple/api/lib/errors/ChatMessageDroppedError.d.ts +0 -10
- package/node_modules/@twurple/api/lib/errors/ChatMessageDroppedError.js +0 -14
- package/node_modules/@twurple/api/lib/errors/ConfigError.d.ts +0 -7
- package/node_modules/@twurple/api/lib/errors/ConfigError.js +0 -6
- package/node_modules/@twurple/api/lib/errors/StreamNotLiveError.d.ts +0 -9
- package/node_modules/@twurple/api/lib/errors/StreamNotLiveError.js +0 -10
- package/node_modules/@twurple/api/lib/index.d.ts +0 -151
- package/node_modules/@twurple/api/lib/index.js +0 -111
- package/node_modules/@twurple/api/lib/interfaces/endpoints/bits.external.d.ts +0 -43
- package/node_modules/@twurple/api/lib/interfaces/endpoints/bits.external.js +0 -10
- package/node_modules/@twurple/api/lib/interfaces/endpoints/bits.input.d.ts +0 -30
- package/node_modules/@twurple/api/lib/interfaces/endpoints/bits.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channel.external.d.ts +0 -58
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channel.external.js +0 -42
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channel.input.d.ts +0 -39
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channel.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channelPoints.external.d.ts +0 -74
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channelPoints.external.js +0 -60
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channelPoints.input.d.ts +0 -78
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channelPoints.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/charity.external.d.ts +0 -28
- package/node_modules/@twurple/api/lib/interfaces/endpoints/charity.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/chat.external.d.ts +0 -114
- package/node_modules/@twurple/api/lib/interfaces/endpoints/chat.external.js +0 -52
- package/node_modules/@twurple/api/lib/interfaces/endpoints/chat.input.d.ts +0 -93
- package/node_modules/@twurple/api/lib/interfaces/endpoints/chat.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/clip.external.d.ts +0 -28
- package/node_modules/@twurple/api/lib/interfaces/endpoints/clip.external.js +0 -33
- package/node_modules/@twurple/api/lib/interfaces/endpoints/clip.input.d.ts +0 -85
- package/node_modules/@twurple/api/lib/interfaces/endpoints/clip.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/contentClassificationLabels.external.d.ts +0 -7
- package/node_modules/@twurple/api/lib/interfaces/endpoints/contentClassificationLabels.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/entitlement.external.d.ts +0 -24
- package/node_modules/@twurple/api/lib/interfaces/endpoints/entitlement.external.js +0 -17
- package/node_modules/@twurple/api/lib/interfaces/endpoints/entitlement.input.d.ts +0 -26
- package/node_modules/@twurple/api/lib/interfaces/endpoints/entitlement.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/eventSub.external.d.ts +0 -88
- package/node_modules/@twurple/api/lib/interfaces/endpoints/eventSub.external.js +0 -54
- package/node_modules/@twurple/api/lib/interfaces/endpoints/eventSub.input.d.ts +0 -66
- package/node_modules/@twurple/api/lib/interfaces/endpoints/eventSub.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/extensions.external.d.ts +0 -42
- package/node_modules/@twurple/api/lib/interfaces/endpoints/extensions.external.js +0 -28
- package/node_modules/@twurple/api/lib/interfaces/endpoints/extensions.input.d.ts +0 -47
- package/node_modules/@twurple/api/lib/interfaces/endpoints/extensions.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/game.external.d.ts +0 -8
- package/node_modules/@twurple/api/lib/interfaces/endpoints/game.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/generic.external.d.ts +0 -20
- package/node_modules/@twurple/api/lib/interfaces/endpoints/generic.external.js +0 -32
- package/node_modules/@twurple/api/lib/interfaces/endpoints/goal.external.d.ts +0 -14
- package/node_modules/@twurple/api/lib/interfaces/endpoints/goal.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/hypeTrain.external.d.ts +0 -52
- package/node_modules/@twurple/api/lib/interfaces/endpoints/hypeTrain.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/moderation.external.d.ts +0 -96
- package/node_modules/@twurple/api/lib/interfaces/endpoints/moderation.external.js +0 -81
- package/node_modules/@twurple/api/lib/interfaces/endpoints/moderation.input.d.ts +0 -65
- package/node_modules/@twurple/api/lib/interfaces/endpoints/moderation.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/poll.external.d.ts +0 -29
- package/node_modules/@twurple/api/lib/interfaces/endpoints/poll.external.js +0 -20
- package/node_modules/@twurple/api/lib/interfaces/endpoints/poll.input.d.ts +0 -22
- package/node_modules/@twurple/api/lib/interfaces/endpoints/poll.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/prediction.external.d.ts +0 -38
- package/node_modules/@twurple/api/lib/interfaces/endpoints/prediction.external.js +0 -19
- package/node_modules/@twurple/api/lib/interfaces/endpoints/prediction.input.d.ts +0 -18
- package/node_modules/@twurple/api/lib/interfaces/endpoints/prediction.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/raid.external.d.ts +0 -6
- package/node_modules/@twurple/api/lib/interfaces/endpoints/raid.external.js +0 -8
- package/node_modules/@twurple/api/lib/interfaces/endpoints/schedule.external.d.ts +0 -36
- package/node_modules/@twurple/api/lib/interfaces/endpoints/schedule.external.js +0 -54
- package/node_modules/@twurple/api/lib/interfaces/endpoints/schedule.input.d.ts +0 -125
- package/node_modules/@twurple/api/lib/interfaces/endpoints/schedule.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/search.external.d.ts +0 -15
- package/node_modules/@twurple/api/lib/interfaces/endpoints/search.external.js +0 -7
- package/node_modules/@twurple/api/lib/interfaces/endpoints/search.input.d.ts +0 -14
- package/node_modules/@twurple/api/lib/interfaces/endpoints/search.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/shared-chat-session.external.d.ts +0 -13
- package/node_modules/@twurple/api/lib/interfaces/endpoints/shared-chat-session.external.js +0 -7
- package/node_modules/@twurple/api/lib/interfaces/endpoints/stream.external.d.ts +0 -52
- package/node_modules/@twurple/api/lib/interfaces/endpoints/stream.external.js +0 -24
- package/node_modules/@twurple/api/lib/interfaces/endpoints/stream.input.d.ts +0 -33
- package/node_modules/@twurple/api/lib/interfaces/endpoints/stream.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/subscription.external.d.ts +0 -25
- package/node_modules/@twurple/api/lib/interfaces/endpoints/subscription.external.js +0 -8
- package/node_modules/@twurple/api/lib/interfaces/endpoints/subscription.input.d.ts +0 -12
- package/node_modules/@twurple/api/lib/interfaces/endpoints/subscription.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/team.external.d.ts +0 -18
- package/node_modules/@twurple/api/lib/interfaces/endpoints/team.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/user.external.d.ts +0 -41
- package/node_modules/@twurple/api/lib/interfaces/endpoints/user.external.js +0 -15
- package/node_modules/@twurple/api/lib/interfaces/endpoints/user.input.d.ts +0 -20
- package/node_modules/@twurple/api/lib/interfaces/endpoints/user.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/userExtension.external.d.ts +0 -34
- package/node_modules/@twurple/api/lib/interfaces/endpoints/userExtension.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/userExtension.input.d.ts +0 -48
- package/node_modules/@twurple/api/lib/interfaces/endpoints/userExtension.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/video.external.d.ts +0 -38
- package/node_modules/@twurple/api/lib/interfaces/endpoints/video.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/video.input.d.ts +0 -29
- package/node_modules/@twurple/api/lib/interfaces/endpoints/video.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/whisper.external.d.ts +0 -2
- package/node_modules/@twurple/api/lib/interfaces/endpoints/whisper.external.js +0 -8
- package/node_modules/@twurple/api/lib/relations/HelixUserRelation.d.ts +0 -25
- package/node_modules/@twurple/api/lib/relations/HelixUserRelation.js +0 -45
- package/node_modules/@twurple/api/lib/reporting/ApiReportedRequest.d.ts +0 -22
- package/node_modules/@twurple/api/lib/reporting/ApiReportedRequest.js +0 -32
- package/node_modules/@twurple/api/lib/utils/HelixRateLimiter.d.ts +0 -2
- package/node_modules/@twurple/api/lib/utils/HelixRateLimiter.js +0 -23
- package/node_modules/@twurple/api/lib/utils/HelixRequestBatcher.d.ts +0 -2
- package/node_modules/@twurple/api/lib/utils/HelixRequestBatcher.js +0 -95
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedRequest.d.ts +0 -49
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedRequest.js +0 -140
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedRequestWithTotal.d.ts +0 -13
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedRequestWithTotal.js +0 -22
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedResult.d.ts +0 -31
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedResult.js +0 -19
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPagination.d.ts +0 -25
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPagination.js +0 -8
- package/node_modules/@twurple/api/package.json +0 -60
- package/node_modules/retry/License +0 -21
- package/node_modules/retry/README.md +0 -227
- package/node_modules/retry/example/dns.js +0 -31
- package/node_modules/retry/example/stop.js +0 -40
- package/node_modules/retry/index.js +0 -1
- package/node_modules/retry/lib/retry.js +0 -100
- package/node_modules/retry/lib/retry_operation.js +0 -162
- package/node_modules/retry/package.json +0 -36
package/dist/api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as twitchPlugin } from "./plugin-
|
|
1
|
+
import { t as twitchPlugin } from "./plugin-DG2hXX7Z.js";
|
|
2
2
|
export { twitchPlugin };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as stripMarkdownForTwitch, r as getOrCreateClientManager } from "./plugin-
|
|
1
|
+
import { n as stripMarkdownForTwitch, r as getOrCreateClientManager } from "./plugin-DG2hXX7Z.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";
|
|
@@ -244,22 +244,20 @@ async function processTwitchMessage(params) {
|
|
|
244
244
|
async function deliverTwitchReply(params) {
|
|
245
245
|
const { payload, channel, account, accountId, config, runtime } = params;
|
|
246
246
|
try {
|
|
247
|
-
const
|
|
247
|
+
const clientManager = getOrCreateClientManager(accountId, {
|
|
248
248
|
info: (msg) => runtime.log?.(msg),
|
|
249
249
|
warn: (msg) => runtime.log?.(msg),
|
|
250
250
|
error: (msg) => runtime.error?.(msg),
|
|
251
251
|
debug: (msg) => runtime.log?.(msg)
|
|
252
|
-
})
|
|
253
|
-
if (!client) {
|
|
254
|
-
runtime.error?.(`No client available for sending reply`);
|
|
255
|
-
return { visibleReplySent: false };
|
|
256
|
-
}
|
|
252
|
+
});
|
|
257
253
|
if (!payload.text) {
|
|
258
254
|
runtime.error?.(`No text to send in reply payload`);
|
|
259
255
|
return { visibleReplySent: false };
|
|
260
256
|
}
|
|
261
257
|
const textToSend = stripMarkdownForTwitch(payload.text);
|
|
262
|
-
|
|
258
|
+
if (!textToSend) return { visibleReplySent: false };
|
|
259
|
+
const result = await clientManager.sendMessage(account, channel, textToSend, config, accountId);
|
|
260
|
+
if (!result.ok) throw new Error(result.error ?? "Send failed");
|
|
263
261
|
return { visibleReplySent: true };
|
|
264
262
|
} catch (err) {
|
|
265
263
|
runtime.error?.(`Failed to send reply: ${String(err)}`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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-CSxU-v0y.js";
|
|
2
2
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
3
|
-
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
3
|
+
import { MarkdownConfigSchema, buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
4
4
|
import { buildChannelOutboundSessionRoute, createChatChannelPlugin, stripChannelTargetPrefix } from "openclaw/plugin-sdk/channel-core";
|
|
5
5
|
import { createLoggedPairingApprovalNotifier, createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
|
|
6
6
|
import { buildPassiveProbedChannelStatusSummary, runStoppablePassiveMonitor } from "openclaw/plugin-sdk/extension-shared";
|
|
@@ -8,12 +8,12 @@ import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState }
|
|
|
8
8
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
9
9
|
import { normalizeLowercaseStringOrEmpty, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
10
10
|
import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter } from "openclaw/plugin-sdk/channel-outbound";
|
|
11
|
+
import { chunkTextForOutbound, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
11
12
|
import { RefreshingAuthProvider, StaticAuthProvider } from "@twurple/auth";
|
|
12
13
|
import { ChatClient, LogLevel } from "@twurple/chat";
|
|
13
|
-
import { sliceUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
14
|
-
import { MarkdownConfigSchema } from "openclaw/plugin-sdk/channel-config-primitives";
|
|
14
|
+
import { sliceUtf16Safe, withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
15
15
|
import { z } from "zod";
|
|
16
|
-
import {
|
|
16
|
+
import { HttpStatusCodeError, callTwitchApi } from "@twurple/api-call";
|
|
17
17
|
//#region extensions/twitch/src/twitch-client.ts
|
|
18
18
|
const TWITCH_CHAT_AUTH_INTENTS = ["chat"];
|
|
19
19
|
/**
|
|
@@ -268,7 +268,7 @@ var TwitchClientManager = class {
|
|
|
268
268
|
try {
|
|
269
269
|
const client = await this.getClient(account, cfg, accountId);
|
|
270
270
|
const messageId = crypto.randomUUID();
|
|
271
|
-
await client.say(channel,
|
|
271
|
+
for (const chunk of chunkTextForOutbound(message, 500)) await client.say(channel, chunk);
|
|
272
272
|
return {
|
|
273
273
|
ok: true,
|
|
274
274
|
messageId
|
|
@@ -387,23 +387,7 @@ function stripMarkdownForTwitch(markdown) {
|
|
|
387
387
|
function chunkTextForTwitch(text, limit) {
|
|
388
388
|
const cleaned = stripMarkdownForTwitch(text);
|
|
389
389
|
if (!cleaned) return [];
|
|
390
|
-
|
|
391
|
-
if (cleaned.length <= limit) return [cleaned];
|
|
392
|
-
const chunks = [];
|
|
393
|
-
let remaining = cleaned;
|
|
394
|
-
while (remaining.length > limit) {
|
|
395
|
-
const window = remaining.slice(0, limit);
|
|
396
|
-
const lastSpaceIndex = window.lastIndexOf(" ");
|
|
397
|
-
if (lastSpaceIndex === -1) {
|
|
398
|
-
chunks.push(window);
|
|
399
|
-
remaining = remaining.slice(limit);
|
|
400
|
-
} else {
|
|
401
|
-
chunks.push(window.slice(0, lastSpaceIndex));
|
|
402
|
-
remaining = remaining.slice(lastSpaceIndex + 1);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
if (remaining) chunks.push(remaining);
|
|
406
|
-
return chunks;
|
|
390
|
+
return chunkTextForOutbound(cleaned, limit);
|
|
407
391
|
}
|
|
408
392
|
//#endregion
|
|
409
393
|
//#region extensions/twitch/src/send.ts
|
|
@@ -569,6 +553,8 @@ const twitchOutbound = {
|
|
|
569
553
|
} },
|
|
570
554
|
/** Twitch chat message limit is 500 characters */
|
|
571
555
|
textChunkLimit: 500,
|
|
556
|
+
/** Strip internal assistant tool-trace scaffolding before delivery */
|
|
557
|
+
sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text),
|
|
572
558
|
/** Word-boundary chunker with markdown stripping */
|
|
573
559
|
chunker: chunkTextForTwitch,
|
|
574
560
|
/**
|
|
@@ -1025,6 +1011,7 @@ async function probeTwitch(account, timeoutMs) {
|
|
|
1025
1011
|
* This module implements the ChannelResolverAdapter interface to resolve
|
|
1026
1012
|
* Twitch usernames to user IDs via the Twitch Helix API.
|
|
1027
1013
|
*/
|
|
1014
|
+
const TWITCH_HELIX_USER_LOOKUP_TIMEOUT_MS = 1e4;
|
|
1028
1015
|
/**
|
|
1029
1016
|
* Normalize a Twitch username - strip @ prefix and convert to lowercase
|
|
1030
1017
|
*/
|
|
@@ -1044,6 +1031,39 @@ function createLogger(logger) {
|
|
|
1044
1031
|
debug: (msg) => logger?.debug?.(msg) ?? (() => {})
|
|
1045
1032
|
};
|
|
1046
1033
|
}
|
|
1034
|
+
function createHelixUserResolver(clientId, accessToken) {
|
|
1035
|
+
let tokenValidated = false;
|
|
1036
|
+
return async (query) => {
|
|
1037
|
+
const controller = new AbortController();
|
|
1038
|
+
const fetchOptions = { signal: controller.signal };
|
|
1039
|
+
const request = (async () => {
|
|
1040
|
+
if (!tokenValidated) {
|
|
1041
|
+
let tokenInfo;
|
|
1042
|
+
try {
|
|
1043
|
+
tokenInfo = await callTwitchApi({
|
|
1044
|
+
type: "auth",
|
|
1045
|
+
url: "validate"
|
|
1046
|
+
}, clientId, accessToken, void 0, fetchOptions);
|
|
1047
|
+
} catch (error) {
|
|
1048
|
+
if (error instanceof HttpStatusCodeError && error.statusCode === 401) throw new Error("Invalid token supplied", { cause: error });
|
|
1049
|
+
throw error;
|
|
1050
|
+
}
|
|
1051
|
+
if (!tokenInfo.user_id) throw new Error("Trying to use an app access token as a user access token");
|
|
1052
|
+
tokenValidated = true;
|
|
1053
|
+
}
|
|
1054
|
+
return (await callTwitchApi({
|
|
1055
|
+
type: "helix",
|
|
1056
|
+
url: "users",
|
|
1057
|
+
query
|
|
1058
|
+
}, clientId, accessToken, void 0, fetchOptions)).data[0] ?? null;
|
|
1059
|
+
})();
|
|
1060
|
+
try {
|
|
1061
|
+
return await withTimeout(request, TWITCH_HELIX_USER_LOOKUP_TIMEOUT_MS, "Twitch Helix user lookup");
|
|
1062
|
+
} finally {
|
|
1063
|
+
controller.abort();
|
|
1064
|
+
}
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1047
1067
|
/**
|
|
1048
1068
|
* Resolve Twitch usernames to user IDs via the Helix API
|
|
1049
1069
|
*
|
|
@@ -1064,7 +1084,7 @@ async function resolveTwitchTargets(inputs, account, _kind, logger) {
|
|
|
1064
1084
|
}));
|
|
1065
1085
|
}
|
|
1066
1086
|
const normalizedToken = normalizeToken(account.accessToken);
|
|
1067
|
-
const
|
|
1087
|
+
const resolveHelixUser = createHelixUserResolver(account.clientId, normalizedToken);
|
|
1068
1088
|
const results = [];
|
|
1069
1089
|
for (const input of inputs) {
|
|
1070
1090
|
const normalized = normalizeUsername(input);
|
|
@@ -1079,15 +1099,15 @@ async function resolveTwitchTargets(inputs, account, _kind, logger) {
|
|
|
1079
1099
|
const looksLikeUserId = /^\d+$/.test(normalized);
|
|
1080
1100
|
try {
|
|
1081
1101
|
if (looksLikeUserId) {
|
|
1082
|
-
const user = await
|
|
1102
|
+
const user = await resolveHelixUser({ id: normalized });
|
|
1083
1103
|
if (user) {
|
|
1084
1104
|
results.push({
|
|
1085
1105
|
input,
|
|
1086
1106
|
resolved: true,
|
|
1087
1107
|
id: user.id,
|
|
1088
|
-
name: user.
|
|
1108
|
+
name: user.login
|
|
1089
1109
|
});
|
|
1090
|
-
log.debug?.(`Resolved user ID ${normalized} -> ${user.
|
|
1110
|
+
log.debug?.(`Resolved user ID ${normalized} -> ${user.login}`);
|
|
1091
1111
|
} else {
|
|
1092
1112
|
results.push({
|
|
1093
1113
|
input,
|
|
@@ -1097,16 +1117,16 @@ async function resolveTwitchTargets(inputs, account, _kind, logger) {
|
|
|
1097
1117
|
log.warn(`User ID ${normalized} not found`);
|
|
1098
1118
|
}
|
|
1099
1119
|
} else {
|
|
1100
|
-
const user = await
|
|
1120
|
+
const user = await resolveHelixUser({ login: normalized });
|
|
1101
1121
|
if (user) {
|
|
1102
1122
|
results.push({
|
|
1103
1123
|
input,
|
|
1104
1124
|
resolved: true,
|
|
1105
1125
|
id: user.id,
|
|
1106
|
-
name: user.
|
|
1107
|
-
note: user.
|
|
1126
|
+
name: user.login,
|
|
1127
|
+
note: user.display_name !== user.login ? `display: ${user.display_name}` : void 0
|
|
1108
1128
|
});
|
|
1109
|
-
log.debug?.(`Resolved username ${normalized} -> ${user.id} (${user.
|
|
1129
|
+
log.debug?.(`Resolved username ${normalized} -> ${user.id} (${user.login})`);
|
|
1110
1130
|
} else {
|
|
1111
1131
|
results.push({
|
|
1112
1132
|
input,
|
|
@@ -1383,7 +1403,7 @@ const twitchPlugin = createChatChannelPlugin({
|
|
|
1383
1403
|
await runStoppablePassiveMonitor({
|
|
1384
1404
|
abortSignal: ctx.abortSignal,
|
|
1385
1405
|
start: async () => {
|
|
1386
|
-
const { monitorTwitchProvider } = await import("./monitor-
|
|
1406
|
+
const { monitorTwitchProvider } = await import("./monitor-BL82UZIL.js");
|
|
1387
1407
|
return monitorTwitchProvider({
|
|
1388
1408
|
account,
|
|
1389
1409
|
accountId,
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/twitch",
|
|
3
|
-
"version": "2026.7.1",
|
|
3
|
+
"version": "2026.7.2-beta.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/twitch",
|
|
9
|
-
"version": "2026.7.1",
|
|
9
|
+
"version": "2026.7.2-beta.1",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@twurple/api": "8.1.4",
|
|
11
|
+
"@twurple/api-call": "8.1.4",
|
|
12
12
|
"@twurple/auth": "8.1.4",
|
|
13
13
|
"@twurple/chat": "8.1.4",
|
|
14
14
|
"zod": "4.4.3"
|
|
@@ -125,30 +125,6 @@
|
|
|
125
125
|
"url": "https://github.com/sponsors/d-fischer"
|
|
126
126
|
}
|
|
127
127
|
},
|
|
128
|
-
"node_modules/@twurple/api": {
|
|
129
|
-
"version": "8.1.4",
|
|
130
|
-
"resolved": "https://registry.npmjs.org/@twurple/api/-/api-8.1.4.tgz",
|
|
131
|
-
"integrity": "sha512-UA2eg5lyZRB0w55NjGvdhSmWPyIBaOthFKGPjg3L/jCQVYnY/FcmUuPipe2Op9U4Ej99c29cdjsmTSQI7P7Vqg==",
|
|
132
|
-
"license": "MIT",
|
|
133
|
-
"dependencies": {
|
|
134
|
-
"@d-fischer/cache-decorators": "^4.0.0",
|
|
135
|
-
"@d-fischer/detect-node": "^3.0.1",
|
|
136
|
-
"@d-fischer/logger": "^4.2.1",
|
|
137
|
-
"@d-fischer/rate-limiter": "^1.1.0",
|
|
138
|
-
"@d-fischer/shared-utils": "^3.6.1",
|
|
139
|
-
"@d-fischer/typed-event-emitter": "^3.3.3",
|
|
140
|
-
"@twurple/api-call": "8.1.4",
|
|
141
|
-
"@twurple/common": "8.1.4",
|
|
142
|
-
"retry": "^0.13.1",
|
|
143
|
-
"tslib": "^2.0.3"
|
|
144
|
-
},
|
|
145
|
-
"funding": {
|
|
146
|
-
"url": "https://github.com/sponsors/d-fischer"
|
|
147
|
-
},
|
|
148
|
-
"peerDependencies": {
|
|
149
|
-
"@twurple/auth": "8.1.4"
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
128
|
"node_modules/@twurple/api-call": {
|
|
153
129
|
"version": "8.1.4",
|
|
154
130
|
"resolved": "https://registry.npmjs.org/@twurple/api-call/-/api-call-8.1.4.tgz",
|
|
@@ -277,15 +253,6 @@
|
|
|
277
253
|
"node": ">= 8"
|
|
278
254
|
}
|
|
279
255
|
},
|
|
280
|
-
"node_modules/retry": {
|
|
281
|
-
"version": "0.13.1",
|
|
282
|
-
"resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",
|
|
283
|
-
"integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==",
|
|
284
|
-
"license": "MIT",
|
|
285
|
-
"engines": {
|
|
286
|
-
"node": ">= 4"
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
256
|
"node_modules/tslib": {
|
|
290
257
|
"version": "2.8.1",
|
|
291
258
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/twitch",
|
|
3
|
-
"version": "2026.7.1",
|
|
3
|
+
"version": "2026.7.2-beta.1",
|
|
4
4
|
"description": "OpenClaw Twitch channel plugin for chat and moderation workflows.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@twurple/api": "8.1.4",
|
|
11
|
+
"@twurple/api-call": "8.1.4",
|
|
12
12
|
"@twurple/auth": "8.1.4",
|
|
13
13
|
"@twurple/chat": "8.1.4",
|
|
14
14
|
"zod": "4.4.3"
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"minHostVersion": ">=2026.4.10"
|
|
25
25
|
},
|
|
26
26
|
"compat": {
|
|
27
|
-
"pluginApi": ">=2026.7.1"
|
|
27
|
+
"pluginApi": ">=2026.7.2-beta.1"
|
|
28
28
|
},
|
|
29
29
|
"build": {
|
|
30
|
-
"openclawVersion": "2026.7.1"
|
|
30
|
+
"openclawVersion": "2026.7.2-beta.1"
|
|
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.1"
|
|
58
|
+
"openclaw": ">=2026.7.2-beta.1"
|
|
59
59
|
},
|
|
60
60
|
"peerDependenciesMeta": {
|
|
61
61
|
"openclaw": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"bundledDependencies": [
|
|
66
|
-
"@twurple/api",
|
|
66
|
+
"@twurple/api-call",
|
|
67
67
|
"@twurple/auth",
|
|
68
68
|
"@twurple/chat",
|
|
69
69
|
"zod"
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017-2023 Daniel Fischer
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Twurple - API
|
|
2
|
-
|
|
3
|
-
[](https://github.com/twurple/twurple/blob/main/LICENSE)
|
|
4
|
-
[](https://www.npmjs.com/package/@twurple/api)
|
|
5
|
-

|
|
6
|
-
|
|
7
|
-
Interact with Twitch's API.
|
|
8
|
-
|
|
9
|
-
## Installation
|
|
10
|
-
|
|
11
|
-
npm install @twurple/auth @twurple/api
|
|
12
|
-
# or
|
|
13
|
-
yarn add @twurple/auth @twurple/api
|
|
14
|
-
# or
|
|
15
|
-
pnpm install @twurple/auth @twurple/api
|
|
16
|
-
|
|
17
|
-
## Documentation
|
|
18
|
-
|
|
19
|
-
A good place to start with this library is the [documentation](https://twurple.js.org)
|
|
20
|
-
which also includes a complete reference of all classes and interfaces, as well as changes and deprecations between major versions.
|
|
21
|
-
|
|
22
|
-
## If you're getting stuck...
|
|
23
|
-
|
|
24
|
-
You can join the [Twitch API Libraries Discord Server](https://discord.gg/b9ZqMfz) and ask in `#twurple` for support.
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { type LoggerOptions } from '@d-fischer/logger';
|
|
2
|
-
import { type TwitchApiCallFetchOptions } from '@twurple/api-call';
|
|
3
|
-
import { type AuthProvider } from '@twurple/auth';
|
|
4
|
-
import { type UserIdResolvable } from '@twurple/common';
|
|
5
|
-
import { BaseApiClient } from './BaseApiClient.js';
|
|
6
|
-
import { type ContextApiCallOptions } from './ContextApiCallOptions.js';
|
|
7
|
-
/**
|
|
8
|
-
* Configuration for an {@link ApiClient} instance.
|
|
9
|
-
*/
|
|
10
|
-
export interface ApiConfig {
|
|
11
|
-
/**
|
|
12
|
-
* An authentication provider that supplies tokens to the client.
|
|
13
|
-
*
|
|
14
|
-
* For more information, see the {@link AuthProvider} documentation.
|
|
15
|
-
*/
|
|
16
|
-
authProvider: AuthProvider;
|
|
17
|
-
/**
|
|
18
|
-
* Additional options to pass to the fetch method.
|
|
19
|
-
*/
|
|
20
|
-
fetchOptions?: TwitchApiCallFetchOptions;
|
|
21
|
-
/**
|
|
22
|
-
* Options to pass to the logger.
|
|
23
|
-
*/
|
|
24
|
-
logger?: Partial<LoggerOptions>;
|
|
25
|
-
/**
|
|
26
|
-
* The time that should be waited before a batch is executed, in milliseconds.
|
|
27
|
-
*
|
|
28
|
-
* Defaults to 0 (executes immediately after all synchronous tasks are finished).
|
|
29
|
-
*/
|
|
30
|
-
batchDelay?: number;
|
|
31
|
-
}
|
|
32
|
-
/** @private */
|
|
33
|
-
export interface TwitchApiCallOptionsInternal {
|
|
34
|
-
options: ContextApiCallOptions;
|
|
35
|
-
clientId?: string;
|
|
36
|
-
userId?: string;
|
|
37
|
-
accessToken?: string;
|
|
38
|
-
authorizationType?: string;
|
|
39
|
-
fetchOptions?: TwitchApiCallFetchOptions;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* An API client for the Twitch Helix API and other miscellaneous endpoints.
|
|
43
|
-
*
|
|
44
|
-
* @meta category main
|
|
45
|
-
* @hideProtected
|
|
46
|
-
*/
|
|
47
|
-
export declare class ApiClient extends BaseApiClient {
|
|
48
|
-
/**
|
|
49
|
-
* Creates a new API client instance.
|
|
50
|
-
*
|
|
51
|
-
* @param config Configuration for the client instance.
|
|
52
|
-
*/
|
|
53
|
-
constructor(config: ApiConfig);
|
|
54
|
-
/**
|
|
55
|
-
* Creates a contextualized ApiClient that can be used to call the API in the context of a given user.
|
|
56
|
-
*
|
|
57
|
-
* @param user The user to use as context.
|
|
58
|
-
* @param runner The callback to execute.
|
|
59
|
-
*
|
|
60
|
-
* A parameter is passed that should be used in place of the normal `ApiClient`
|
|
61
|
-
* to ensure that all requests are executed in the given user's context.
|
|
62
|
-
*
|
|
63
|
-
* Please note that requests which require scope authorization ignore this context.
|
|
64
|
-
*
|
|
65
|
-
* The return value of your callback will be propagated to the return value of this method.
|
|
66
|
-
*/
|
|
67
|
-
asUser<T>(user: UserIdResolvable, runner: (ctx: BaseApiClient) => Promise<T>): Promise<T>;
|
|
68
|
-
/**
|
|
69
|
-
* Creates a contextualized ApiClient that can be used to call the API in the context of a given intent.
|
|
70
|
-
*
|
|
71
|
-
* @param intents A list of intents. The first one that is found in your auth provider will be used.
|
|
72
|
-
* @param runner The callback to execute.
|
|
73
|
-
*
|
|
74
|
-
* A parameter is passed that should be used in place of the normal `ApiClient`
|
|
75
|
-
* to ensure that all requests are executed in the given user's context.
|
|
76
|
-
*
|
|
77
|
-
* Please note that requests which require scope authorization ignore this context.
|
|
78
|
-
*
|
|
79
|
-
* The return value of your callback will be propagated to the return value of this method.
|
|
80
|
-
*/
|
|
81
|
-
asIntent<T>(intents: string[], runner: (ctx: BaseApiClient) => Promise<T>): Promise<T>;
|
|
82
|
-
/**
|
|
83
|
-
* Creates a contextualized ApiClient that can be used to call the API without the context of any user.
|
|
84
|
-
*
|
|
85
|
-
* This usually means that an app access token is used.
|
|
86
|
-
*
|
|
87
|
-
* @param runner The callback to execute.
|
|
88
|
-
*
|
|
89
|
-
* A parameter is passed that should be used in place of the normal `ApiClient`
|
|
90
|
-
* to ensure that all requests are executed without user context.
|
|
91
|
-
*
|
|
92
|
-
* Please note that requests which require scope authorization ignore this context erasure.
|
|
93
|
-
*
|
|
94
|
-
* The return value of your callback will be propagated to the return value of this method.
|
|
95
|
-
*/
|
|
96
|
-
withoutUser<T>(runner: (ctx: BaseApiClient) => Promise<T>): Promise<T>;
|
|
97
|
-
}
|
|
98
|
-
//# sourceMappingURL=ApiClient.d.ts.map
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { isNode } from '@d-fischer/detect-node';
|
|
3
|
-
import { createLogger } from '@d-fischer/logger';
|
|
4
|
-
import { PartitionedRateLimiter, PartitionedTimeBasedRateLimiter } from '@d-fischer/rate-limiter';
|
|
5
|
-
import { callTwitchApiRaw } from '@twurple/api-call';
|
|
6
|
-
import { extractUserId, rtfm } from '@twurple/common';
|
|
7
|
-
import { ConfigError } from '../errors/ConfigError.js';
|
|
8
|
-
import { HelixRateLimiter } from '../utils/HelixRateLimiter.js';
|
|
9
|
-
import { BaseApiClient } from './BaseApiClient.js';
|
|
10
|
-
import { NoContextApiClient } from './NoContextApiClient.js';
|
|
11
|
-
import { UserContextApiClient } from './UserContextApiClient.js';
|
|
12
|
-
/**
|
|
13
|
-
* An API client for the Twitch Helix API and other miscellaneous endpoints.
|
|
14
|
-
*
|
|
15
|
-
* @meta category main
|
|
16
|
-
* @hideProtected
|
|
17
|
-
*/
|
|
18
|
-
let ApiClient = class ApiClient extends BaseApiClient {
|
|
19
|
-
/**
|
|
20
|
-
* Creates a new API client instance.
|
|
21
|
-
*
|
|
22
|
-
* @param config Configuration for the client instance.
|
|
23
|
-
*/
|
|
24
|
-
constructor(config) {
|
|
25
|
-
if (!config.authProvider) {
|
|
26
|
-
throw new ConfigError('No auth provider given. Please supply the `authProvider` option.');
|
|
27
|
-
}
|
|
28
|
-
const rateLimitLoggerOptions = { name: 'twurple:api:rate-limiter', ...config.logger };
|
|
29
|
-
super(config, createLogger({ name: 'twurple:api:client', ...config.logger }), isNode
|
|
30
|
-
? new PartitionedRateLimiter({
|
|
31
|
-
getPartitionKey: req => req.userId ?? null,
|
|
32
|
-
createChild: () => new HelixRateLimiter({ logger: rateLimitLoggerOptions }),
|
|
33
|
-
})
|
|
34
|
-
: new PartitionedTimeBasedRateLimiter({
|
|
35
|
-
logger: rateLimitLoggerOptions,
|
|
36
|
-
bucketSize: 800,
|
|
37
|
-
timeFrame: 64000,
|
|
38
|
-
doRequest: async ({ options, clientId, accessToken, authorizationType, fetchOptions, }) => await callTwitchApiRaw(options, clientId, accessToken, authorizationType, fetchOptions),
|
|
39
|
-
getPartitionKey: req => req.userId ?? null,
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Creates a contextualized ApiClient that can be used to call the API in the context of a given user.
|
|
44
|
-
*
|
|
45
|
-
* @param user The user to use as context.
|
|
46
|
-
* @param runner The callback to execute.
|
|
47
|
-
*
|
|
48
|
-
* A parameter is passed that should be used in place of the normal `ApiClient`
|
|
49
|
-
* to ensure that all requests are executed in the given user's context.
|
|
50
|
-
*
|
|
51
|
-
* Please note that requests which require scope authorization ignore this context.
|
|
52
|
-
*
|
|
53
|
-
* The return value of your callback will be propagated to the return value of this method.
|
|
54
|
-
*/
|
|
55
|
-
async asUser(user, runner) {
|
|
56
|
-
const ctx = new UserContextApiClient(this._config, this._logger, this._rateLimiter, extractUserId(user));
|
|
57
|
-
return await runner(ctx);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Creates a contextualized ApiClient that can be used to call the API in the context of a given intent.
|
|
61
|
-
*
|
|
62
|
-
* @param intents A list of intents. The first one that is found in your auth provider will be used.
|
|
63
|
-
* @param runner The callback to execute.
|
|
64
|
-
*
|
|
65
|
-
* A parameter is passed that should be used in place of the normal `ApiClient`
|
|
66
|
-
* to ensure that all requests are executed in the given user's context.
|
|
67
|
-
*
|
|
68
|
-
* Please note that requests which require scope authorization ignore this context.
|
|
69
|
-
*
|
|
70
|
-
* The return value of your callback will be propagated to the return value of this method.
|
|
71
|
-
*/
|
|
72
|
-
async asIntent(intents, runner) {
|
|
73
|
-
if (!this._authProvider.getAccessTokenForIntent) {
|
|
74
|
-
throw new Error('Trying to use intents with an auth provider that does not support them');
|
|
75
|
-
}
|
|
76
|
-
for (const intent of intents) {
|
|
77
|
-
const user = await this._authProvider.getAccessTokenForIntent(intent);
|
|
78
|
-
if (user) {
|
|
79
|
-
const ctx = new UserContextApiClient(this._config, this._logger, this._rateLimiter, user.userId);
|
|
80
|
-
return await runner(ctx);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
throw new Error(`Intents [${intents.join(', ')}] not found in auth provider`);
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Creates a contextualized ApiClient that can be used to call the API without the context of any user.
|
|
87
|
-
*
|
|
88
|
-
* This usually means that an app access token is used.
|
|
89
|
-
*
|
|
90
|
-
* @param runner The callback to execute.
|
|
91
|
-
*
|
|
92
|
-
* A parameter is passed that should be used in place of the normal `ApiClient`
|
|
93
|
-
* to ensure that all requests are executed without user context.
|
|
94
|
-
*
|
|
95
|
-
* Please note that requests which require scope authorization ignore this context erasure.
|
|
96
|
-
*
|
|
97
|
-
* The return value of your callback will be propagated to the return value of this method.
|
|
98
|
-
*/
|
|
99
|
-
async withoutUser(runner) {
|
|
100
|
-
const ctx = new NoContextApiClient(this._config, this._logger, this._rateLimiter);
|
|
101
|
-
return await runner(ctx);
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
ApiClient = __decorate([
|
|
105
|
-
rtfm('api', 'ApiClient')
|
|
106
|
-
], ApiClient);
|
|
107
|
-
export { ApiClient };
|