190 lines
5.6 KiB
JSON
190 lines
5.6 KiB
JSON
{
|
||
"schemaVersion": 1,
|
||
"skill": "todo-skill",
|
||
"actions": [
|
||
{
|
||
"id": "health",
|
||
"label": "运行检查",
|
||
"description": "检查 demo 运行环境(Python / mock 平台库 / 数据库路径),不启动浏览器。",
|
||
"placements": ["skill-detail", "agent"],
|
||
"executionProfile": "sync",
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "health",
|
||
"args": []
|
||
}
|
||
},
|
||
{
|
||
"id": "version",
|
||
"label": "查看版本",
|
||
"description": "返回 demo 版本与 slug。",
|
||
"placements": ["skill-detail"],
|
||
"executionProfile": "sync",
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "version",
|
||
"args": []
|
||
}
|
||
},
|
||
{
|
||
"id": "todo-add",
|
||
"label": "新增待办",
|
||
"description": "在 todos 表新增一条待办事项(走技能 CLI,不直接写库)。",
|
||
"placements": ["toolbar", "agent", "skill-detail"],
|
||
"executionProfile": "sync",
|
||
"interaction": "form",
|
||
"bind": { "tables": ["todos"] },
|
||
"hostEffects": { "onSuccess": ["reloadTable"] },
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"required": ["title"],
|
||
"properties": {
|
||
"title": {
|
||
"type": "string",
|
||
"title": "标题",
|
||
"description": "待办事项内容"
|
||
},
|
||
"priority": {
|
||
"type": "string",
|
||
"title": "优先级",
|
||
"enum": ["high", "normal", "low"],
|
||
"default": "normal"
|
||
},
|
||
"dueAt": {
|
||
"type": "number",
|
||
"title": "截止时间",
|
||
"description": "Unix 秒;可空",
|
||
"display_type": "datetime_unix_seconds"
|
||
}
|
||
}
|
||
},
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "todo",
|
||
"args": ["add", "{{title}}", "--priority", "{{priority}}", "--due-at", "{{dueAt}}"]
|
||
}
|
||
},
|
||
{
|
||
"id": "todo-list",
|
||
"label": "查看列表",
|
||
"description": "列出待办事项(可选按状态过滤),返回 JSON。",
|
||
"placements": ["skill-detail", "agent"],
|
||
"executionProfile": "sync",
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"status": {
|
||
"type": "string",
|
||
"title": "状态过滤",
|
||
"enum": ["pending", "done"],
|
||
"description": "留空则返回全部"
|
||
},
|
||
"limit": {
|
||
"type": "number",
|
||
"title": "返回数量",
|
||
"default": 100
|
||
}
|
||
}
|
||
},
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "todo",
|
||
"args": ["list", "--status", "{{status}}", "--limit", "{{limit}}"]
|
||
}
|
||
},
|
||
{
|
||
"id": "todo-done",
|
||
"label": "标记完成",
|
||
"description": "将当前行待办标记为完成。",
|
||
"placements": ["row", "batch", "agent"],
|
||
"executionProfile": "sync",
|
||
"interaction": "confirm",
|
||
"confirmation": { "message": "将所选待办标记为完成?" },
|
||
"bind": { "tables": ["todos"] },
|
||
"hostEffects": { "onSuccess": ["reloadTable", "clearSelection"] },
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"required": ["ids"],
|
||
"properties": {
|
||
"ids": {
|
||
"type": "string",
|
||
"title": "待办编号",
|
||
"description": "逗号分隔的待办 id(batch 入口由勾选映射)",
|
||
"readOnly": true
|
||
}
|
||
}
|
||
},
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "todo",
|
||
"args": ["done", "{{ids}}"]
|
||
}
|
||
},
|
||
{
|
||
"id": "todo-delete",
|
||
"label": "删除待办",
|
||
"description": "删除当前行待办(技能级删除,会更新宿主表格)。",
|
||
"placements": ["row", "batch"],
|
||
"executionProfile": "sync",
|
||
"interaction": "confirm",
|
||
"confirmation": { "message": "确认删除所选待办?此操作不可撤销。" },
|
||
"bind": { "tables": ["todos"] },
|
||
"hostEffects": { "onSuccess": ["reloadTable", "clearSelection"] },
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"required": ["ids"],
|
||
"properties": {
|
||
"ids": {
|
||
"type": "string",
|
||
"title": "待办编号",
|
||
"description": "逗号分隔的待办 id(batch 入口由勾选映射)",
|
||
"readOnly": true
|
||
}
|
||
}
|
||
},
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "todo",
|
||
"args": ["delete", "{{ids}}"]
|
||
}
|
||
},
|
||
{
|
||
"id": "todo-stats",
|
||
"label": "查看统计",
|
||
"description": "返回待办事项简单统计(总数 / 待办 / 完成)。",
|
||
"placements": ["skill-detail", "agent"],
|
||
"executionProfile": "sync",
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "todo",
|
||
"args": ["stats"]
|
||
}
|
||
},
|
||
{
|
||
"id": "remind",
|
||
"label": "提醒扫描",
|
||
"description": "演示 async 任务:扫描待办事项并模拟发出提醒。进入任务中心,支持进度与取消。",
|
||
"placements": ["toolbar", "cron", "agent", "skill-detail"],
|
||
"executionProfile": "async",
|
||
"bind": { "tables": ["todos"] },
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"seconds": {
|
||
"type": "number",
|
||
"title": "运行秒数",
|
||
"description": "模拟任务持续秒数,用于演示进度推送",
|
||
"default": 3,
|
||
"minimum": 1
|
||
}
|
||
}
|
||
},
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "remind",
|
||
"args": ["--seconds", "{{seconds}}"]
|
||
}
|
||
}
|
||
]
|
||
}
|