Docs: precipitate Action Lookup skill_cli contract (v1.0.119)
All checks were successful
技能自动化发布 / release (push) Successful in 10s
All checks were successful
技能自动化发布 / release (push) Successful in 10s
This commit is contained in:
@@ -139,7 +139,7 @@
|
||||
},
|
||||
"lookup": {
|
||||
"$ref": "#/$defs/lookupConfig",
|
||||
"description": "可选。内联同库表关联 Lookup(与列 options_json lookup 对象同构)。用于当前表没有对应列时;推荐同时设 display_type=lookup。见 ACTIONS.md「跨表引用:Lookup」。"
|
||||
"description": "可选。Action 内联 Lookup:local_sql(同库表)/ skill_cli(兄弟技能 CLI JSON)/ external_api(预留)。打开表单时由宿主解析。推荐同时设 display_type=lookup。见 ACTIONS.md「跨表引用:Lookup」。"
|
||||
},
|
||||
"visibleWhen": {
|
||||
"description": "可选。表单字段条件显隐。宿主在数据管理/定时任务参数表单中:规则不满足则隐藏该字段、提交时省略、且不校验 required。支持 {field,equals} / {field,in:[...]},或单键简写 {collectMode:\"按关键词采集\"} / {collectMode:[\"a\",\"b\"]}。Agent/CLI 无 UI 时同样按当前 input 求值后剥离隐藏字段。",
|
||||
@@ -187,26 +187,35 @@
|
||||
},
|
||||
"lookupConfig": {
|
||||
"type": "object",
|
||||
"required": ["ref_table", "value_column", "label_column"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"source": {
|
||||
"type": "string",
|
||||
"enum": ["local_sql", "skill_cli", "external_api"],
|
||||
"description": "可选。显式数据源;省略时:有 ref_table→local_sql,有 skill→skill_cli,有 url→external_api。"
|
||||
},
|
||||
"lookup_source": {
|
||||
"type": "string",
|
||||
"enum": ["local_sql", "skill_cli", "external_api"],
|
||||
"description": "可选。source 别名。"
|
||||
},
|
||||
"ref_table": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
|
||||
"description": "同库被引用表名"
|
||||
"description": "local_sql:同库被引用表名"
|
||||
},
|
||||
"value_column": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
|
||||
"description": "提交值列(编号 / 外键)"
|
||||
"description": "提交值列;local_sql 必填;skill_cli/external_api 默认可为 id"
|
||||
},
|
||||
"label_column": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
|
||||
"description": "主文案列"
|
||||
"description": "主文案列;local_sql 必填;skill_cli 默认可为 display_label"
|
||||
},
|
||||
"extra_column": {
|
||||
"type": "string",
|
||||
@@ -218,18 +227,90 @@
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
|
||||
"description": "可选。等值过滤列"
|
||||
"description": "可选。local_sql 等值过滤列"
|
||||
},
|
||||
"filter_value": {
|
||||
"type": ["string", "number", "boolean", "null"],
|
||||
"description": "可选。与 filter_column 配对的等值"
|
||||
},
|
||||
"skill": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "skill_cli:兄弟/依赖技能 slug"
|
||||
},
|
||||
"skill_slug": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "skill_cli:skill 别名"
|
||||
},
|
||||
"command": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "skill_cli:CLI 子命令(argv[0])"
|
||||
},
|
||||
"cli_command": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "skill_cli:command 别名"
|
||||
},
|
||||
"args": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "array",
|
||||
"items": { "type": "string" }
|
||||
},
|
||||
{ "type": "string" }
|
||||
],
|
||||
"description": "skill_cli:追加 argv;数组或逗号分隔串"
|
||||
},
|
||||
"items_path": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "skill_cli / external_api:stdout JSON 内选项数组点路径,默认 items"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "external_api(预留):HTTP URL"
|
||||
},
|
||||
"endpoint": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "external_api:url 别名"
|
||||
},
|
||||
"method": {
|
||||
"type": "string",
|
||||
"enum": ["GET", "POST"],
|
||||
"description": "external_api:HTTP 方法,默认 GET"
|
||||
},
|
||||
"multiple": {
|
||||
"type": "boolean",
|
||||
"description": "可选。true=多选 Lookup(存/提交 TEXT 逗号分隔 id);省略或 false=单选(默认)。与 CRUD options_json lookup 同构。"
|
||||
"description": "可选。true=多选 Lookup(存/提交 TEXT 逗号分隔 id);省略或 false=单选(默认)。"
|
||||
}
|
||||
},
|
||||
"description": "同库 FK 式 Lookup。展示:value · label;有 extra 时 value · label(extra)。multiple 时多选。宿主亦接受 camelCase 键名。"
|
||||
"oneOf": [
|
||||
{
|
||||
"required": ["ref_table", "value_column", "label_column"],
|
||||
"description": "local_sql(同库表)"
|
||||
},
|
||||
{
|
||||
"anyOf": [
|
||||
{ "required": ["skill", "command"] },
|
||||
{ "required": ["skill", "cli_command"] },
|
||||
{ "required": ["skill_slug", "command"] },
|
||||
{ "required": ["skill_slug", "cli_command"] }
|
||||
],
|
||||
"description": "skill_cli(兄弟技能 CLI JSON)"
|
||||
},
|
||||
{
|
||||
"anyOf": [
|
||||
{ "required": ["url"] },
|
||||
{ "required": ["endpoint"] }
|
||||
],
|
||||
"description": "external_api(预留)"
|
||||
}
|
||||
],
|
||||
"description": "Action Lookup:local_sql / skill_cli / external_api。展示:value · label;有 extra 时 value · label(extra)。宿主亦接受 camelCase。列 Lookup 仅 local_sql,见 SCHEMA.md。"
|
||||
},
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
|
||||
Reference in New Issue
Block a user