{"record":{"id":"e78f80ef435d002c","repo":"nikivdev/code","slug":"unsupported-external-cli-manifest-version-in","errorCode":null,"errorMessage":"unsupported external CLI manifest version {} in {}","messagePattern":"unsupported external CLI manifest version (.+?) in (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/external_cli.rs","lineNumber":539,"sourceCode":"    let record: ExternalCliLinkRecord =\n        toml::from_str(&content).with_context(|| format!(\"failed to parse {}\", path.display()))?;\n    if record.version != LINK_RECORD_VERSION {\n        bail!(\n            \"unsupported external CLI link record version {} in {}\",\n            record.version,\n            path.display()\n        );\n    }\n    Ok(record)\n}\n\nfn read_manifest(path: &Path) -> Result<ExternalCliManifest> {\n    let content =\n        fs::read_to_string(path).with_context(|| format!(\"failed to read {}\", path.display()))?;\n    let manifest: ExternalCliManifest =\n        toml::from_str(&content).with_context(|| format!(\"failed to parse {}\", path.display()))?;\n    if manifest.version != 1 {\n        bail!(\n            \"unsupported external CLI manifest version {} in {}\",\n            manifest.version,\n            path.display()\n        );\n    }\n    if manifest.exec.run.is_empty() {\n        bail!(\"missing exec.run in {}\", path.display());\n    }\n    Ok(manifest)\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    fn write_tool(root: &Path, id: &str) -> PathBuf {\n        let tool_root = root.join(id);\n        fs::create_dir_all(&tool_root).expect(\"create tool root\");","sourceCodeStart":521,"sourceCodeEnd":557,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/external_cli.rs#L521-L557","documentation":"`read_manifest` parses an external CLI manifest TOML and requires `version == 1`. Any other version is rejected with this error naming the found version and manifest path, since the library only understands the v1 manifest schema.","triggerScenarios":"Calling `list_external_cli_tools`, `install_external_cli_link`, `resolve_external_cli_tool_in_roots`, or `resolved_from_link_record` on a manifest whose `version` field is not exactly 1.","commonSituations":"Manifest written for a future/other tool version; hand-edited version field; manifests generated by a newer exporter using a v2 schema; copy-pasted manifests from a different project.","solutions":["Change the manifest's `version` to `1` if its schema is the v1 format and the edit was accidental.","Regenerate or rewrite the manifest using the v1 schema (version = 1, plus valid `id` and `[exec] run`).","Upgrade the library/tooling to a release that supports the manifest version you have, if a newer schema is intended.","Check the manifest's provenance — it may belong to a different tool ecosystem."],"exampleFix":"# before (tool.toml)\nversion = 2\n\n# after\nversion = 1","handlingStrategy":"validation","validationCode":"fn check_manifest_version(path: &Path) -> Result<(), String> {\n    let text = std::fs::read_to_string(path).map_err(|e| e.to_string())?;\n    let v: toml::Value = toml::from_str(&text).map_err(|e| e.to_string())?;\n    let ver = v.get(\"version\").and_then(|v| v.as_integer()).unwrap_or(-1);\n    if ver == 1 { Ok(()) } else { Err(format!(\"{}: manifest version {ver} != 1\", path.display())) }\n}","typeGuard":null,"tryCatchPattern":"match loader.read_manifest(&path) {\n    Err(e) if e.to_string().contains(\"unsupported external CLI manifest version\") => {\n        eprintln!(\"{e}; migrating manifest to v1 schema\");\n        migrate_manifest_to_v1(&path)?;\n        loader.read_manifest(&path)\n    }\n    other => other,\n}","preventionTips":["Keep `version = 1` in all manifests until the library supports newer schemas.","Run a manifest linter over all tool manifests in CI.","When copying manifests between projects, verify schema/version compatibility.","Regenerate manifests with the tooling's own exporter rather than hand-editing."],"tags":["external-cli","versioning","manifest"],"backgroundTag":"unsupported-format-version","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}