Esq Build Package
esq_build_packageValidate and build an ESQ 1.0 question-bank ZIP from manifest, paper, and answer data, with optional auto-fixes for common formatting issues before packaging.
Instructions
校验并构建 ESQ 1.0 题库包 ZIP。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| papers | Yes | [{paperKey, year, units:[{unitKey, type(cloze|reading|part_b), title, sequence, passage?, candidates?, questions:[...]}]}] - cloze: passage.blocks[].text 用 {{blank:N}} 双花括号标记空位(不是单花括号!); 词库题用 unit.candidates=[{key:"A",content:"..."}], questions 不写 options - reading: questions 写 options=[{key:"A",content:"..."}] - question: {questionKey, number, type:"single_choice", stem, score} | |
| answers | Yes | {paperKey: {questionKey: {correctOption:"B", score: 2}}} —— 每空必填, correctOption 必须存在于该题选项 | |
| auto_fix | No | true 时先自动修复机械性坑再构建——含中文的 externalKey 重建为 cn.xxx.y2021.u1 风格(answers 键同步改名)、单花括号 {blank:N} 转双花括号、 缺失 sequence 补默认值。修复明细在返回值 fixes 数组; 判断性问题(空位数≠题数、 答案不在选项中)仍会报错。默认 false(拒绝 + 可行动错误)。 | |
| manifest | Yes | {packageId, contentVersion, title, subject, publisher, license:{notice}, source:{description}} | |
| output_path | Yes | 输出 ZIP 绝对路径 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||