feat(onebot): implement ocr_image via OIDB 0xE07_0
Server-side image OCR ported from Lagrange.Core ([Service] "OidbSvcTrpcTcp.0xe07_0") cross-checked with NapCat's Oidb.0xE07 proto (NapCat's transformer cmd 0xEB7 is a typo; the proto name + Lagrange + the wire name all say 0xE07_0). New ImageOcr service + proto types, misc.ocrImage api, and the ocr_image/.ocr_image action. The cmd takes an image URL, so the action accepts an http(s) url or a cached image file_id (resolved via getImageInfo); base64/local input is unsupported (NapCat's path is a Windows-only kernel OCR, not portable). Wire round-trip + response-parse tests lock the pb tags.
This commit is contained in:
8 files changed
+271
-3
No files matched your search
@@ -70,6 +70,10 @@
|
||||
"./oidb-actions/media": {
|
||||
"types": "./src/oidb-actions/media.ts",
|
||||
"default": "./src/oidb-actions/media.ts"
|
||||
},
|
||||
"./oidb-actions/ocr": {
|
||||
"types": "./src/oidb-actions/ocr.ts",
|
||||
"default": "./src/oidb-actions/ocr.ts"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
Reference in new issue
Block a user