Files
skill-template/assets/examples/selection-mode-optional.action.example.json
chendelian c43c26ad15
All checks were successful
技能自动化发布 / release (push) Successful in 5s
Release v1.0.107: precipitate bind.selectionMode contract
2026-09-12 13:42:34 +08:00

47 lines
1.4 KiB
JSON
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.
{
"id": "process-queue",
"label": "处理队列",
"description": "有勾选则按编号处理;无勾选则按 pickCount 从可操作队列领取。示例:bind.selectionMode=optional,避免拆成两个同义顶栏按钮。",
"placements": ["toolbar", "batch", "cron", "agent"],
"executionProfile": "async",
"interaction": "form",
"confirmation": {
"message": "将按技能业务规则处理记录(有勾选则处理勾选;未勾选则按数量从队列领取)。"
},
"bind": {
"tables": ["business_items"],
"selectionMode": "optional",
"labelColumn": "display_name",
"inputMapping": {
"itemIds": "$selection.ids"
}
},
"inputSchema": {
"type": "object",
"required": ["itemIds", "pickCount"],
"properties": {
"itemIds": {
"type": "string",
"title": "编号列表",
"description": "勾选时由宿主预填;无勾选时不要传",
"readOnly": true
},
"pickCount": {
"type": "number",
"title": "处理数量",
"description": "未勾选时:从队列领取可操作状态记录的条数",
"default": 1,
"minimum": 1
}
}
},
"entrypoint": {
"type": "cli",
"command": "process",
"args": ["--ids", "{{itemIds}}", "--pick", "{{pickCount}}"]
},
"hostEffects": {
"onSuccess": ["reloadTable", "clearSelection"]
}
}