{"record":{"id":"3561e73f3c0e7b12","repo":"BigPizzaV3/CodexPlusPlus","slug":"dream-skin-3561e7","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":921,"sourceCode":"        _ => 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\n        || has_duplicates(&manifest.platforms)\n        || manifest\n            .platforms\n            .iter()\n            .any(|item| !matches!(item.as_str(), \"macos\" | \"windows\"))\n    {\n        bail!(\"manifest.platforms 无效\");\n    }\n    if !manifest.platforms.iter().any(|item| item == platform) {\n        bail!(\"主题包不支持当前平台：{platform}\");\n    }\n    if manifest.capabilities.is_empty()","sourceCodeStart":903,"sourceCodeEnd":939,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6/crates/codex-plus-core/src/dream_skin_package.rs#L903-L939","documentation":"validate_manifest rejects the package when compare_semver(manifest.minClientVersion, \"1.5.12\") is greater — i.e. the package declares it needs a Dream Skin protocol newer than this library supports. The error message embeds the offending minClientVersion. This is a forward-compatibility guard so the client never applies themes built against a newer skin API.","triggerScenarios":"validate_and_read_package reads a manifest with minClientVersion above 1.5.12, e.g. \"1.6.0\" or \"2.0.0\".","commonSituations":"Downloading a theme package authored for a newer Dream Skin release; a theme maintainer bumping minClientVersion prematurely; mixing packages from different protocol generations.","solutions":["Find a build of the theme package that targets minClientVersion <= 1.5.12","Ask the theme author to lower minClientVersion if the theme does not actually use newer protocol features","Upgrade Dream Skin / the client if a newer protocol version is genuinely required","Check the exact version in the error message to see how far ahead the package is"],"exampleFix":"// before (manifest.json)\n\"minClientVersion\": \"1.6.0\"\n// after\n\"minClientVersion\": \"1.5.12\"","handlingStrategy":"validation","validationCode":"fn supported_min_client(v: &str) -> bool {\n    let parse = |s: &str| -> (u64,u64,u64) { let p: Vec<u64> = s.split('.').filter_map(|x| x.parse().ok()).collect(); (p[0],p[1],p[2]) };\n    parse(v) <= (1,5,12)\n}\nif !supported_min_client(&manifest.min_client_version) { /* reject before calling */ }","typeGuard":"fn is_within_supported_protocol(min_client: &str) -> bool {\n    let nums: Vec<u64> = min_client.split('.').filter_map(|p| p.parse().ok()).collect();\n    nums.len() == 3 && (nums[0], nums[1], nums[2]) <= (1, 5, 12)\n}","tryCatchPattern":"match validate_and_read_package(&path, platform) {\n    Err(e) if e.to_string().contains(\"更新版本的 Dream Skin 协议\") => {\n        eprintln!(\"skip package: requires newer protocol: {e}\");\n    }\n    other => other?,\n}","preventionTips":["Check minClientVersion before downloading theme packages","Pin to package distributions targeting <= 1.5.12","Track upstream protocol releases to know when to raise the client floor"],"tags":["manifest","version-compatibility","protocol"],"backgroundTag":"incompatible-source-type","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"}