基于 skill-template 脚手架开发,包含: - payroll_config(费率配置,可编辑)+ payslip_snapshots(解析历史,只读)2 张业务表 - 全国默认 + 北上广 4 套费率(社保/公积金/个税起征点/7 级税率表) - 5 个业务 Action:calculate-payslip-simple / calculate-payslip-full / explain-term / view-config / edit-config - 个税累计预扣法计算,支持多月历史累加 - 20 个薪资名词库(社保/公积金/个税/全勤/加班费等) - 完整市场文档(README/TUTORIAL/DEMO/CHANGELOG) - 296 测试全部通过
79 lines
3.0 KiB
JSON
79 lines
3.0 KiB
JSON
{
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"$id": "https://openclaw.local/skill-template/skill-cell-presentation.schema.json",
|
||
"title": "SkillCellPresentationDocument",
|
||
"description": "匠厂数据管理「单元格呈现」文档(schemaVersion 1)。技能按业务规则为「某表某行某列」声明语义 tone(非任意 CSS);宿主映射主题样式。用途不限(时效超时、库存预警、状态异常、必填缺失等)。详见 references/CELL_PRESENTATION.md。",
|
||
"type": "object",
|
||
"required": ["schemaVersion", "skill", "table", "rowKey", "cells"],
|
||
"additionalProperties": false,
|
||
"properties": {
|
||
"schemaVersion": {
|
||
"type": "integer",
|
||
"const": 1
|
||
},
|
||
"skill": {
|
||
"type": "string",
|
||
"pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
|
||
"minLength": 1,
|
||
"description": "与 SKILL.md metadata.openclaw.slug / actions.json skill 一致"
|
||
},
|
||
"table": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"pattern": "^[a-z][a-z0-9_]*$",
|
||
"description": "业务表物理名(snake_case)"
|
||
},
|
||
"rowKey": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"pattern": "^[a-z][a-z0-9_]*$",
|
||
"description": "用于匹配行的业务表列名(如 id、feishu_record_id);cells[].rowId 的值取自该列"
|
||
},
|
||
"generatedAt": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"description": "可选。ISO-8601 或技能约定的生成时间,便于排障"
|
||
},
|
||
"cells": {
|
||
"type": "array",
|
||
"description": "当前应对该表生效的呈现项;空数组 = 该表无特殊呈现(清除旧样式)。同 (rowId, column) 重复时宿主可后者覆盖前者。",
|
||
"items": { "$ref": "#/$defs/cellItem" }
|
||
}
|
||
},
|
||
"$defs": {
|
||
"tone": {
|
||
"type": "string",
|
||
"enum": ["danger", "warning", "info", "success", "muted"],
|
||
"description": "语义色板(闭集)。宿主映射到底色/字色/左边线等;禁止技能下发原始 CSS 或任意 hex。"
|
||
},
|
||
"cellItem": {
|
||
"type": "object",
|
||
"required": ["rowId", "column", "tone"],
|
||
"additionalProperties": false,
|
||
"properties": {
|
||
"rowId": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"description": "rowKey 列的字符串形式主键/业务键"
|
||
},
|
||
"column": {
|
||
"type": "string",
|
||
"minLength": 1,
|
||
"pattern": "^[a-z][a-z0-9_]*$",
|
||
"description": "要强调的业务列名(snake_case),必须是真实列"
|
||
},
|
||
"tone": { "$ref": "#/$defs/tone" },
|
||
"message": {
|
||
"type": "string",
|
||
"maxLength": 500,
|
||
"description": "可选。悬停/无障碍说明(短文案);不要塞长报告"
|
||
},
|
||
"alert": {
|
||
"type": "boolean",
|
||
"description": "可选,默认 false。true = 可计入进页/同步后的提醒汇总(如 Toast);填完数据并重算后该项消失则提醒自然关闭"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|