feat: Twitch Plugin (#1612)

* wip

* copy polugin files

* wip type changes

* refactor: improve Twitch plugin code quality and fix all tests

- Extract client manager registry for centralized lifecycle management
- Refactor to use early returns and reduce mutations
- Fix status check logic for clientId detection
- Add comprehensive test coverage for new modules
- Remove tests for unimplemented features (index.test.ts, resolver.test.ts)
- Fix mock setup issues in test suite (149 tests now passing)
- Improve error handling with errorResponse helper in actions.ts
- Normalize token handling to eliminate duplication

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* use accountId

* delete md file

* delte tsconfig

* adjust log level

* fix probe logic

* format

* fix monitor

* code review fixes

* format

* no mutation

* less mutation

* chain debug log

* await authProvider setup

* use uuid

* use spread

* fix tests

* update docs and remove bot channel fallback

* more readme fixes

* remove comments + fromat

* fix tests

* adjust access control logic

* format

* install

* simplify config object

* remove duplicate log tags + log received messages

* update docs

* update tests

* format

* strip markdown in monitor

* remove strip markdown config, enabled by default

* default requireMention to true

* fix store path arg

* fix multi account id + add unit test

* fix multi account id + add unit test

* make channel required and update docs

* remove whisper functionality

* remove duplicate connect log

* update docs with convert twitch link

* make twitch message processing non blocking

* schema consistent casing

* remove noisy ignore log

* use coreLogger

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
jaydenfyi
2026-01-27 03:48:10 +08:00
committed by GitHub
parent c5ffc11df5
commit f5c90f0e5c
38 changed files with 6558 additions and 8 deletions

View File

@@ -0,0 +1,20 @@
{
"name": "@clawdbot/twitch",
"version": "2026.1.23",
"description": "Clawdbot Twitch channel plugin",
"type": "module",
"dependencies": {
"@twurple/api": "^8.0.3",
"@twurple/auth": "^8.0.3",
"@twurple/chat": "^8.0.3",
"zod": "^4.3.5"
},
"devDependencies": {
"clawdbot": "workspace:*"
},
"clawdbot": {
"extensions": [
"./index.ts"
]
}
}