Feat: 发送图文ark卡片 (#355)

* feat(onebot): implement send tuwen ark

* test: add unit tests for send_ark action

* test(onebot): update canonical action docs count expectation to 191

* refactor(protocol,onebot): update 0xdc2_34 ark implementation and test coverage

- Rename action send_ark -> send_tuwen_ark to distinguish from structmsg and contact-share arks.
- Clarify SSO command mapping (OidbSvcTrpcTcp.0xdc2_34) and default param behavior in comments/docs.
- Adjust peerType, field3, and previewUrl to pb_optional to preserve 0/empty values during proton encoding.
- Update OneBot handler, tests, and auto-generated MCP tool catalog specs.

* style(protocol): fix indentation in rich-body-decoder tests
This commit is contained in:
H3CoF6 authored and GitHub committed 2026-08-20 12:12:39 +08:00
1 parent 62256ee816
commit 8fbddf67bf
11 files changed
+734 -137

No files matched your search

+114
View File
@@ -9434,6 +9434,120 @@
},
"category": "空间"
},
{
"name": "send_tuwen_ark",
"aliases": [],
"summary": "发送图文 Ark 卡片(私聊/群聊)",
"returns": "null",
"returnsSchema": {
"type": "null"
},
"readOnly": false,
"params": [
{
"name": "user_id",
"type": "uint",
"required": false,
"role": "user_id",
"schema": {
"type": "integer",
"minimum": 1
}
},
{
"name": "group_id",
"type": "uint",
"required": false,
"role": "group_id",
"schema": {
"type": "integer",
"minimum": 1
}
},
{
"name": "title",
"type": "string",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "desc",
"type": "string",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "summary",
"type": "string",
"required": false,
"schema": {
"type": "string"
},
"default": "[分享]"
},
{
"name": "preview_url",
"type": "string",
"required": false,
"schema": {
"type": "string"
},
"default": "https://tangram-1251316161.file.myqcloud.com/files/20210721/e50a8e37e08f29bf1ffc7466e1950690.png"
},
{
"name": "jump_url",
"type": "string",
"required": true,
"schema": {
"type": "string"
}
}
],
"invariants": [],
"inputSchema": {
"type": "object",
"properties": {
"user_id": {
"type": "integer",
"minimum": 1,
"x-role": "user_id"
},
"group_id": {
"type": "integer",
"minimum": 1,
"x-role": "group_id"
},
"title": {
"type": "string"
},
"desc": {
"type": "string"
},
"summary": {
"type": "string",
"default": "[分享]"
},
"preview_url": {
"type": "string",
"default": "https://tangram-1251316161.file.myqcloud.com/files/20210721/e50a8e37e08f29bf1ffc7466e1950690.png"
},
"jump_url": {
"type": "string"
}
},
"required": [
"title",
"desc",
"jump_url"
],
"additionalProperties": true
},
"category": "扩展"
},
{
"name": "set_diy_online_status",
"aliases": [],
+114
View File
@@ -9437,6 +9437,120 @@ export const ACTIONS: CatalogAction[] = [
},
"category": "空间"
},
{
"name": "send_tuwen_ark",
"aliases": [],
"summary": "发送图文 Ark 卡片(私聊/群聊)",
"returns": "null",
"returnsSchema": {
"type": "null"
},
"readOnly": false,
"params": [
{
"name": "user_id",
"type": "uint",
"required": false,
"role": "user_id",
"schema": {
"type": "integer",
"minimum": 1
}
},
{
"name": "group_id",
"type": "uint",
"required": false,
"role": "group_id",
"schema": {
"type": "integer",
"minimum": 1
}
},
{
"name": "title",
"type": "string",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "desc",
"type": "string",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "summary",
"type": "string",
"required": false,
"schema": {
"type": "string"
},
"default": "[分享]"
},
{
"name": "preview_url",
"type": "string",
"required": false,
"schema": {
"type": "string"
},
"default": "https://tangram-1251316161.file.myqcloud.com/files/20210721/e50a8e37e08f29bf1ffc7466e1950690.png"
},
{
"name": "jump_url",
"type": "string",
"required": true,
"schema": {
"type": "string"
}
}
],
"invariants": [],
"inputSchema": {
"type": "object",
"properties": {
"user_id": {
"type": "integer",
"minimum": 1,
"x-role": "user_id"
},
"group_id": {
"type": "integer",
"minimum": 1,
"x-role": "group_id"
},
"title": {
"type": "string"
},
"desc": {
"type": "string"
},
"summary": {
"type": "string",
"default": "[分享]"
},
"preview_url": {
"type": "string",
"default": "https://tangram-1251316161.file.myqcloud.com/files/20210721/e50a8e37e08f29bf1ffc7466e1950690.png"
},
"jump_url": {
"type": "string"
}
},
"required": [
"title",
"desc",
"jump_url"
],
"additionalProperties": true
},
"category": "扩展"
},
{
"name": "set_diy_online_status",
"aliases": [],