Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/plugins/xiaoyunque-generation/convax-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id": "xiaoyunque-generation",
"name": "小云雀生成",
"description": "通过宿主管理的小云雀网页授权展示服务状态,并使用小云雀第一方网页能力生成图片和视频。",
"version": "0.3.2",
"version": "0.3.3",
"license": "MIT",
"compatibility": {
"pluginSchema": "convax.plugin/3",
Expand All @@ -13,7 +13,7 @@
"companions": [
{
"command": "convax-xiaoyunque-mcp",
"version": "0.3.0",
"version": "0.3.1",
"source": "packages/tools/xiaoyunque-mcp",
"targets": [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/xiaoyunque-generation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microvoid/convax-plugin-xiaoyunque-generation",
"version": "0.3.2",
"version": "0.3.3",
"private": true,
"type": "module",
"dependencies": {
Expand Down
106 changes: 13 additions & 93 deletions packages/plugins/xiaoyunque-generation/package/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,18 @@
"id": "xiaoyunque-generation",
"name": "小云雀生成",
"description": "通过宿主管理的小云雀网页授权展示服务状态,并使用小云雀第一方网页能力生成图片和视频。",
"version": "0.3.2",
"version": "0.3.3",
"contributes": {
"generation": {
"models": [
{ "tool": "image.seedream_5.0_pro", "name": "Seedream 5.0 Pro" },
{ "tool": "image.seedream_5.0", "name": "Seedream 5.0" },
{ "tool": "image.seedream_4.3", "name": "Seedream 4.3" },
{ "tool": "image.seedream_4.5", "name": "Seedream 4.5" },
{ "tool": "image.seedream_4.1", "name": "Seedream 4.1" },
{ "tool": "image.seedream_4", "name": "Seedream 4" },
{ "tool": "image.nano_banana_pro_1", "name": "Nano Banana Pro 1" },
{ "tool": "image.gpt_image_2", "name": "GPT Image 2" },
{ "tool": "image.seedream_5.0_pro", "name": "Seedream 5.0 Pro" },
{ "tool": "video.seedance_2.0_mini_lite", "name": "Seedance 2.0 Mini Lite" },
{ "tool": "video.seedance_2.0_mini", "name": "Seedance 2.0 Mini" },
{ "tool": "video.seedance2.0_fast_vision", "name": "Seedance 2.0 Fast Vision" },
{ "tool": "video.seedance2.0_vision", "name": "Seedance 2.0 Vision" },
{ "tool": "video.seedance2.0_fast_direct", "name": "Seedance 2.0 Fast" },
{ "tool": "video.seedance2.0_direct", "name": "Seedance 2.0" },
{ "tool": "video.seedance1.5_direct", "name": "Seedance 1.5" },
{ "tool": "video.seedance_1.0_fast", "name": "Seedance 1.0 Fast" }
{ "tool": "video.seedance2.0_vision", "name": "Seedance 2.0 Vision" },
{ "tool": "video.seedance_2.0_mini", "name": "Seedance 2.0 Mini" }
],
"tools": [
{
"id": "image.seedream_5.0_pro",
"title": "小云雀 · Seedream 5.0 Pro",
"description": "使用小云雀 Seedream 5.0 Pro,根据提示词和可选参考图生成图片。",
"output": "image",
"acceptedInputs": ["reference_image"]
},
{
"id": "image.seedream_5.0",
"title": "小云雀 · Seedream 5.0",
Expand All @@ -40,44 +23,9 @@
"acceptedInputs": ["reference_image"]
},
{
"id": "image.seedream_4.3",
"title": "小云雀 · Seedream 4.3",
"description": "使用小云雀 Seedream 4.3,根据提示词和可选参考图生成图片。",
"output": "image",
"acceptedInputs": ["reference_image"]
},
{
"id": "image.seedream_4.5",
"title": "小云雀 · Seedream 4.5",
"description": "使用小云雀 Seedream 4.5,根据提示词和可选参考图生成图片。",
"output": "image",
"acceptedInputs": ["reference_image"]
},
{
"id": "image.seedream_4.1",
"title": "小云雀 · Seedream 4.1",
"description": "使用小云雀 Seedream 4.1,根据提示词和可选参考图生成图片。",
"output": "image",
"acceptedInputs": ["reference_image"]
},
{
"id": "image.seedream_4",
"title": "小云雀 · Seedream 4",
"description": "使用小云雀 Seedream 4,根据提示词和可选参考图生成图片。",
"output": "image",
"acceptedInputs": ["reference_image"]
},
{
"id": "image.nano_banana_pro_1",
"title": "小云雀 · Nano Banana Pro 1",
"description": "使用小云雀 Nano Banana Pro 1,根据提示词和可选参考图生成图片。",
"output": "image",
"acceptedInputs": ["reference_image"]
},
{
"id": "image.gpt_image_2",
"title": "小云雀 · GPT Image 2",
"description": "使用小云雀 GPT Image 2,根据提示词和可选参考图生成图片。",
"id": "image.seedream_5.0_pro",
"title": "小云雀 · Seedream 5.0 Pro",
"description": "使用小云雀 Seedream 5.0 Pro,根据提示词和可选参考图生成图片。",
"output": "image",
"acceptedInputs": ["reference_image"]
},
Expand All @@ -89,16 +37,9 @@
"acceptedInputs": ["reference_image", "reference_video", "first_frame", "last_frame", "audio"]
},
{
"id": "video.seedance_2.0_mini",
"title": "小云雀 · Seedance 2.0 Mini",
"description": "使用小云雀 Seedance 2.0 Mini,根据提示词和可选多模态参考生成视频。",
"output": "video",
"acceptedInputs": ["reference_image", "reference_video", "first_frame", "last_frame", "audio"]
},
{
"id": "video.seedance2.0_fast_vision",
"title": "小云雀 · Seedance 2.0 Fast Vision",
"description": "使用小云雀 Seedance 2.0 Fast Vision,根据提示词和可选多模态参考生成视频。",
"id": "video.seedance2.0_direct",
"title": "小云雀 · Seedance 2.0",
"description": "使用小云雀 Seedance 2.0,根据提示词和可选多模态参考生成视频。",
"output": "video",
"acceptedInputs": ["reference_image", "reference_video", "first_frame", "last_frame", "audio"]
},
Expand All @@ -110,32 +51,11 @@
"acceptedInputs": ["reference_image", "reference_video", "first_frame", "last_frame", "audio"]
},
{
"id": "video.seedance2.0_fast_direct",
"title": "小云雀 · Seedance 2.0 Fast",
"description": "使用小云雀 Seedance 2.0 Fast,根据提示词和可选多模态参考生成视频。",
"output": "video",
"acceptedInputs": ["reference_image", "reference_video", "first_frame", "last_frame", "audio"]
},
{
"id": "video.seedance2.0_direct",
"title": "小云雀 · Seedance 2.0",
"description": "使用小云雀 Seedance 2.0,根据提示词和可选多模态参考生成视频。",
"output": "video",
"acceptedInputs": ["reference_image", "reference_video", "first_frame", "last_frame", "audio"]
},
{
"id": "video.seedance1.5_direct",
"title": "小云雀 · Seedance 1.5",
"description": "使用小云雀 Seedance 1.5,根据提示词和可选多模态参考生成视频。",
"id": "video.seedance_2.0_mini",
"title": "小云雀 · Seedance 2.0 Mini",
"description": "使用小云雀 Seedance 2.0 Mini,根据提示词和可选多模态参考生成视频。",
"output": "video",
"acceptedInputs": ["reference_image", "reference_video", "first_frame", "last_frame", "audio"]
},
{
"id": "video.seedance_1.0_fast",
"title": "小云雀 · Seedance 1.0 Fast",
"description": "使用小云雀 Seedance 1.0 Fast,根据提示词和可选单张参考图生成视频。",
"output": "video",
"acceptedInputs": ["reference_image"]
}
]
},
Expand Down
11 changes: 5 additions & 6 deletions packages/tools/xiaoyunque-mcp/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ the Plugin ZIP and must never be imported by Convax packages.
contracts: images submit through `agent/submit_run` and poll `agent/get_thread`;
video submits the current Canvas direct video-part tool through
`agent/submit_run` and polls the same `agent/get_thread` entry-list surface.
Never fall back to the legacy dedicated video-result endpoint. Use an exact model-specific
parameter shape: both Seedance 2.0 Mini variants omit
`resolution`, every Canvas video request omits imitation-video input, and Seedance 1.0 Fast
accepts at most one reference image while omitting video/audio/frame inputs.
Keep the exposed video model catalog synchronized with the first-party
`web_model_config` response rather than marketing pages. Generation envelopes
Never fall back to the legacy dedicated video-result endpoint. Keep the public
catalog limited to the product-governed allowlist in `src/models.ts`; use
first-party `web_model_config` evidence for its raw identifiers rather than
marketing pages. Both Seedance 2.0 Mini variants omit `resolution`, and every
Canvas video request omits imitation-video input. Generation envelopes
require an explicit integer `ret: 0` or canonical string `ret: "0"`; task ids
must match the client-created ids, and only canonical run states 0 through 9
are accepted.
Expand Down
15 changes: 6 additions & 9 deletions packages/tools/xiaoyunque-mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,12 @@ Cookie 从不进入 stdout、日志或 service status。`0600` 只能隔离其

## 能力

- 图像:模型目录以当前小云雀第一方 Web 客户端为发现入口,并仅暴露已被 raw
`image_generation` 提交链路接受的 Seedream 5.0/4.x、Nano Banana Pro 1 与
GPT Image 2,支持 prompt 与参考图。`web_model_config` v5 中出现但被真实
`get_thread` 以 `unsupported image_model_name` 拒绝的条目不会进入工具目录。
- 视频:模型目录与请求能力来自当前小云雀第一方 Web 同源配置,包括 Seedance
1.0 Fast、1.5 与 2.0 系列;使用当前 Canvas 的 direct video-part submit,
并与生图共享 `get_thread` entry-list 轮询链路。
Seedance 1.0 Fast 只接受单张参考图,其余当前模型支持参考图、参考视频、音频、
首帧与首尾帧。请求体按模型能力裁剪,不向 Mini 系列发送网页端省略的分辨率字段。
- 图像:只暴露 Seedream 5.0 与 Seedream 5.0 Pro,默认使用 Seedream 5.0;两者
均支持 prompt 与参考图。
- 视频:只暴露 Seedance 2.0、Seedance 2.0 Mini Lite(非 VIP 通道)以及
Seedance 2.0 Vision、Seedance 2.0 Mini(VIP 通道),默认使用 Seedance 2.0
Mini Lite。四个模型均支持参考图、参考视频、音频、首帧与首尾帧;请求体不向 Mini
系列发送网页端省略的分辨率字段。
- 服务:`service.status` 使用同一 Cookie session 读取固定的账号、积分和最近最多
20 条已结算消费记录;缺失或失败的数据返回 `unavailable`,不会猜测。

Expand Down
2 changes: 1 addition & 1 deletion packages/tools/xiaoyunque-mcp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microvoid/convax-xiaoyunque-mcp",
"version": "0.3.0",
"version": "0.3.1",
"private": true,
"type": "module",
"bin": {
Expand Down
8 changes: 4 additions & 4 deletions packages/tools/xiaoyunque-mcp/scripts/live-image-smoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function notify(method: string, params: unknown) {
try {
const initialized = await request("initialize", {
capabilities: {},
clientInfo: { name: "convax-xiaoyunque-live-smoke", version: "0.3.0" },
clientInfo: { name: "convax-xiaoyunque-live-smoke", version: "0.3.1" },
protocolVersion: "2025-03-26",
})
if ((initialized.result as Record<string, unknown> | undefined)?.protocolVersion !== "2025-03-26") {
Expand All @@ -64,12 +64,12 @@ try {
notify("notifications/initialized", {})
const listed = await request("tools/list", {})
const names = ((listed.result as { tools?: Array<{ name?: string }> } | undefined)?.tools ?? []).map((tool) => tool.name)
if (!names.includes("image.seedream_4.5")) {
throw new Error("Sidecar did not expose the verified Seedream 4.5 generation tool")
if (!names.includes("image.seedream_5.0")) {
throw new Error("Sidecar did not expose the default Seedream 5.0 generation tool")
}
process.stderr.write("将使用 Convax 服务页授权的小云雀网页会话执行一次计费生图。\n")
const generated = await request("tools/call", {
name: "image.seedream_4.5",
name: "image.seedream_5.0",
arguments: {
schema: "convax.generation-call/1",
operation_id: `live-image-${crypto.randomUUID()}`,
Expand Down
4 changes: 2 additions & 2 deletions packages/tools/xiaoyunque-mcp/scripts/live-video-smoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ try {
progress("mcp.initialize")
const initialized = await request("initialize", {
capabilities: {},
clientInfo: { name: "convax-xiaoyunque-live-video-smoke", version: "0.3.0" },
clientInfo: { name: "convax-xiaoyunque-live-video-smoke", version: "0.3.1" },
protocolVersion: "2025-03-26",
})
if ((initialized.result as Record<string, unknown> | undefined)?.protocolVersion !== "2025-03-26") {
Expand All @@ -130,7 +130,7 @@ try {
const names = ((listed.result as { tools?: Array<{ name?: string }> } | undefined)?.tools ?? [])
.map((tool) => tool.name)
if (!names.includes(toolName)) {
throw new Error("Sidecar did not expose the verified Seedance 2.0 Mini Lite generation tool")
throw new Error("Sidecar did not expose the default Seedance 2.0 Mini Lite generation tool")
}

process.stderr.write(`${formatSafeGenerationOperation(operationId)}\n`)
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/xiaoyunque-mcp/src/mcp-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export class McpServer {
this.#sendResult(request.id, {
capabilities: { tools: {} },
protocolVersion,
serverInfo: { name: "convax-xiaoyunque-mcp", version: "0.3.0" },
serverInfo: { name: "convax-xiaoyunque-mcp", version: "0.3.1" },
})
return
}
Expand Down
25 changes: 7 additions & 18 deletions packages/tools/xiaoyunque-mcp/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export interface XiaoYunqueGenerationTool {
output: GenerationOutput
}

// These unions also cover legacy persisted operations and direct API contract
// tests. Only entries in imageTools/videoTools are exposed through MCP tools/list.
export type XiaoYunqueImageModel =
| "seedream_5.0_pro"
| "seedream_5.0"
Expand All @@ -30,30 +32,17 @@ export type XiaoYunqueVideoModel =
export type XiaoYunqueModel = XiaoYunqueImageModel | XiaoYunqueVideoModel

const imageTools = [
["seedream_5.0_pro", "image.seedream_5.0_pro", "Seedream 5.0 Pro"],
["seedream_5.0", "image.seedream_5.0", "Seedream 5.0"],
["seedream_4.3", "image.seedream_4.3", "Seedream 4.3"],
// The live web_model_config v5 catalog can include entries that the raw
// image_generation submit contract does not accept. On 2026-07-20 an
// accepted Nova 2 run terminated through get_thread with the exact reason
// `unsupported image_model_name: nova2`; keep it out of the executable tool
// catalog until that raw submit surface publishes a verified identifier.
["seedream_4.5", "image.seedream_4.5", "Seedream 4.5"],
["seedream_4.1", "image.seedream_4.1", "Seedream 4.1"],
["seedream_4", "image.seedream_4", "Seedream 4"],
["nano_banana_pro_1", "image.nano_banana_pro_1", "Nano Banana Pro 1"],
["gpt_image_2", "image.gpt_image_2", "GPT Image 2"],
["seedream_5.0_pro", "image.seedream_5.0_pro", "Seedream 5.0 Pro"],
] as const satisfies readonly (readonly [XiaoYunqueImageModel, string, string])[]

const videoTools = [
// The first entry is Convax's default video model. It uses the non-VIP channel.
["Seedance_2.0_mini_lite", "video.seedance_2.0_mini_lite", "Seedance 2.0 Mini Lite"],
["Seedance_2.0_mini", "video.seedance_2.0_mini", "Seedance 2.0 Mini"],
["seedance2.0_fast_vision", "video.seedance2.0_fast_vision", "Seedance 2.0 Fast Vision"],
["seedance2.0_vision", "video.seedance2.0_vision", "Seedance 2.0 Vision"],
["seedance2.0_fast_direct", "video.seedance2.0_fast_direct", "Seedance 2.0 Fast"],
["seedance2.0_direct", "video.seedance2.0_direct", "Seedance 2.0"],
["seedance1.5_direct", "video.seedance1.5_direct", "Seedance 1.5"],
["Seedance_1.0_fast", "video.seedance_1.0_fast", "Seedance 1.0 Fast"],
// VIP channel.
["seedance2.0_vision", "video.seedance2.0_vision", "Seedance 2.0 Vision"],
["Seedance_2.0_mini", "video.seedance_2.0_mini", "Seedance 2.0 Mini"],
] as const satisfies readonly (readonly [XiaoYunqueVideoModel, string, string])[]

export const generationTools = [
Expand Down
4 changes: 2 additions & 2 deletions packages/tools/xiaoyunque-mcp/test/generator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { XiaoYunqueApi, XiaoYunqueRequestRejectedError } from "../src/xiaoyunque

const png = Uint8Array.from([137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 0])
const mp4 = Uint8Array.from([0, 0, 0, 24, 102, 116, 121, 112, 105, 115, 111, 109, 0, 0, 0, 0])
const imageModel = "seedream_4.5" as const
const imageModel = "seedream_5.0" as const
const videoModel = "Seedance_2.0_mini_lite" as const
const visionVideoModel = "seedance2.0_vision" as const
const directories: string[] = []
Expand Down Expand Up @@ -233,7 +233,7 @@ describe("XiaoYunque generation engine", () => {
args: {},
image_count: 1,
image_resolution: "2K",
model: "seedream_4.5",
model: "seedream_5.0",
pippit_asset_ids: [],
prompt: imageCall.prompt,
ratio: "1:1",
Expand Down
Loading