feat: 项目经费进度播报助手首版 v1.0.1(track-fund-progress-default)
All checks were successful
技能自动化发布 / release (push) Successful in 7s
All checks were successful
技能自动化发布 / release (push) Successful in 7s
This commit is contained in:
389
assets/actions.json
Normal file
389
assets/actions.json
Normal file
@@ -0,0 +1,389 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"skill": "track-fund-progress-default",
|
||||
"actions": [
|
||||
{
|
||||
"id": "broadcast-progress",
|
||||
"label": "经费进度播报",
|
||||
"description": "按项目台账计算实际支出率与序时进度,识别严重滞后/支出异常偏快,生成三段式播报与《经费执行简报》。缺省播报全部在研项目。",
|
||||
"placements": ["agent", "toolbar"],
|
||||
"executionProfile": "sync",
|
||||
"interaction": "form",
|
||||
"bind": {
|
||||
"tables": ["fund_projects"]
|
||||
},
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "broadcast",
|
||||
"args": [
|
||||
"--project-no", "{{projectNo}}",
|
||||
"--pi", "{{pi}}",
|
||||
"--as-of", "{{asOf}}"
|
||||
]
|
||||
},
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"projectNo": {
|
||||
"type": "string",
|
||||
"title": "项目编号",
|
||||
"description": "只播报该项目。留空播报全部在研项目。"
|
||||
},
|
||||
"pi": {
|
||||
"type": "string",
|
||||
"title": "负责人",
|
||||
"description": "按负责人姓名模糊筛选。留空不筛选。"
|
||||
},
|
||||
"asOf": {
|
||||
"type": "string",
|
||||
"title": "评估基准日",
|
||||
"description": "数据截止日期 YYYY-MM-DD,缺省今天。",
|
||||
"display_type": "date"
|
||||
}
|
||||
}
|
||||
},
|
||||
"hostEffects": {
|
||||
"onSuccess": ["reloadTable"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "broadcast-monthly",
|
||||
"label": "月度经费播报",
|
||||
"description": "遍历全部在研项目逐项播报并生成月度汇总简报;适合每月定时执行(任务中心可见进度)。",
|
||||
"placements": ["agent", "cron"],
|
||||
"executionProfile": "async",
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "broadcast-monthly",
|
||||
"args": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "add-project",
|
||||
"label": "录入项目台账",
|
||||
"description": "按项目编号录入或更新项目台账(幂等,未提供字段不覆盖)。",
|
||||
"placements": ["toolbar"],
|
||||
"executionProfile": "sync",
|
||||
"interaction": "form",
|
||||
"bind": {
|
||||
"tables": ["fund_projects"]
|
||||
},
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "add-project",
|
||||
"args": [
|
||||
"--project-no", "{{projectNo}}",
|
||||
"--name", "{{name}}",
|
||||
"--type", "{{type}}",
|
||||
"--pi", "{{pi}}",
|
||||
"--department", "{{department}}",
|
||||
"--total-approved", "{{totalApproved}}",
|
||||
"--total-received", "{{totalReceived}}",
|
||||
"--total-spent", "{{totalSpent}}",
|
||||
"--frozen", "{{frozen}}",
|
||||
"--frozen-since", "{{frozenSince}}",
|
||||
"--start", "{{start}}",
|
||||
"--end", "{{end}}",
|
||||
"--status", "{{status}}",
|
||||
"--remark", "{{remark}}"
|
||||
]
|
||||
},
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"projectNo": {
|
||||
"type": "string",
|
||||
"title": "项目编号",
|
||||
"description": "项目唯一编号(必填)。"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"title": "项目名称",
|
||||
"description": "项目全称。"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"title": "项目类别",
|
||||
"description": "纵向 / 横向 / 其他。",
|
||||
"enum": ["纵向", "横向", "其他"]
|
||||
},
|
||||
"pi": {
|
||||
"type": "string",
|
||||
"title": "负责人",
|
||||
"description": "项目负责人姓名。"
|
||||
},
|
||||
"department": {
|
||||
"type": "string",
|
||||
"title": "所属学院",
|
||||
"description": "二级学院/单位。"
|
||||
},
|
||||
"totalApproved": {
|
||||
"type": "number",
|
||||
"title": "总立项经费(元)",
|
||||
"description": "立项批复总经费。"
|
||||
},
|
||||
"totalReceived": {
|
||||
"type": "number",
|
||||
"title": "已到账(元)",
|
||||
"description": "已到账经费,执行率分母。"
|
||||
},
|
||||
"totalSpent": {
|
||||
"type": "number",
|
||||
"title": "已报销(元)",
|
||||
"description": "已报销支出,执行率分子。"
|
||||
},
|
||||
"frozen": {
|
||||
"type": "number",
|
||||
"title": "冻结/暂付款(元)",
|
||||
"description": "冻结或暂付款金额。可选。"
|
||||
},
|
||||
"frozenSince": {
|
||||
"type": "string",
|
||||
"title": "暂付款最早发生日",
|
||||
"description": "YYYY-MM-DD,用于账龄提醒。可选。",
|
||||
"display_type": "date"
|
||||
},
|
||||
"start": {
|
||||
"type": "string",
|
||||
"title": "执行期开始",
|
||||
"description": "YYYY-MM-DD。",
|
||||
"display_type": "date"
|
||||
},
|
||||
"end": {
|
||||
"type": "string",
|
||||
"title": "执行期结束",
|
||||
"description": "YYYY-MM-DD。",
|
||||
"display_type": "date"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"title": "项目状态",
|
||||
"description": "在研 / 已结题 / 暂缓,缺省在研。",
|
||||
"enum": ["在研", "已结题", "暂缓"]
|
||||
},
|
||||
"remark": {
|
||||
"type": "string",
|
||||
"title": "备注",
|
||||
"description": "维护说明。可选。"
|
||||
}
|
||||
},
|
||||
"required": ["projectNo"]
|
||||
},
|
||||
"hostEffects": {
|
||||
"onSuccess": ["reloadTable"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "import-projects",
|
||||
"label": "批量导入台账",
|
||||
"description": "粘贴或指定项目台账 JSON 数组,按项目编号批量导入/更新。",
|
||||
"placements": ["agent"],
|
||||
"executionProfile": "sync",
|
||||
"interaction": "form",
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "import-projects",
|
||||
"args": [
|
||||
"--projects-json", "{{projectsJson}}"
|
||||
]
|
||||
},
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"projectsJson": {
|
||||
"type": "string",
|
||||
"title": "台账 JSON",
|
||||
"description": "项目对象数组,字段如 projectNo、projectName、piName、totalApproved、totalReceived、totalSpent、frozenAmount、startDate、endDate、status。",
|
||||
"display_type": "textarea"
|
||||
}
|
||||
},
|
||||
"required": ["projectsJson"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "list-projects",
|
||||
"label": "查询项目台账",
|
||||
"description": "按负责人或状态查询项目台账。",
|
||||
"placements": ["agent"],
|
||||
"executionProfile": "sync",
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "list-projects",
|
||||
"args": [
|
||||
"--pi", "{{pi}}",
|
||||
"--status", "{{status}}"
|
||||
]
|
||||
},
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pi": {
|
||||
"type": "string",
|
||||
"title": "负责人",
|
||||
"description": "姓名模糊筛选。可选。"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"title": "状态",
|
||||
"description": "在研 / 已结题 / 暂缓。可选。",
|
||||
"enum": ["在研", "已结题", "暂缓"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "list-reports",
|
||||
"label": "查询播报历史",
|
||||
"description": "查看最近的经费播报记录,可按执行状态筛选。",
|
||||
"placements": ["agent"],
|
||||
"executionProfile": "sync",
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "list-reports",
|
||||
"args": [
|
||||
"--limit", "{{limit}}",
|
||||
"--status-tag", "{{statusTag}}"
|
||||
]
|
||||
},
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"limit": {
|
||||
"type": "number",
|
||||
"title": "条数",
|
||||
"description": "返回条数,默认 20。可选。"
|
||||
},
|
||||
"statusTag": {
|
||||
"type": "string",
|
||||
"title": "执行状态",
|
||||
"description": "严重滞后 / 支出异常偏快 / 正常。可选。",
|
||||
"enum": ["严重滞后", "支出异常偏快", "正常"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "render-html",
|
||||
"label": "生成经费简报",
|
||||
"description": "重建《经费执行简报》HTML 并写入技能数据目录 html/(缺省重建最近 10 份)。",
|
||||
"placements": ["toolbar", "skill-detail", "agent"],
|
||||
"executionProfile": "sync",
|
||||
"interaction": "direct",
|
||||
"bind": {
|
||||
"tables": ["progress_reports"]
|
||||
},
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "render-html",
|
||||
"args": []
|
||||
},
|
||||
"steps": [
|
||||
{
|
||||
"when": "afterSuccess",
|
||||
"do": "refreshCatalog"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "view-rules",
|
||||
"label": "查看预警阈值",
|
||||
"description": "查看严重滞后/异常偏快/暂付款账龄/结题预警阈值。",
|
||||
"placements": ["agent", "skill-detail"],
|
||||
"executionProfile": "sync",
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "view-rules",
|
||||
"args": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "set-rule",
|
||||
"label": "更新预警阈值",
|
||||
"description": "按规则键更新阈值;修改后下一次播报生效。",
|
||||
"placements": ["row"],
|
||||
"executionProfile": "sync",
|
||||
"interaction": "form",
|
||||
"bind": {
|
||||
"tables": ["alert_rules"],
|
||||
"inputMapping": {
|
||||
"ruleKey": "{{rule_key}}"
|
||||
}
|
||||
},
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "set-rule",
|
||||
"args": [
|
||||
"--rule-key", "{{ruleKey}}",
|
||||
"--value", "{{value}}"
|
||||
]
|
||||
},
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ruleKey": {
|
||||
"type": "string",
|
||||
"title": "规则键",
|
||||
"description": "由所在行预填。"
|
||||
},
|
||||
"value": {
|
||||
"type": "number",
|
||||
"title": "新阈值",
|
||||
"description": "比例为小数(0.10=10个百分点),天数为天数。"
|
||||
}
|
||||
},
|
||||
"required": ["ruleKey", "value"]
|
||||
},
|
||||
"hostEffects": {
|
||||
"onSuccess": ["reloadTable"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "stats",
|
||||
"label": "播报统计",
|
||||
"description": "查看项目总量、播报状态分布、严重滞后 Top 与暂付款总额。",
|
||||
"placements": ["agent", "skill-detail"],
|
||||
"executionProfile": "sync",
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "stats",
|
||||
"args": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "health",
|
||||
"label": "运行检查",
|
||||
"description": "检查技能运行环境并返回结构化结果。",
|
||||
"placements": ["skill-detail"],
|
||||
"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": "返回用户 .env 与模板路径。",
|
||||
"placements": ["skill-detail"],
|
||||
"executionProfile": "sync",
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "config-path",
|
||||
"args": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user