Docs: precipitate Action Lookup skill_cli contract (v1.0.119)
All checks were successful
技能自动化发布 / release (push) Successful in 10s

This commit is contained in:
2026-09-28 11:56:12 +08:00
parent bf3bb9cd10
commit c49fcba157
12 changed files with 264 additions and 24 deletions

View File

@@ -6,7 +6,8 @@
- `skill-cell-presentation.example.json`:数据管理单元格呈现文档形状参考(见 `references/CELL_PRESENTATION.md`)。
- `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」)。
- `lookup-action.example.json`:Action 内联 Lookup(**local_sql**)形状参考(单选 + `multiple: true`;同库跨表勿填编号;见 `references/ACTIONS.md`「跨表引用:Lookup」)。
- `lookup-skill-cli.action.example.json`:Action Lookup **`skill_cli`** 形状参考(打开表单时宿主调兄弟技能 CLI 抽 JSON 选项;跨技能账号列表勿再造本库缓存表;见同节)。
- `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`「选择摘要」)。

View File

@@ -1,5 +1,5 @@
{
"_comment": "形状参考:Action 参数引用同库另一张表时用 Lookup。单选与多选同一 lookup 对象,多选只加 multiple:true。完整契约见 references/ACTIONS.md「跨表引用:Lookup」与 references/SCHEMA.md。",
"_comment": "形状参考:Action 参数引用同库另一张表时用 Lookup(local_sql)。单选与多选同一 lookup 对象,多选只加 multiple:true。跨技能列表见 lookup-skill-cli.action.example.json。完整契约见 references/ACTIONS.md「跨表引用:Lookup」。",
"schemaVersion": 1,
"skill": "your-skill-slug",
"actions": [

View File

@@ -0,0 +1,51 @@
{
"_comment": "形状参考:Action Lookup 的 skill_cli 源——打开表单时宿主 sync 调用兄弟技能 CLI,从 stdout JSON 抽选项。完整契约见 references/ACTIONS.md「跨表引用:Lookup」。本例对标 account-manager 遗留 list-json(stdout 为账号数组,字段 id / account_label);其它依赖技能请核对自己的命令与 JSON 形状。",
"schemaVersion": 1,
"skill": "your-skill-slug",
"actions": [
{
"id": "publish-with-account",
"label": "发布(示例)",
"description": "演示跨技能选账号:skill_cli 调 account-manager,勿在本技能维护账号缓存表。",
"placements": ["toolbar", "cron"],
"executionProfile": "async",
"interaction": "form",
"bind": {
"tables": ["articles"],
"selectionMode": "none"
},
"entrypoint": {
"type": "cli",
"command": "run",
"args": ["--account-id", "{{accountId}}", "--pick", "{{pickCount}}"]
},
"inputSchema": {
"type": "object",
"required": ["pickCount"],
"properties": {
"pickCount": {
"type": "number",
"title": "发布数量",
"description": "从未发布队列领取的条数",
"default": 1,
"minimum": 1
},
"accountId": {
"type": "string",
"title": "发布账号",
"description": "不选则由系统自动分配;选定后本次全部使用该号。",
"display_type": "lookup",
"lookup": {
"source": "skill_cli",
"skill": "account-manager",
"command": "list-json",
"args": ["toutiao"],
"value_column": "id",
"label_column": "account_label"
}
}
}
}
}
]
}