feat: 补 MIT 许可、自动抓取工具与学科覆盖元数据
一些检查失败了
ci / lint (push) Failing after 52s

登记 chinese-poetry / ck12 / phet,并让 source schema、lint 与 INDEX 能按学科和抓取进度消费。

Co-authored-by: Cursor <cursoragent@cursor.com>
这个提交包含在:
2026-08-22 01:27:25 +08:00
父节点 4c054340dc
当前提交 a006c8c504
共有 23 个文件被更改,包括 2510 次插入 和 111 次删除

查看文件

@@ -3,47 +3,230 @@
"title": "edu-content source registry",
"description": "机器可读的 L1 资源清单。一个 YAML 文件 = 一个域,内含多条 source。source 是四层血缘链的根 id。",
"type": "object",
"required": ["sources"],
"required": [
"sources"
],
"additionalProperties": false,
"properties": {
"sources": {
"type": "array",
"items": { "$ref": "#/definitions/source" }
"items": {
"$ref": "#/definitions/source"
}
}
},
"definitions": {
"source": {
"type": "object",
"required": ["id", "title", "publisher", "type", "license", "status"],
"required": [
"id",
"title",
"publisher",
"type",
"license",
"status",
"subjects"
],
"additionalProperties": false,
"properties": {
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$", "description": "全局唯一 kebab-case,血缘链根 id" },
"title": { "type": "string" },
"publisher": { "type": "string" },
"type": { "type": "string", "enum": ["dataset", "website", "book", "internal", "tool"] },
"url": { "type": ["string", "null"], "description": "internal 可为 null" },
"license": { "type": "string", "enum": ["official-free", "cc-by", "cc-by-sa", "cc-nc-education", "restricted", "internal-only", "llm-generated", "unknown"] },
"license_note": { "type": "string" },
"fetch_method": { "type": "string", "enum": ["curl", "git-clone", "manual-download", "manual-export", "generated"], "description": "unknown 允许暂存" },
"status": { "type": "string", "enum": ["planned", "fetching", "fetched", "failed", "archived"] },
"fetched_at": { "type": ["string", "null"], "pattern": "^\\d{4}-\\d{2}-\\d{2}$|^$" },
"items": { "type": "array", "items": { "$ref": "#/definitions/item" } }
"id": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]*$",
"description": "全局唯一 kebab-case,血缘链根 id"
},
"title": {
"type": "string"
},
"publisher": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"dataset",
"website",
"book",
"internal",
"tool"
]
},
"url": {
"type": [
"string",
"null"
],
"description": "internal 可为 null"
},
"license": {
"type": "string",
"enum": [
"official-free",
"mit",
"cc-by",
"cc-by-sa",
"cc-nc-education",
"restricted",
"internal-only",
"llm-generated",
"unknown"
]
},
"license_note": {
"type": "string"
},
"fetch_method": {
"type": "string",
"enum": [
"curl",
"git-clone",
"manual-download",
"manual-export",
"generated"
],
"description": "unknown 允许暂存"
},
"status": {
"type": "string",
"enum": [
"planned",
"fetching",
"fetched",
"failed",
"archived"
]
},
"fetched_at": {
"type": [
"string",
"null"
],
"pattern": "^\\d{4}-\\d{2}-\\d{2}$|^$"
},
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/item"
}
},
"subjects": {
"type": "array",
"items": {
"type": "string",
"enum": [
"chinese",
"math",
"english",
"science",
"morality",
"physics",
"chemistry",
"biology",
"history",
"geography",
"it",
"ket",
"pet",
"fce",
"amc8",
"cspj"
]
},
"description": "该来源覆盖的学科/考试域,取值与 structured/ 目录名一致;用于回答『某学科有哪些来源』"
},
"stages": {
"type": "array",
"items": {
"type": "string",
"enum": [
"primary",
"junior"
]
},
"description": "覆盖学段:primary=小学,junior=初中"
},
"url_template": {
"type": [
"string",
"null"
],
"description": "fetch_method=curl 时的下载模板,{item_id} 占位;item.url 优先级更高。例:https://host/sims/{item_id}/{item_id}_zh_CN.html"
}
}
},
"item": {
"type": "object",
"required": ["id", "title"],
"required": [
"id",
"title"
],
"additionalProperties": false,
"properties": {
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$", "description": "source 内唯一" },
"title": { "type": "string" },
"oss_key": { "type": ["string", "null"], "description": "fetched 后必填,形如 edu-raw/exams/ket/vocab/cambridge-official/a2-key-vocab.pdf" },
"sha256": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$|^$" },
"size": { "type": ["integer", "null"], "minimum": 0 },
"media_type": { "type": "string" },
"fetch_date": { "type": ["string", "null"], "pattern": "^\\d{4}-\\d{2}-\\d{2}$|^$" },
"status": { "type": "string", "enum": ["planned", "fetching", "fetched", "failed", "archived"] },
"note": { "type": "string" }
"id": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9-]*$",
"description": "source 内唯一"
},
"title": {
"type": "string"
},
"oss_key": {
"type": [
"string",
"null"
],
"description": "fetched 后必填,形如 edu-raw/exams/ket/vocab/cambridge-official/a2-key-vocab.pdf"
},
"sha256": {
"type": [
"string",
"null"
],
"pattern": "^[a-f0-9]{64}$|^$"
},
"size": {
"type": [
"integer",
"null"
],
"minimum": 0
},
"media_type": {
"type": "string"
},
"fetch_date": {
"type": [
"string",
"null"
],
"pattern": "^\\d{4}-\\d{2}-\\d{2}$|^$"
},
"status": {
"type": "string",
"enum": [
"planned",
"fetching",
"fetched",
"failed",
"archived"
]
},
"note": {
"type": "string"
},
"url": {
"type": [
"string",
"null"
],
"description": "该条目的直接下载地址;缺省时由 source.url_template 渲染"
},
"src_path": {
"type": [
"string",
"null"
],
"description": "fetch_method=git-clone 时,条目在仓库内的相对路径(打包为 oss_key 指向的归档)"
}
}
}
}