picoclaw/pkg/channels
hsohinna 56a060ff61
feat(onebot): enhance OneBot channel (#192)
* fix: change BotStatus type to json.RawMessage and add isAPIResponse function

* feat(onebot): add rich media, API callback, keepalive and voice transcription

   Comprehensive improvements to the OneBot channel for better NapCatQQ
   compatibility:

   - Add echo-based API callback mechanism (sendAPIRequest) for
     request/response correlation via pending map
   - Add WebSocket ping/pong keepalive (30s ping, 60s read deadline)
   - Fetch bot self ID via get_login_info on connect/reconnect
   - Refactor parseMessageContentEx into parseMessageSegments supporting
     image, record, video, file, reply, face, forward segments
   - Add voice transcription via Groq transcriber (SetTranscriber)
   - Switch to message segment array format for sending with auto reply
     quote via lastMessageID tracking
   - Add message_sent event handling and detailed notice event processing
     (recall, poke, group increase/decrease, friend add, etc.)
   - Use sync/atomic for echoCounter, optimize listen() lock pattern
   - Clean up pending callbacks on Stop(), defer temp file cleanup
   - Mount Groq transcriber on OneBot channel in main.go gateway

* feat(onebot): add user ID allowlist check for incoming messages

- Currently, the agent does not respond to messages sent by users outside the allowlist.

* refactor(onebot): simplify channel implementation and add emoji reaction

- onebot.go from 1179 to 980 lines (~17%)
2026-02-19 14:39:35 +08:00
..
base.go merge: sync upstream/main into feat/multi-agent-routing 2026-02-14 10:38:04 -03:00
base_test.go style: fix gofmt formatting (CRLF -> LF) 2026-02-14 11:21:47 +09:00
dingtalk.go misc: fmt code 2026-02-13 17:51:47 +08:00
discord.go update documents 2026-02-18 21:44:25 +01:00
feishu_32.go add build constraints for feishu to support 32-bit builds 2026-02-11 20:59:25 +01:00
feishu_64.go Merge branch 'main' into architecture-32-bit 2026-02-13 21:18:34 +01:00
line.go style: fix gofmt formatting (CRLF -> LF) 2026-02-14 11:21:47 +09:00
maixcam.go Fix shadowing field runnnig 2026-02-16 00:47:17 +09:00
manager.go feat: implement structured Telegram command handling with a dedicated command service and telegohandler integration. (#164) 2026-02-16 14:20:16 +08:00
onebot.go feat(onebot): enhance OneBot channel (#192) 2026-02-19 14:39:35 +08:00
qq.go add QQ channel support 2026-02-11 00:00:53 +08:00
slack.go merge: sync upstream/main into feat/multi-agent-routing 2026-02-16 10:34:55 -03:00
slack_test.go refactor(channels): consolidate media handling and improve resource cleanup 2026-02-12 12:46:28 +08:00
telegram.go merge: sync upstream/main into feat/multi-agent-routing 2026-02-16 10:34:55 -03:00
telegram_commands.go feat: implement structured Telegram command handling with a dedicated command service and telegohandler integration. (#164) 2026-02-16 14:20:16 +08:00
whatsapp.go Remove duplicate truncate functions, reuse utils.Truncate 2026-02-12 00:46:48 +08:00