Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cdd8b663f4 | |||
| 285138ebf4 | |||
| 4cde7ea739 | |||
| 2b3fdda61e |
@@ -6,7 +6,10 @@
|
||||
"id": "health",
|
||||
"label": "运行检查",
|
||||
"description": "检查技能运行环境并返回结构化结果,不启动浏览器。",
|
||||
"placements": ["skill-detail", "agent"],
|
||||
"placements": [
|
||||
"skill-detail",
|
||||
"agent"
|
||||
],
|
||||
"executionProfile": "sync",
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
@@ -18,7 +21,9 @@
|
||||
"id": "version",
|
||||
"label": "查看版本",
|
||||
"description": "返回技能版本和机器标识。",
|
||||
"placements": ["skill-detail"],
|
||||
"placements": [
|
||||
"skill-detail"
|
||||
],
|
||||
"executionProfile": "sync",
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
@@ -30,13 +35,143 @@
|
||||
"id": "config-path",
|
||||
"label": "查看配置位置",
|
||||
"description": "返回技能配置文件位置。",
|
||||
"placements": ["skill-detail"],
|
||||
"placements": [
|
||||
"skill-detail"
|
||||
],
|
||||
"executionProfile": "sync",
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "config-path",
|
||||
"args": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "add-todo",
|
||||
"label": "添加待办",
|
||||
"description": "添加待办事项。",
|
||||
"placements": [
|
||||
"skill-detail",
|
||||
"toolbar"
|
||||
],
|
||||
"executionProfile": "sync",
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "todo",
|
||||
"args": [
|
||||
"add",
|
||||
"--title",
|
||||
"{{title}}",
|
||||
"--priority",
|
||||
"{{priority}}",
|
||||
"--due-at",
|
||||
"{{due-at}}"
|
||||
]
|
||||
},
|
||||
"interaction": "form",
|
||||
"bind": {
|
||||
"tables": [
|
||||
"todos"
|
||||
]
|
||||
},
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"title": "待办标题",
|
||||
"description": "待办事项的标题,必填。"
|
||||
},
|
||||
"priority": {
|
||||
"type": "string",
|
||||
"title": "优先级",
|
||||
"description": "待办事项的优先级,可选。",
|
||||
"default": "normal",
|
||||
"enum": [
|
||||
"high",
|
||||
"normal",
|
||||
"low"
|
||||
]
|
||||
},
|
||||
"due-at": {
|
||||
"type": "number",
|
||||
"title": "提醒时间",
|
||||
"description": "格式 YYYY-MM-DD HH:MM,如 2026-08-01。",
|
||||
"display_type": "datetime_unix_seconds"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"priority"
|
||||
]
|
||||
},
|
||||
"hostEffects": {
|
||||
"onSuccess": [
|
||||
"reloadTable"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "todo-create",
|
||||
"label": "新增记录",
|
||||
"description": "添加待办事项。",
|
||||
"replaces": "create",
|
||||
"placements": [],
|
||||
"executionProfile": "sync",
|
||||
"interaction": "form",
|
||||
"bind": {
|
||||
"tables": [
|
||||
"todos"
|
||||
]
|
||||
},
|
||||
"hostEffects": {
|
||||
"onSuccess": [
|
||||
"reloadTable"
|
||||
]
|
||||
},
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": {
|
||||
"type": "string",
|
||||
"title": "待办标题",
|
||||
"description": "待办事项的标题,必填。"
|
||||
},
|
||||
"priority": {
|
||||
"type": "string",
|
||||
"title": "优先级",
|
||||
"description": "待办事项的优先级,可选。",
|
||||
"default": "normal",
|
||||
"enum": [
|
||||
"high",
|
||||
"normal",
|
||||
"low"
|
||||
]
|
||||
},
|
||||
"due-at": {
|
||||
"type": "number",
|
||||
"title": "提醒时间",
|
||||
"description": "格式 YYYY-MM-DD HH:MM,如 2026-08-01。",
|
||||
"display_type": "datetime_unix_seconds"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"priority"
|
||||
]
|
||||
},
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "todo",
|
||||
"args": [
|
||||
"add",
|
||||
"--title",
|
||||
"{{title}}",
|
||||
"--priority",
|
||||
"{{priority}}",
|
||||
"--due-at",
|
||||
"{{due-at}}"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@ def _add_run_subparser(sub) -> None:
|
||||
todo_sub = sp.add_subparsers(dest="todo_cmd", required=True, parser_class=ZhArgumentParser)
|
||||
|
||||
p = todo_sub.add_parser("add", help="新增一条待办")
|
||||
p.add_argument("title", help="待办标题(必填)")
|
||||
p.add_argument("-t","--title", help="待办标题(必填)")
|
||||
p.add_argument("-p", "--priority", default="normal",
|
||||
choices=["high", "normal", "low"], help="优先级,默认 normal")
|
||||
p.add_argument("-d", "--due-at", type=int, default=None,
|
||||
|
||||
@@ -56,7 +56,7 @@ def _seed_todos_display_metadata(cursor) -> None:
|
||||
table_name="todos",
|
||||
display_name="待办事项",
|
||||
description="本技能的核心业务表:每条待办事项一行。",
|
||||
grid_help="状态变更走技能 CLI(todo done / todo delete),不要在表里直接改。",
|
||||
grid_help="所有的待办事项,包括待办、已办、已删除。",
|
||||
visible=1,
|
||||
readonly=1, # 整表只读:增删改通过技能 Action 走,宿主不直写
|
||||
default_sort_json='[{"column":"created_at","direction":"desc"}]',
|
||||
@@ -79,11 +79,11 @@ def _seed_todos_display_metadata(cursor) -> None:
|
||||
"visible": 1, "searchable": 1, "editable": 0, "display_type": "enum",
|
||||
"options_json": '[{"value":"high","label":"高"},{"value":"normal","label":"中"},{"value":"low","label":"低"}]'},
|
||||
{"column_name": "due_at", "display_name": "截止时间", "description": "Unix 秒;可空",
|
||||
"visible": 1, "searchable": 1, "editable": 0, "display_type": "datetime_unix_seconds","default":"(unixepoch())"},
|
||||
"visible": 1, "searchable": 1, "editable": 0, "display_type": "datetime_unix_seconds"},
|
||||
{"column_name": "created_at", "display_name": "创建时间", "description": "Unix 秒",
|
||||
"visible": 1, "searchable": 0, "editable": 0, "display_type": "datetime_unix_seconds","default":"(unixepoch())"},
|
||||
"visible": 1, "searchable": 0, "editable": 0, "display_type": "datetime_unix_seconds"},
|
||||
{"column_name": "updated_at", "display_name": "更新时间", "description": "Unix 秒",
|
||||
"visible": 0, "searchable": 0, "editable": 0, "display_type": "datetime_unix_seconds","default":"(unixepoch())"},
|
||||
"visible": 0, "searchable": 0, "editable": 0, "display_type": "datetime_unix_seconds"},
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user