refactor(oidb): migrate contacts.ts OIDB cmds to namespaces

6 OIDB cmds moved; pagination + per-group cache + inflight
coalescing stay on the facade because they need cross-call state.

  - FetchFriendListPage       (0xFD4_1) — facade drives the cursor loop
  - FetchGroupList            (0xFE5_2) — uinForm; verbatim config blob
  - FetchGroupMemberListPage  (0xFE7_3) — facade drives the token loop +
                                          owns the TTL cache + inflight
                                          coalescing that keeps busy
                                          OneBot clients from tripping
                                          Tencent risk-control
  - FetchUserProfile          (0xFE1_2) — uinForm; full property-key
                                          catalogue cross-checked against
                                          LagrangeV2 FetchStrangerService.cs
  - FetchGroupRequests        (0x10C0_1/_2) — dynamic subcmd via filtered flag
  - FetchDownloadRkeys        (0x9067_202) — uinForm; respHead.retCode
                                             check moved into deserialize

35 new namespace-level tests covering serialize / deserialize edge
cases (property decoding, sex enum mapping, avatar URL suffix,
empty body handling, pagination cursor behaviour).

Verification:
  - typecheck green
  - @snowluma/bridge: 30 files / 233 tests
  - @snowluma/core: 302 tests
Wire bytes unchanged.
This commit is contained in:
DrSmoothl committed 2026-05-22 23:51:33 +08:00
1 parent 80afa31f5c
commit 014b87c7ce
14 files changed
+864 -248

No files matched your search

+24
View File
@@ -131,6 +131,30 @@
"types": "./src/oidb-services/extras/fetch-ai-voice.ts",
"default": "./src/oidb-services/extras/fetch-ai-voice.ts"
},
"./oidb-services/contacts/fetch-friend-list-page": {
"types": "./src/oidb-services/contacts/fetch-friend-list-page.ts",
"default": "./src/oidb-services/contacts/fetch-friend-list-page.ts"
},
"./oidb-services/contacts/fetch-group-list": {
"types": "./src/oidb-services/contacts/fetch-group-list.ts",
"default": "./src/oidb-services/contacts/fetch-group-list.ts"
},
"./oidb-services/contacts/fetch-group-member-list-page": {
"types": "./src/oidb-services/contacts/fetch-group-member-list-page.ts",
"default": "./src/oidb-services/contacts/fetch-group-member-list-page.ts"
},
"./oidb-services/contacts/fetch-user-profile": {
"types": "./src/oidb-services/contacts/fetch-user-profile.ts",
"default": "./src/oidb-services/contacts/fetch-user-profile.ts"
},
"./oidb-services/contacts/fetch-group-requests": {
"types": "./src/oidb-services/contacts/fetch-group-requests.ts",
"default": "./src/oidb-services/contacts/fetch-group-requests.ts"
},
"./oidb-services/contacts/fetch-download-rkeys": {
"types": "./src/oidb-services/contacts/fetch-download-rkeys.ts",
"default": "./src/oidb-services/contacts/fetch-download-rkeys.ts"
},
"./bridge-context": {
"types": "./src/bridge-context.ts",
"default": "./src/bridge-context.ts"