139 lines
3.8 KiB
JSON
139 lines
3.8 KiB
JSON
{
|
||
"schemaVersion": 1,
|
||
"skill": "account-manager",
|
||
"actions": [
|
||
{
|
||
"id": "account-add-web",
|
||
"label": "新增账号",
|
||
"description": "登记网页/RPA 账号并自动创建浏览器 Profile 目录(走 account add-web,非宿主直写库)。",
|
||
"replaces": "create",
|
||
"placements": [],
|
||
"executionProfile": "sync",
|
||
"interaction": "form",
|
||
"bind": {
|
||
"tables": ["accounts"]
|
||
},
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"required": ["platform_key", "account_label"],
|
||
"properties": {
|
||
"platform_key": {
|
||
"type": "string",
|
||
"title": "平台",
|
||
"description": "关联平台信息表;宿主按列 lookup 渲染下拉"
|
||
},
|
||
"account_label": {
|
||
"type": "string",
|
||
"title": "账号名称"
|
||
},
|
||
"login_id": {
|
||
"type": "string",
|
||
"title": "登录账号"
|
||
},
|
||
"login_id_type": {
|
||
"type": "string",
|
||
"title": "登录标识类型",
|
||
"default": "unknown"
|
||
},
|
||
"tenant_id": {
|
||
"type": "string",
|
||
"title": "租户编号"
|
||
},
|
||
"environment": {
|
||
"type": "string",
|
||
"title": "环境",
|
||
"default": "production"
|
||
},
|
||
"role": {
|
||
"type": "string",
|
||
"title": "角色",
|
||
"default": "default"
|
||
},
|
||
"provider_code": {
|
||
"type": "string",
|
||
"title": "供应商代码"
|
||
},
|
||
"url": {
|
||
"type": "string",
|
||
"title": "入口链接"
|
||
}
|
||
}
|
||
},
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "account",
|
||
"args": [
|
||
"add-web",
|
||
"--platform", "{{platform_key}}",
|
||
"--label", "{{account_label}}",
|
||
"--login-id", "{{login_id}}",
|
||
"--login-id-type", "{{login_id_type}}",
|
||
"--tenant-id", "{{tenant_id}}",
|
||
"--environment", "{{environment}}",
|
||
"--role", "{{role}}",
|
||
"--provider-code", "{{provider_code}}",
|
||
"--url", "{{url}}"
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"id": "reveal-profile",
|
||
"label": "打开文件位置",
|
||
"description": "在系统文件管理器中打开该账号的浏览器 Profile 目录。",
|
||
"placements": ["row"],
|
||
"executionProfile": "sync",
|
||
"interaction": "direct",
|
||
"bind": {
|
||
"tables": ["accounts"],
|
||
"inputMapping": { "accountId": "$row.$pk" }
|
||
},
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"required": ["accountId"],
|
||
"properties": {
|
||
"accountId": {
|
||
"type": "number",
|
||
"title": "账号 ID",
|
||
"description": "accounts 表主键",
|
||
"readOnly": true
|
||
}
|
||
}
|
||
},
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "account",
|
||
"args": ["reveal-profile", "{{accountId}}"]
|
||
}
|
||
},
|
||
{
|
||
"id": "open-browser",
|
||
"label": "打开浏览器",
|
||
"description": "用该账号持久化 Profile 直接打开系统 Chrome/Edge,仅供肉眼核对(不做登录判定)。与打开文件位置同为一点即开。",
|
||
"placements": ["row"],
|
||
"executionProfile": "sync",
|
||
"interaction": "direct",
|
||
"bind": {
|
||
"tables": ["accounts"],
|
||
"inputMapping": { "accountId": "$row.$pk" }
|
||
},
|
||
"inputSchema": {
|
||
"type": "object",
|
||
"required": ["accountId"],
|
||
"properties": {
|
||
"accountId": {
|
||
"type": "number",
|
||
"title": "账号 ID",
|
||
"description": "accounts 表主键",
|
||
"readOnly": true
|
||
}
|
||
}
|
||
},
|
||
"entrypoint": {
|
||
"type": "cli",
|
||
"command": "account",
|
||
"args": ["open", "{{accountId}}"]
|
||
}
|
||
}
|
||
]
|
||
}
|