Files
skill-template/assets/examples/enum-names-action.example.json
chendelian 6644dedd0e
All checks were successful
技能自动化发布 / release (push) Successful in 9s
Release v1.0.122: document Action enumNames and column-bound static enum labels
2026-10-01 17:26:19 +08:00

52 lines
1.6 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.
{
"_comment": "形状参考:Action 静态枚举用 enum + enumNames 显示中文;提交仍是 enum value。有对应表列时优先 column 绑列复用 options_json。完整契约见 references/ACTIONS.md「静态枚举 label」。",
"schemaVersion": 1,
"skill": "your-skill-slug",
"actions": [
{
"id": "create-ticket",
"label": "新建工单(示例)",
"description": "演示 enumNames:界面显示中文,CLI 仍收到英文枚举值。",
"placements": ["toolbar", "agent"],
"executionProfile": "sync",
"interaction": "form",
"bind": {
"tables": ["tickets"]
},
"entrypoint": {
"type": "cli",
"command": "ticket-create",
"args": [
"--category", "{{category}}",
"--priority", "{{priority}}",
"--title", "{{title}}"
]
},
"inputSchema": {
"type": "object",
"required": ["title", "category"],
"properties": {
"title": {
"type": "string",
"title": "标题"
},
"category": {
"type": "string",
"title": "类型",
"column": "category",
"enum": ["incident", "request", "consult", "other"],
"enumNames": ["故障", "需求", "咨询", "其他"]
},
"priority": {
"type": "string",
"title": "优先级",
"enum": ["low", "medium", "high", "urgent"],
"enumNames": ["低", "中", "高", "紧急"],
"description": "无对应列时仅靠 enumNames 展示中文"
}
}
}
}
]
}