{ "schemaVersion": 1, "skill": "alert-contract-expiring-hr", "actions": [ { "id": "health", "label": "运行检查", "description": "检查技能运行环境、人事系统 API 连通性、考核数据接口可用性。", "placements": ["skill-detail", "agent"], "executionProfile": "sync", "entrypoint": { "type": "cli", "command": "health", "args": [] } }, { "id": "version", "label": "查看版本", "description": "返回技能版本和机器标识。", "placements": ["skill-detail"], "executionProfile": "sync", "entrypoint": { "type": "cli", "command": "version", "args": [] } }, { "id": "config-path", "label": "查看配置位置", "description": "返回技能配置文件位置。", "placements": ["skill-detail"], "executionProfile": "sync", "entrypoint": { "type": "cli", "command": "config-path", "args": [] } }, { "id": "scan-expiring-contracts", "label": "扫描即将到期合同", "description": "扫描全校教职工合同电子台账,对距到期日 90/60/30 天的合同分别给出黄/橙/红三级预警,并自动生成个人任务书与单位清单。", "placements": ["cron", "agent", "toolbar"], "executionProfile": "async", "bind": { "tables": ["合同台账"] }, "entrypoint": { "type": "cli", "command": "scan-expiring-contracts", "args": ["--thresholds", "90,60,30"] } }, { "id": "collect-from-platform", "label": "立即同步合同台账", "description": "从 SmartCampus HR 平台同步最新合同台账与续聘材料包到本技能数据目录。", "placements": ["toolbar", "agent"], "executionProfile": "async", "bind": { "tables": ["合同台账"] }, "entrypoint": { "type": "cli", "command": "collect-from-platform", "args": [] } }, { "id": "generate-renewal-task", "label": "生成续聘任务书", "description": "为指定合同对应的教师生成个人版《续聘准备任务书》(HTML + 通知推送),含近三年业绩摘要、AI 续聘建议、所需材料清单。", "placements": ["row", "agent"], "executionProfile": "sync", "bind": { "tables": ["合同台账"], "selectionMode": "required", "labelColumn": "教职工姓名" }, "entrypoint": { "type": "cli", "command": "generate-renewal-task", "args": ["--contract-id", "{row.合同ID}"] }, "v1_1_30_notes": "contract-id 缺失时返回 JSON 提示(missing_arg),不再 argparse 报错。" }, { "id": "dispatch-task-notice", "label": "下发续聘任务通知单", "description": "按二级单位或按月份生成单位版《本月合同到期人员清单及续聘建议》并推送给人事秘书。", "placements": ["batch", "agent"], "executionProfile": "sync", "bind": { "tables": ["合同台账", "预警记录"], "selectionMode": "optional" }, "entrypoint": { "type": "cli", "command": "dispatch-task-notice", "args": ["--unit-id", "{form.unit_id}", "--month", "{form.month}"] }, "v1_1_30_notes": "unit-id 缺失时返回 JSON 提示(missing_arg),不再 argparse 报错。" }, { "id": "mark-contract-renewed", "label": "标记合同已续签", "description": "将指定合同标记为已续签(须上传续签材料),并自动解除预警。", "placements": ["row"], "executionProfile": "sync", "bind": { "tables": ["合同台账"], "selectionMode": "required", "labelColumn": "教职工姓名" }, "entrypoint": { "type": "cli", "command": "mark-contract-renewed", "args": ["--contract-id", "{row.合同ID}", "--material-id", "{form.material_id}"] }, "v1_1_30_notes": "contract-id/material-id 缺失时返回 JSON 提示(missing_arg),不再 argparse 报错。" }, { "id": "render-html", "label": "在浏览器中打开续聘任务书", "description": "渲染已生成的个人版《续聘准备任务书》HTML 页面,宿主 iframe 预览。", "placements": ["skill-detail", "agent"], "executionProfile": "sync", "entrypoint": { "type": "cli", "command": "render-html", "args": ["--task-id", "{form.task_id}"] }, "v1_1_30_notes": "task-id 缺失时返回 JSON 提示(missing_arg),不再 argparse 报错。" }, { "id": "show-config", "label": "查看运行时配置", "description": "展示 .env 中已设置的全部非空配置项;含 TOKEN/SECRET/KEY/PASSWORD 的字段自动脱敏。", "placements": ["skill-detail", "agent"], "executionProfile": "sync", "entrypoint": { "type": "cli", "command": "show-config", "args": [] } }, { "id": "logs-list", "label": "查看运行日志", "description": "读取日志文件末尾 N 行(默认 200 行),按 INFO/WARNING/ERROR 等级过滤;日志文件不存在时返回 exists=false。", "placements": ["skill-detail", "agent"], "executionProfile": "sync", "entrypoint": { "type": "cli", "command": "logs-list", "args": ["--tail", "200", "--level", "INFO"] } }, { "id": "download-materials", "label": "批量下载材料包", "description": "从合同台账的 download_tasks 队列领取 N 条 pending 任务,启动浏览器从 SmartCampus HR 平台下载续聘材料包(pdf/docx)。", "placements": ["toolbar", "batch", "cron", "agent"], "executionProfile": "async", "interaction": "form", "bind": { "tables": ["download_tasks"], "selectionMode": "optional", "labelColumn": "contract_id", "inputMapping": {"itemIds": "$selection.ids"} }, "confirmation": { "message": "将启动浏览器下载续聘材料包(仅 pending 会执行),是否继续?" }, "entrypoint": { "type": "cli", "command": "download-materials", "args": ["--ids", "{form.itemIds}", "--pick", "{form.pickCount}"] }, "inputSchema": { "type": "object", "required": ["itemIds", "pickCount"], "properties": { "itemIds": {"type": "string", "title": "队列编号列表", "readOnly": true}, "pickCount": {"type": "number", "title": "领取数量", "default": 5, "minimum": 1, "maximum": 50} } } }, { "id": "import-input", "label": "扫描输入目录并入库", "description": "主动扫描 data/input/contracts/*.csv 入库合同,data/input/materials/{contract_id}__*.* 入库材料(自动入库到 materials_content)。", "placements": ["skill-detail", "agent", "cron"], "executionProfile": "async", "entrypoint": { "type": "cli", "command": "import-input", "args": [] } } ] }