upsert_punch_day
Insert or replace a full day's content in a daily punch card book. Specifies goals and modules for a given book and day, with idempotent behavior to avoid duplicate nodes.
Instructions
把「第 N 天」整天内容灌进打卡书(幂等:同 book+day 重调 = 覆盖,不重复建节点)。
天节点名由 BE 按 day 生成,goals 落节点 meta_json.goals(今日目标条,简短口径, 🔴 学生/家长可见 → 禁内部词:层/★/素材/薄弱/挑题)。modules 原样透传给 BE。
参数: book_id : 打卡书 id(🔴 字符串;list_books(book_type='daily_punch') 查,严禁编造) day : 第几天(1 起正整数;同一 day 重灌 = 整天覆盖,agent 侧批量修正走这条路) goals : 今日目标 ["乘法连续进位","小数退位减","年、月、日"](简短短语,非整句) modules : 模块数组,按卷面顺序排;两类结构 —— ① 计算模块(出题器现产,题目不在题库 → 内容随书存 content_json): {"type":"oral|vertical|stepwise", "title":"口算题", "items":[{"q":"357+276=","a":"633"}, ...]} type 三型 = oral 口算 / vertical 竖式 / stepwise 脱式;q 题面、a 答案成对给全 (答案缺失 = 解析卷开天窗)。题目由 generate_calc_items 产,无需再人工验算。 ② 轮换位(教辅真题,题在题库 → 引用不复制): {"type":"rotating", "title":"解决问题", "qids":["2077057695340310530", ...]} 🔴 qids = 题目 id 的字符串数组(雪花号,search_questions / 生成器给的原样字符串); 🔴 绝不传题面文本——题面由 BE 按 biz_question_block.block_json 渲染, 改题库即改打卡书,零漂移(D5/D11)。传文本 = 制造第二个半源,必被打回。
返回: {ok, node_id(str), item_ids:[str]};未登录/参数不合法/BE 报错 → {ok:false, reason}。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| day | Yes | ||
| goals | Yes | ||
| book_id | Yes | ||
| modules | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||