{"record":{"id":"19f62b75ce13c7cd","repo":"router-for-me/CLIProxyAPI","slug":"unsupported-install-type-q-19f62b","errorCode":null,"errorMessage":"unsupported install type %q","messagePattern":"unsupported install type %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pluginstore/manifest.go","lineNumber":59,"sourceCode":"func ManifestFromPlugin(source Source, plugin Plugin) (Manifest, error) {\n\tif errValidate := ValidatePlugin(plugin); errValidate != nil {\n\t\treturn Manifest{}, errValidate\n\t}\n\tswitch PluginInstallType(plugin) {\n\tcase InstallTypeDirect:\n\t\tmanifest := manifestFromPlugin(source, plugin, Manifest{\n\t\t\tSchemaVersion: SchemaVersionV2,\n\t\t\tVersion:       strings.TrimSpace(plugin.Version),\n\t\t\tInstall:       NormalizeInstallPlan(plugin.Install),\n\t\t})\n\t\tif errValidate := manifest.Validate(); errValidate != nil {\n\t\t\treturn Manifest{}, errValidate\n\t\t}\n\t\treturn manifest, nil\n\tcase InstallTypeGitHubRelease:\n\t\treturn Manifest{}, fmt.Errorf(\"github-release manifest requires a resolved release\")\n\tdefault:\n\t\treturn Manifest{}, fmt.Errorf(\"unsupported install type %q\", plugin.Install.Type)\n\t}\n}\n\nfunc manifestFromPlugin(source Source, plugin Plugin, base Manifest) Manifest {\n\tbase.ID = strings.TrimSpace(plugin.ID)\n\tbase.Name = strings.TrimSpace(plugin.Name)\n\tbase.Description = strings.TrimSpace(plugin.Description)\n\tbase.Author = strings.TrimSpace(plugin.Author)\n\tbase.Logo = strings.TrimSpace(plugin.Logo)\n\tbase.Homepage = strings.TrimSpace(plugin.Homepage)\n\tbase.License = strings.TrimSpace(plugin.License)\n\tbase.Tags = append([]string(nil), plugin.Tags...)\n\tbase.SourceID = strings.TrimSpace(source.ID)\n\tbase.SourceName = strings.TrimSpace(source.Name)\n\tbase.SourceURL = strings.TrimSpace(source.URL)\n\treturn base\n}\n","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/pluginstore/manifest.go#L41-L77","documentation":"Returned by ManifestFromPlugin (manifest.go:58-59) when the plugin's Install.Type is neither \"direct\" nor \"github-release\" after PluginInstallType normalizes it (lowercased, trimmed). It is a forward-compatibility guard: manifests cannot be generated for install types this build of the pluginstore does not know how to resolve.","triggerScenarios":"Calling ManifestFromPlugin with plugin.Install.Type set to a typo (\"Direct \" with casing is fine since it lowercases, but \"dircet\" or \"gitlab-release\" is not), or a newer registry introducing a new install type consumed by an older binary.","commonSituations":"Registry schema drift after an upgrade (new install type added server-side); typos in hand-written registry YAML; custom forks adding install types without updating local enum handling.","solutions":["Check PluginInstallType(plugin) against the supported values before calling, and log the raw type for diagnosis","Fix the registry entry's install.type to 'direct' or 'github-release'","Upgrade (or align) the CLIProxyAPI version so its pluginstore understands the registry's install types"],"exampleFix":"// before\nm, err := pluginstore.ManifestFromPlugin(src, plugin)\n// after\nt := pluginstore.PluginInstallType(plugin)\nif t != pluginstore.InstallTypeDirect && t != pluginstore.InstallTypeGitHubRelease {\n    return fmt.Errorf(\"cannot build manifest for install type %q\", t)\n}\nm, err := pluginstore.ManifestFromPlugin(src, plugin)","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"func supportedInstallType(p pluginstore.Plugin) bool {\n    switch pluginstore.PluginInstallType(p) {\n    case pluginstore.InstallTypeDirect, pluginstore.InstallTypeGitHubRelease:\n        return true\n    }\n    return false\n}","tryCatchPattern":null,"preventionTips":["Validate install.type against the known enum before processing registry entries","Pin your registry source to a schema version compatible with your binary","Re-test plugin flows after upgrading either side (registry schema or pluginstore)"],"tags":["pluginstore","manifest","validation","version-skew"],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}