(schema: unknown)
| 11 | import {getSkillByName, formatSkillContent, readSkillFile, getSkillCatalog} from '../skills/loader'; |
| 12 | |
| 13 | // ==================== 规则修改参数 ==================== |
| 14 | |
| 15 | const positionsSchema = z.record(z.object({ |
| 16 | x: z.number(), |
| 17 | y: z.number(), |
| 18 | width: z.number().positive().optional(), |
| 19 | height: z.number().positive().optional(), |
| 20 | })); |
| 21 | |
| 22 | const layoutOptionsSchema = z.object({ |
| 23 | mode: z.enum(['incremental', 'full']).optional().describe('incremental(默认)只摆放没有坐标的卡片;full 全图重排'), |
| 24 | pinned: z.array(z.string()).optional().describe('full 模式下保持不动的节点'), |
| 25 | }); |
| 26 | |
| 27 | const mergeSchema = z.object({ |
| 28 | id: z.string().min(1).describe('要局部修改的节点 ID'), |
| 29 | props: z.record(z.unknown()).optional().describe('浅合并到 props;值为 null 删除该键'), |
| 30 | cfg: z.record(z.unknown()).optional().describe('浅合并到 cfg;值为 null 删除该键'), |
| 31 | outputs: z.record(z.array(z.string())).optional().describe('按端口整体替换 outputs'), |
| 32 | inputs: z.record(z.unknown()).optional().describe('浅合并到 inputs;值为 null 删除该键'), |
| 33 | }); |
| 34 |
no outgoing calls
no test coverage detected