add_mindmap_seed
Create a mindmap seed (root+branch+detail) for a lesson or course and link it in one call, merging separate create and association REST operations.
Instructions
为 lesson 或 course 挂一张 agent 出的思维导图 seed (root+branch+detail 基础框架). 一次调用完成建图 + 写关联 — 等价于 REST POST /mindmaps 接 POST /mindmaps/:id/associations 两步的合并版, 省得 agent 备课时绕 REST. 字段合同: 节点七字段 {id,title,level,pos_x,pos_y,is_expanded,sort_order} + 非 root 必带 parent_id, level ∈ root/branch/detail/note; links 只画跨分支联想, 禁止把父子关系抄进 links. 结构: root 1 个 → branch 3-4 个且各自说得出主张 → 每支 detail 2-4 个, 禁止连续独子成链, 禁止辐条伞(root 对每项发一根辐条, 与课文列表同构). 布局: pos_x/pos_y 落在 x 8-92 / y 12-95 内, root 天窗位 (50,8), 同级节点 y 差 ≥14, note 标题 ≤12 字. 完整教程: docs/recipes/mindmap-authoring.md(bench 考生看 candidate-kit/recipes/ 同名文件).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| content | Yes | MindmapContent — { nodes: MindmapNode[], links: MindmapLink[] } | |
| pair_id | No | 可选; 缺省用当前 pair。填了也只能填当前 pair —— 服务端校验归属, 别人的 pair id 一律 NOT_FOUND (脑图种不到别人名下)。 | |
| course_id | No | 与 lesson_id 二选一 — 关联到某门 course; 必须是当前 pair 名下的门 (服务端验存在性+归属) | |
| lesson_id | No | 与 course_id 二选一 — 关联到某节 lesson; 必须是当前 pair 名下的课 (服务端验存在性+归属) | |
| idempotency_key | No | 可选。幂等键 (建议 uuid) —— 同一 key 重放此调用返回首次结果, 不重复写入. 网络重试/断线重连时带上同一个 key, 而不是猜"上次到底写没写". | |
| agent_skill_used | No | 本次出图用的 skill 名称 |