{"record":{"id":"99bbe0c44df2c647","repo":"BigPizzaV3/CodexPlusPlus","slug":"dream-skin-99bbe0","errorCode":null,"errorMessage":"不支持的 Dream Skin 主题协议版本","messagePattern":"不支持的 Dream Skin 主题协议版本","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/dream_skin_package.rs","lineNumber":909,"sourceCode":"        bail!(\"主题包背景图片内容与扩展名不一致：{name}\");\n    }\n    Ok(())\n}\n\nfn file_limit(name: &str) -> usize {\n    match name {\n        \"manifest.json\" => MANIFEST_LIMIT,\n        \"theme.json\" => THEME_LIMIT,\n        \"theme.css\" => CSS_LIMIT,\n        \"LICENSE.txt\" => LICENSE_LIMIT,\n        \"manifest.sig\" => SIGNATURE_LIMIT,\n        _ => IMAGE_LIMIT,\n    }\n}\n\nfn validate_manifest(manifest: &DreamSkinPackageManifest, platform: &str) -> anyhow::Result<()> {\n    if manifest.package_version != 1 || manifest.skin_api_version != 1 {\n        bail!(\"不支持的 Dream Skin 主题协议版本\");\n    }\n    if manifest.theme_id.chars().count() < 3\n        || manifest.theme_id.chars().count() > 64\n        || !valid_theme_id(&manifest.theme_id)\n    {\n        bail!(\"manifest.themeId 无效\");\n    }\n    if !valid_semver(&manifest.version) || !valid_semver(&manifest.min_client_version) {\n        bail!(\"manifest 版本号无效\");\n    }\n    if compare_semver(&manifest.min_client_version, \"1.5.12\").is_gt() {\n        bail!(\n            \"主题包需要更新版本的 Dream Skin 协议：{}\",\n            manifest.min_client_version\n        );\n    }\n    if manifest.platforms.is_empty()\n        || manifest.platforms.len() > 2","sourceCodeStart":891,"sourceCodeEnd":927,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6/crates/codex-plus-core/src/dream_skin_package.rs#L891-L927","documentation":"validate_manifest requires package_version == 1 and skin_api_version == 1; any other protocol version is rejected with this message. The library only supports the first iteration of the Dream Skin package protocol.","triggerScenarios":"validate_and_read_package parses manifest.json whose packageVersion or skinApiVersion is 0, 2, or any value other than 1.","commonSituations":"Hand-writing manifest.json and omitting/typo-ing the version fields; using a manifest template from a newer or older tool version; future-proofing authors bumping versions before the library supports them.","solutions":["Set packageVersion: 1 and skinApiVersion: 1 in manifest.json and repack.","Regenerate the manifest with the current officially supported packaging tool.","If you target a newer protocol, upgrade the CodexPlusPlus runtime that supports it."],"exampleFix":"// before\n{ \"packageVersion\": 2, \"skinApiVersion\": 1, ... }\n// after\n{ \"packageVersion\": 1, \"skinApiVersion\": 1, ... }","handlingStrategy":"validation","validationCode":"fn manifest_versions_ok(m: &serde_json::Value) -> bool {\n    m[\"packageVersion\"] == 1 && m[\"skinApiVersion\"] == 1\n}","typeGuard":null,"tryCatchPattern":"match validate_and_read_package(path, platform) {\n    Ok(pkg) => install(pkg),\n    Err(e) if e.to_string().contains(\"不支持的 Dream Skin 主题协议版本\") => eprintln!(\"set packageVersion and skinApiVersion to 1\"),\n    Err(e) => return Err(e),\n}","preventionTips":["Generate manifests with the supported tooling, not by hand.","Pin packaging tool versions.","Check protocol versions before packaging upgrades."],"tags":["manifest","version","validation"],"backgroundTag":"unsupported-enum-value","analyzedSha":"b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6","analyzedAt":"2026-09-19T23:35:21.129Z","contentChangedAt":"2026-09-19T23:35:21.129Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}