Files
agent/skills/video/SKILL.md
T
kicer 767caa8574 feat(skills): 技能支持 MCP 后端(front matter mcp_tool)
SKILL.md 声明 mcp_tool 时,op=run 不落 executor 沙箱,由 core 直接 mcp.callTool
转发:凭证留在 core(沙箱的 env 白名单本就会丢掉 *KEY/*TOKEN),模型只看到技能清单
里的一行描述。配合 mcp_servers[].mode: silent,工具不再进每轮请求的 tools 数组。

- skills.js: runSkill 在 absolutizeArgs 之前分流(否则 URL / 含斜杠的 prompt 会被
  当路径改写);不做 input_schema.required 预检(参数与 op 相关,交给 MCP 服务)
- listSkills 带出 mcp_tool;设置页技能卡显示 mcp 后端徽章
- server.js: 启动期自检,缺失后端 warn、两条路并存 info
- 新增 skills/image、skills/video 两个纯文档技能(无 run.py)
- skills/README、README、app/AGENTS 同步
2026-10-21 09:08:57 +08:00

46 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: video
description: AI 生成视频(CogVideo)。op=create 给 prompt(可加 image_url)拿 task_id,op=get 取视频 URL
mcp_tool: video_task
---
## 功能
文生视频 / 图生视频。异步任务语义:提交立即返回 `task_id`,生成在服务端进行,本技能不内部轮询。
## 参数
`input_args` 原样透传给底层服务:
- `op=create`:`prompt` 与 `image_url` **至少给一个**。
- 文生视频:只给 `prompt`(≤512 字符)。
- 图生视频:再给 `image_url`——必须是公网可访问的 png / jpeg / jpg、≤5MB。本地图片先用
`mint_public_link` 签发临时 URL,**不要**自己拼内网地址。
- `with_audio`:可选,是否生成 AI 音频,默认 `false`。
- `op=get`:`task_id` 必填;`SUCCESS` 时返回 Video URL(有封面时一并返回)。
## 用法
1. 提交
```
skill op=run name=video input_args={"op":"create","prompt":"镜头缓慢推进,海浪拍打礁石","with_audio":true}
```
→ 返回 `task_id`
2. 查询
```
skill op=run name=video input_args={"op":"get","task_id":"<上一步返回的 id>"}
```
→ `SUCCESS` 时返回 `Video URL: <url>`
## 注意
- 生成通常 1~5 分钟。`PROCESSING` 时不要高频轮询:可以先把其它事做完,再回来查。
- 结果只有 URL,不落盘;需要本地文件时用 `terminal` 的 `curl -fsSL -o out.mp4 "<url>"`。
- 图生视频的参考图必须公网可达:本地文件先 `mint_public_link`,再把它返回的地址填进 `image_url`。
- 模型名、分辨率、帧率、水印等由服务端配置决定,调用时不需要传。