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

@@ -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"
}
}
}
}
}
]
}