docs: document year and year_month display_type host contract
All checks were successful
技能自动化发布 / release (push) Successful in 8s

This commit is contained in:
2026-09-26 10:23:06 +08:00
parent dfe6ade2d8
commit 78c24a515d
11 changed files with 74 additions and 8 deletions

View File

@@ -6,6 +6,7 @@
- `skill-grid-presentation.example.json`:数据管理整行 / 整列 / 区域呈现文档形状参考(见 `references/CELL_PRESENTATION.md`)。
- `render-html.action.example.json`:HTML 报告「重新生成」Action 形状参考(固定 id `render-html`;见 `references/ACTIONS.md`)。
- `lookup-action.example.json`:Action 内联 Lookup 形状参考(单选 + `multiple: true` 多选并列;跨表引用勿填编号;见 `references/ACTIONS.md`「跨表引用:Lookup」)。
- `year-month-action.example.json`:Action / CRUD 账期月份字段 `display_type: year_month` 形状参考(见 `references/ACTIONS.md`「表单字段类型对照」)。
- `visible-when-action.example.json`:Action 参数字段条件显隐 `visibleWhen` 形状参考(互斥模式联动;见 `references/ACTIONS.md`「字段条件显隐」;≠ Policy L3)。
- `selection-label-column.action.example.json`:选择摘要 `bind.labelColumn` 形状参考(见 `references/ACTIONS.md`「选择摘要」)。
- `selection-mode-optional.action.example.json`:`bind.selectionMode: "optional"` 智能勾选/按数量合并形状参考;用户可见文案为口语中文(见 `references/ACTIONS.md`「勾选驱动模式」「用户可见文案」)。

View File

@@ -0,0 +1,40 @@
{
"_comment": "形状参考:账期/月份字段用 year_month,宿主渲染年月选择器。完整契约见 references/ACTIONS.md「表单字段类型对照」与 references/SCHEMA.md。",
"schemaVersion": 1,
"skill": "your-skill-slug",
"actions": [
{
"id": "create-period-job",
"label": "新建账期作业(示例)",
"description": "演示 year_month 字段:提交值为 YYYY-MM 字符串,不要用 date。",
"placements": ["toolbar"],
"executionProfile": "sync",
"interaction": "form",
"bind": {
"tables": ["close_jobs"]
},
"entrypoint": {
"type": "cli",
"command": "create-job",
"args": ["--period", "{{period}}", "--title", "{{title}}"]
},
"inputSchema": {
"type": "object",
"required": ["period"],
"properties": {
"period": {
"type": "string",
"title": "月份",
"description": "格式 YYYY-MM,例如 2026-05",
"display_type": "year_month"
},
"title": {
"type": "string",
"title": "标题",
"description": "可留空,默认按月份生成"
}
}
}
}
]
}