feat(onebot): expose system face catalog queries

Add read-only actions for catalog retrieval, per-face lookup, search, and super-face classification. Publish matching SDK methods and generated MCP schemas, including valid face ID zero.
This commit is contained in:
DrSmoothl committed 2026-08-04 23:13:51 +08:00
1 parent 8e9a4d878e
commit c6619fda0a
11 files changed
+1257 -3

No files matched your search

+476
View File
@@ -2030,6 +2030,147 @@
},
"category": "扩展"
},
{
"name": "fetch_face_entity",
"aliases": [],
"summary": "按编号查询 QQ 系统表情",
"returns": "表情详情;编号不存在时返回 null。",
"returnsSchema": {
"anyOf": [
{
"type": "object",
"properties": {
"q_sid": {
"type": "string",
"description": "表情编号"
},
"q_des": {
"type": "string",
"description": "表情描述"
},
"em_code": {
"type": "string"
},
"q_cid": {
"type": [
"integer",
"null"
]
},
"ani_sticker_type": {
"type": [
"integer",
"null"
]
},
"ani_sticker_pack_id": {
"type": [
"integer",
"null"
]
},
"ani_sticker_id": {
"type": [
"integer",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
},
"emoji_name_alias": {
"type": "array",
"items": {
"type": "string"
}
},
"ani_sticker_width": {
"type": [
"integer",
"null"
]
},
"ani_sticker_height": {
"type": [
"integer",
"null"
]
},
"is_super": {
"type": "boolean",
"description": "是否使用超级表情格式"
}
},
"required": [
"q_sid",
"q_des",
"em_code",
"q_cid",
"ani_sticker_type",
"ani_sticker_pack_id",
"ani_sticker_id",
"url",
"emoji_name_alias",
"ani_sticker_width",
"ani_sticker_height",
"is_super"
]
},
{
"type": "null"
}
]
},
"readOnly": true,
"params": [
{
"name": "face_id",
"type": "int",
"required": true,
"schema": {
"type": "integer",
"minimum": 0
},
"role": "face_id",
"desc": "QQ 系统表情编号"
},
{
"name": "refresh",
"type": "bool",
"required": false,
"schema": {
"type": "boolean"
},
"default": false,
"desc": "是否强制从 QQ 刷新目录"
}
],
"invariants": [],
"inputSchema": {
"type": "object",
"properties": {
"face_id": {
"type": "integer",
"minimum": 0,
"description": "QQ 系统表情编号",
"x-role": "face_id"
},
"refresh": {
"type": "boolean",
"description": "是否强制从 QQ 刷新目录",
"default": false
}
},
"required": [
"face_id"
],
"additionalProperties": true
},
"category": "系统表情"
},
{
"name": "fetch_ptt_text",
"aliases": [
@@ -2077,6 +2218,209 @@
},
"category": "扩展"
},
{
"name": "fetch_super_face_id",
"aliases": [],
"summary": "判断 QQ 系统表情是否使用超级表情格式",
"returns": "是否使用超级表情格式。",
"returnsSchema": {
"type": "object",
"properties": {
"is_super": {
"type": "boolean"
}
},
"required": [
"is_super"
]
},
"readOnly": true,
"params": [
{
"name": "face_id",
"type": "int",
"required": true,
"schema": {
"type": "integer",
"minimum": 0
},
"role": "face_id",
"desc": "QQ 系统表情编号"
},
{
"name": "refresh",
"type": "bool",
"required": false,
"schema": {
"type": "boolean"
},
"default": false,
"desc": "是否强制从 QQ 刷新目录"
}
],
"invariants": [],
"inputSchema": {
"type": "object",
"properties": {
"face_id": {
"type": "integer",
"minimum": 0,
"description": "QQ 系统表情编号",
"x-role": "face_id"
},
"refresh": {
"type": "boolean",
"description": "是否强制从 QQ 刷新目录",
"default": false
}
},
"required": [
"face_id"
],
"additionalProperties": true
},
"category": "系统表情"
},
{
"name": "fetch_sys_faces",
"aliases": [],
"summary": "获取 QQ 系统表情目录",
"returns": "按分组返回完整的 QQ 系统表情映射。",
"returnsSchema": {
"type": "object",
"properties": {
"packs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"pack_name": {
"type": "string"
},
"emojis": {
"type": "array",
"items": {
"type": "object",
"properties": {
"q_sid": {
"type": "string",
"description": "表情编号"
},
"q_des": {
"type": "string",
"description": "表情描述"
},
"em_code": {
"type": "string"
},
"q_cid": {
"type": [
"integer",
"null"
]
},
"ani_sticker_type": {
"type": [
"integer",
"null"
]
},
"ani_sticker_pack_id": {
"type": [
"integer",
"null"
]
},
"ani_sticker_id": {
"type": [
"integer",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
},
"emoji_name_alias": {
"type": "array",
"items": {
"type": "string"
}
},
"ani_sticker_width": {
"type": [
"integer",
"null"
]
},
"ani_sticker_height": {
"type": [
"integer",
"null"
]
},
"is_super": {
"type": "boolean",
"description": "是否使用超级表情格式"
}
},
"required": [
"q_sid",
"q_des",
"em_code",
"q_cid",
"ani_sticker_type",
"ani_sticker_pack_id",
"ani_sticker_id",
"url",
"emoji_name_alias",
"ani_sticker_width",
"ani_sticker_height",
"is_super"
]
}
}
},
"required": [
"pack_name",
"emojis"
]
}
}
},
"required": [
"packs"
]
},
"readOnly": true,
"params": [
{
"name": "refresh",
"type": "bool",
"required": false,
"schema": {
"type": "boolean"
},
"default": false,
"desc": "是否强制从 QQ 刷新目录"
}
],
"invariants": [],
"inputSchema": {
"type": "object",
"properties": {
"refresh": {
"type": "boolean",
"description": "是否强制从 QQ 刷新目录",
"default": false
}
},
"additionalProperties": true
},
"category": "系统表情"
},
{
"name": "forward_friend_single_msg",
"aliases": [],
@@ -7373,6 +7717,134 @@
},
"category": "扩展"
},
{
"name": "search_sys_faces",
"aliases": [],
"summary": "搜索 QQ 系统表情",
"returns": "匹配编号、名称、别名或分组名的表情列表。",
"returnsSchema": {
"type": "object",
"properties": {
"faces": {
"type": "array",
"items": {
"type": "object",
"properties": {
"q_sid": {
"type": "string",
"description": "表情编号"
},
"q_des": {
"type": "string",
"description": "表情描述"
},
"em_code": {
"type": "string"
},
"q_cid": {
"type": [
"integer",
"null"
]
},
"ani_sticker_type": {
"type": [
"integer",
"null"
]
},
"ani_sticker_pack_id": {
"type": [
"integer",
"null"
]
},
"ani_sticker_id": {
"type": [
"integer",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
},
"emoji_name_alias": {
"type": "array",
"items": {
"type": "string"
}
},
"ani_sticker_width": {
"type": [
"integer",
"null"
]
},
"ani_sticker_height": {
"type": [
"integer",
"null"
]
},
"is_super": {
"type": "boolean",
"description": "是否使用超级表情格式"
}
},
"required": [
"q_sid",
"q_des",
"em_code",
"q_cid",
"ani_sticker_type",
"ani_sticker_pack_id",
"ani_sticker_id",
"url",
"emoji_name_alias",
"ani_sticker_width",
"ani_sticker_height",
"is_super"
]
}
}
},
"required": [
"faces"
]
},
"readOnly": true,
"params": [
{
"name": "query",
"type": "string",
"required": true,
"schema": {
"type": "string",
"minLength": 1
},
"desc": "编号、名称、别名或分组名"
}
],
"invariants": [],
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"minLength": 1,
"description": "编号、名称、别名或分组名"
}
},
"required": [
"query"
],
"additionalProperties": true
},
"category": "系统表情"
},
{
"name": "send_ark_share",
"aliases": [],
@@ -11049,6 +11521,10 @@
"category": "空间",
"count": 9
},
{
"category": "系统表情",
"count": 4
},
{
"category": "流式接口",
"count": 6
+476
View File
@@ -2033,6 +2033,147 @@ export const ACTIONS: CatalogAction[] = [
},
"category": "扩展"
},
{
"name": "fetch_face_entity",
"aliases": [],
"summary": "按编号查询 QQ 系统表情",
"returns": "表情详情;编号不存在时返回 null。",
"returnsSchema": {
"anyOf": [
{
"type": "object",
"properties": {
"q_sid": {
"type": "string",
"description": "表情编号"
},
"q_des": {
"type": "string",
"description": "表情描述"
},
"em_code": {
"type": "string"
},
"q_cid": {
"type": [
"integer",
"null"
]
},
"ani_sticker_type": {
"type": [
"integer",
"null"
]
},
"ani_sticker_pack_id": {
"type": [
"integer",
"null"
]
},
"ani_sticker_id": {
"type": [
"integer",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
},
"emoji_name_alias": {
"type": "array",
"items": {
"type": "string"
}
},
"ani_sticker_width": {
"type": [
"integer",
"null"
]
},
"ani_sticker_height": {
"type": [
"integer",
"null"
]
},
"is_super": {
"type": "boolean",
"description": "是否使用超级表情格式"
}
},
"required": [
"q_sid",
"q_des",
"em_code",
"q_cid",
"ani_sticker_type",
"ani_sticker_pack_id",
"ani_sticker_id",
"url",
"emoji_name_alias",
"ani_sticker_width",
"ani_sticker_height",
"is_super"
]
},
{
"type": "null"
}
]
},
"readOnly": true,
"params": [
{
"name": "face_id",
"type": "int",
"required": true,
"schema": {
"type": "integer",
"minimum": 0
},
"role": "face_id",
"desc": "QQ 系统表情编号"
},
{
"name": "refresh",
"type": "bool",
"required": false,
"schema": {
"type": "boolean"
},
"default": false,
"desc": "是否强制从 QQ 刷新目录"
}
],
"invariants": [],
"inputSchema": {
"type": "object",
"properties": {
"face_id": {
"type": "integer",
"minimum": 0,
"description": "QQ 系统表情编号",
"x-role": "face_id"
},
"refresh": {
"type": "boolean",
"description": "是否强制从 QQ 刷新目录",
"default": false
}
},
"required": [
"face_id"
],
"additionalProperties": true
},
"category": "系统表情"
},
{
"name": "fetch_ptt_text",
"aliases": [
@@ -2080,6 +2221,209 @@ export const ACTIONS: CatalogAction[] = [
},
"category": "扩展"
},
{
"name": "fetch_super_face_id",
"aliases": [],
"summary": "判断 QQ 系统表情是否使用超级表情格式",
"returns": "是否使用超级表情格式。",
"returnsSchema": {
"type": "object",
"properties": {
"is_super": {
"type": "boolean"
}
},
"required": [
"is_super"
]
},
"readOnly": true,
"params": [
{
"name": "face_id",
"type": "int",
"required": true,
"schema": {
"type": "integer",
"minimum": 0
},
"role": "face_id",
"desc": "QQ 系统表情编号"
},
{
"name": "refresh",
"type": "bool",
"required": false,
"schema": {
"type": "boolean"
},
"default": false,
"desc": "是否强制从 QQ 刷新目录"
}
],
"invariants": [],
"inputSchema": {
"type": "object",
"properties": {
"face_id": {
"type": "integer",
"minimum": 0,
"description": "QQ 系统表情编号",
"x-role": "face_id"
},
"refresh": {
"type": "boolean",
"description": "是否强制从 QQ 刷新目录",
"default": false
}
},
"required": [
"face_id"
],
"additionalProperties": true
},
"category": "系统表情"
},
{
"name": "fetch_sys_faces",
"aliases": [],
"summary": "获取 QQ 系统表情目录",
"returns": "按分组返回完整的 QQ 系统表情映射。",
"returnsSchema": {
"type": "object",
"properties": {
"packs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"pack_name": {
"type": "string"
},
"emojis": {
"type": "array",
"items": {
"type": "object",
"properties": {
"q_sid": {
"type": "string",
"description": "表情编号"
},
"q_des": {
"type": "string",
"description": "表情描述"
},
"em_code": {
"type": "string"
},
"q_cid": {
"type": [
"integer",
"null"
]
},
"ani_sticker_type": {
"type": [
"integer",
"null"
]
},
"ani_sticker_pack_id": {
"type": [
"integer",
"null"
]
},
"ani_sticker_id": {
"type": [
"integer",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
},
"emoji_name_alias": {
"type": "array",
"items": {
"type": "string"
}
},
"ani_sticker_width": {
"type": [
"integer",
"null"
]
},
"ani_sticker_height": {
"type": [
"integer",
"null"
]
},
"is_super": {
"type": "boolean",
"description": "是否使用超级表情格式"
}
},
"required": [
"q_sid",
"q_des",
"em_code",
"q_cid",
"ani_sticker_type",
"ani_sticker_pack_id",
"ani_sticker_id",
"url",
"emoji_name_alias",
"ani_sticker_width",
"ani_sticker_height",
"is_super"
]
}
}
},
"required": [
"pack_name",
"emojis"
]
}
}
},
"required": [
"packs"
]
},
"readOnly": true,
"params": [
{
"name": "refresh",
"type": "bool",
"required": false,
"schema": {
"type": "boolean"
},
"default": false,
"desc": "是否强制从 QQ 刷新目录"
}
],
"invariants": [],
"inputSchema": {
"type": "object",
"properties": {
"refresh": {
"type": "boolean",
"description": "是否强制从 QQ 刷新目录",
"default": false
}
},
"additionalProperties": true
},
"category": "系统表情"
},
{
"name": "forward_friend_single_msg",
"aliases": [],
@@ -7376,6 +7720,134 @@ export const ACTIONS: CatalogAction[] = [
},
"category": "扩展"
},
{
"name": "search_sys_faces",
"aliases": [],
"summary": "搜索 QQ 系统表情",
"returns": "匹配编号、名称、别名或分组名的表情列表。",
"returnsSchema": {
"type": "object",
"properties": {
"faces": {
"type": "array",
"items": {
"type": "object",
"properties": {
"q_sid": {
"type": "string",
"description": "表情编号"
},
"q_des": {
"type": "string",
"description": "表情描述"
},
"em_code": {
"type": "string"
},
"q_cid": {
"type": [
"integer",
"null"
]
},
"ani_sticker_type": {
"type": [
"integer",
"null"
]
},
"ani_sticker_pack_id": {
"type": [
"integer",
"null"
]
},
"ani_sticker_id": {
"type": [
"integer",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
},
"emoji_name_alias": {
"type": "array",
"items": {
"type": "string"
}
},
"ani_sticker_width": {
"type": [
"integer",
"null"
]
},
"ani_sticker_height": {
"type": [
"integer",
"null"
]
},
"is_super": {
"type": "boolean",
"description": "是否使用超级表情格式"
}
},
"required": [
"q_sid",
"q_des",
"em_code",
"q_cid",
"ani_sticker_type",
"ani_sticker_pack_id",
"ani_sticker_id",
"url",
"emoji_name_alias",
"ani_sticker_width",
"ani_sticker_height",
"is_super"
]
}
}
},
"required": [
"faces"
]
},
"readOnly": true,
"params": [
{
"name": "query",
"type": "string",
"required": true,
"schema": {
"type": "string",
"minLength": 1
},
"desc": "编号、名称、别名或分组名"
}
],
"invariants": [],
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"minLength": 1,
"description": "编号、名称、别名或分组名"
}
},
"required": [
"query"
],
"additionalProperties": true
},
"category": "系统表情"
},
{
"name": "send_ark_share",
"aliases": [],
@@ -11053,6 +11525,10 @@ export const CATEGORIES: CatalogCategory[] = [
"category": "空间",
"count": 9
},
{
"category": "系统表情",
"count": 4
},
{
"category": "流式接口",
"count": 6