{"record":{"id":"7d11d4fe928d7d1e","repo":"astrid-runtime/astrid","slug":"capsule-name-has-no-meta-json-cannot-determi","errorCode":null,"errorMessage":"Capsule '{name}' has no meta.json - cannot determine original source. Re-install it manually.","messagePattern":"Capsule '(.+?)' has no meta\\.json - cannot determine original source\\. Re-install it manually\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/capsule/install_update.rs","lineNumber":141,"sourceCode":"\n    if !workspace {\n        return update_daemon_capsules(target, &principal, approve_untrusted).await;\n    }\n\n    if let Some(name) = target {\n        let target_dir = astrid_capsule_install::resolve_target_dir_for_with_layout(\n            &home,\n            &principal,\n            name,\n            workspace,\n            crate::workspace_layout::current(),\n        )?;\n        if !target_dir.exists() {\n            bail!(\"Capsule '{name}' is not installed.\");\n        }\n\n        let meta = read_meta(&target_dir).ok_or_else(|| {\n            anyhow::anyhow!(\n                \"Capsule '{name}' has no meta.json - cannot determine original source. \\\n                 Re-install it manually.\"\n            )\n        })?;\n\n        let source = meta.source.ok_or_else(|| {\n            anyhow::anyhow!(\n                \"Capsule '{name}' was installed before source tracking was added. \\\n                 Re-install it manually to record the source.\"\n            )\n        })?;\n\n        eprintln!(\"Updating {name} from {source}...\");\n        // Re-install exactly the capsule being updated. When `source` is a\n        // monorepo release that ships several `.capsule` assets, pass `name`\n        // as the selector so update refreshes only that one — not every\n        // capsule the release contains.\n        install_capsule_with_options(","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/capsule/install_update.rs#L123-L159","documentation":"update_capsule refuses to update an installed capsule whose package directory has no meta.json. The meta.json records the capsule's original source, which is required to re-fetch and rebuild it. Without it the updater cannot proceed and asks the user to reinstall manually.","triggerScenarios":"Running a capsule update (directly or via update_daemon_capsules) for a capsule installed by an older version of astrid-cli that did not write meta.json, or after the meta.json file was manually deleted/corrupted inside the capsule's target directory.","commonSituations":"Upgrading astrid-cli from a pre-source-tracking version and then updating old capsules; restoring capsule directories from backups that omitted meta.json; cleaning scripts that remove 'extra' files from package dirs.","solutions":["Re-install the capsule manually to regenerate meta.json with source tracking, then re-run the update","Check the capsule target directory for a meta.json file and restore it from a backup if available","Delete the capsule directory entirely and reinstall from the canonical source"],"exampleFix":"// before\nastrid capsule update my-capsule   # fails: no meta.json\n// after\nastrid capsule uninstall my-capsule\nastrid capsule install <original-source>\nastrid capsule update my-capsule","handlingStrategy":"validation","validationCode":"let meta_path = target_dir.join(\"meta.json\");\nif !meta_path.exists() {\n    eprintln!(\"Capsule '{}' has no meta.json; reinstall it first.\", name);\n    return Ok(());\n}","typeGuard":null,"tryCatchPattern":"match update_capsule(name).await {\n    Err(e) if e.to_string().contains(\"no meta.json\") => reinstall_manually(name)?,\n    other => other?,\n}","preventionTips":["Always install capsules through astrid capsule install so meta.json is generated","Never hand-edit or prune files inside capsule package directories","Back up capsule directories including meta.json","After upgrading astrid-cli, reinstall capsules from pre-source-tracking versions"],"tags":["capsule","metadata-missing","reinstall"],"backgroundTag":"missing-config-file","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}