2 Commits
Author SHA1 Message Date
zy5669 aeed25daf5 feat(wps-xiezuo): support chat attachments and cloud documents (#1850)
* feat(wps-xiezuo): support chat attachments and cloud documents

* fix(wps-xiezuo-test): resolve staticcheck issues in attachment tests

* feat(wps-xiezuo): support sending files and images

* feat(wps-xiezuo): allow reply file size config

* fix(wps-xiezuo_test): fix file.close error
2026-09-20 21:01:49 +08:00
xiayuandClaude Opus 4.6 9cf496b973 feat(platform): add WPS Xiezuo native platform (#921)
* feat(wps-xiezuo): add native Go platform for WPS Xiezuo

Replace the Python bridge adapter with a native Go platform that compiles
directly into the cc-connect binary. Users only need to configure app_id and
app_secret in config.toml.

- WebSocket long connection with KSO-1 HMAC-SHA256 authentication
- AES-256-CBC event decryption with PKCS7 padding
- Event signature verification (HMAC-SHA256, base64url)
- X-Ack-Mode with writeLoop-serialized ACK responses
- Client/Server ping-pong with 90s deadline timeout
- REST API for sending messages (P2P and group)
- Emoji reaction typing indicator
- Token management (client_credentials, form-urlencoded)
- Dedup and allow_from support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropicxxxxxx.com>

* fix(wps-xiezuo): address lint errors (errcheck, unused, staticcheck)

- Check SetReadDeadline return values with _ = prefix
- Remove unused tokenRequest struct (now using url.Values)
- Replace deprecated websocket.Upgrade with websocket.Upgrader

Co-Authored-By: Claude Opus 4.6 <noreply@anthropicxxxxxx.com>

* fix(wps-xiezuo): check Stop() return value in handleGoAway

Co-Authored-By: Claude Opus 4.6 <noreply@anthropicxxxxxx.com>

* fix(wps-xiezuo): fix data race in writeLoop channel access

Pass writeCh as parameter to writeLoop instead of reading p.writeCh
directly, eliminating race between close/nil assignment in defer and
channel read in writeLoop goroutine.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropicxxxxxx.com>

* docs(wps-xiezuo): prepare native platform PR

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropicxxxxxx.com>
2026-05-18 11:12:03 +08:00