BigPizzaV3/CodexPlusPlus · error

主题包需要更新版本的 Dream Skin 协议:

Error message

主题包需要更新版本的 Dream Skin 协议:{}

What it means

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.

Solutions

  1. Find a build of the theme package that targets minClientVersion <= 1.5.12
  2. Ask the theme author to lower minClientVersion if the theme does not actually use newer protocol features
  3. Upgrade Dream Skin / the client if a newer protocol version is genuinely required
  4. Check the exact version in the error message to see how far ahead the package is

Example fix

// before (manifest.json)
"minClientVersion": "1.6.0"
// after
"minClientVersion": "1.5.12"
Defensive patterns

Strategy: validation

Validate before calling

fn supported_min_client(v: &str) -> bool {
    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]) };
    parse(v) <= (1,5,12)
}
if !supported_min_client(&manifest.min_client_version) { /* reject before calling */ }

Type guard

fn is_within_supported_protocol(min_client: &str) -> bool {
    let nums: Vec<u64> = min_client.split('.').filter_map(|p| p.parse().ok()).collect();
    nums.len() == 3 && (nums[0], nums[1], nums[2]) <= (1, 5, 12)
}

Try / catch

match validate_and_read_package(&path, platform) {
    Err(e) if e.to_string().contains("更新版本的 Dream Skin 协议") => {
        eprintln!("skip package: requires newer protocol: {e}");
    }
    other => other?,
}

Prevention

When it happens

Trigger: validate_and_read_package reads a manifest with minClientVersion above 1.5.12, e.g. "1.6.0" or "2.0.0".

Common situations: Downloading a theme package authored for a newer Dream Skin release; a theme maintainer bumping minClientVersion prematurely; mixing packages from different protocol generations.

Understand the failure class

Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.

Related errors


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@b1ed92e5e4 (2026-09-19). Data as JSON: /api/errors/3561e73f3c0e7b12. Report an issue: GitHub.

Appendix: source

Thrown at crates/codex-plus-core/src/dream_skin_package.rs:921

        _ => IMAGE_LIMIT,
    }
}

fn validate_manifest(manifest: &DreamSkinPackageManifest, platform: &str) -> anyhow::Result<()> {
    if manifest.package_version != 1 || manifest.skin_api_version != 1 {
        bail!("不支持的 Dream Skin 主题协议版本");
    }
    if manifest.theme_id.chars().count() < 3
        || manifest.theme_id.chars().count() > 64
        || !valid_theme_id(&manifest.theme_id)
    {
        bail!("manifest.themeId 无效");
    }
    if !valid_semver(&manifest.version) || !valid_semver(&manifest.min_client_version) {
        bail!("manifest 版本号无效");
    }
    if compare_semver(&manifest.min_client_version, "1.5.12").is_gt() {
        bail!(
            "主题包需要更新版本的 Dream Skin 协议:{}",
            manifest.min_client_version
        );
    }
    if manifest.platforms.is_empty()
        || manifest.platforms.len() > 2
        || has_duplicates(&manifest.platforms)
        || manifest
            .platforms
            .iter()
            .any(|item| !matches!(item.as_str(), "macos" | "windows"))
    {
        bail!("manifest.platforms 无效");
    }
    if !manifest.platforms.iter().any(|item| item == platform) {
        bail!("主题包不支持当前平台:{platform}");
    }
    if manifest.capabilities.is_empty()

View on GitHub (pinned to b1ed92e5e4)