{"record":{"id":"81813bc828b718ff","repo":"cline/cline","slug":"invalid-npm-plugin-source-npm-spec","errorCode":null,"errorMessage":"Invalid npm plugin source: npm:${spec}","messagePattern":"Invalid npm plugin source: npm:(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdk/packages/core/src/services/plugin-install.ts","lineNumber":193,"sourceCode":"\t\t}\n\t}\n\tconst sanitized = trimDashes(output);\n\treturn sanitized || \"plugin\";\n}\n\nexport function isOfficialPluginSlug(source: string): boolean {\n\treturn /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(source.trim());\n}\n\nfunction resolveOfficialPluginsRepo(override: string | undefined): string {\n\treturn override?.trim() || OFFICIAL_PLUGINS_REPO;\n}\n\nfunction parseNpmSpec(spec: string): { name: string } {\n\tconst trimmed = spec.trim();\n\tconst match = trimmed.match(/^(@?[^@/]+(?:\\/[^@/]+)?)(?:@.+)?$/);\n\tif (!match?.[1]) {\n\t\tthrow new Error(`Invalid npm plugin source: npm:${spec}`);\n\t}\n\treturn { name: match[1] };\n}\n\nfunction looksLikeHostnamePath(source: string): boolean {\n\tif (\n\t\tsource.startsWith(\".\") ||\n\t\tsource.startsWith(\"/\") ||\n\t\tsource === \"~\" ||\n\t\tsource.startsWith(\"~/\") ||\n\t\t/^[A-Za-z]:[\\\\/]|^\\\\\\\\/.test(source)\n\t) {\n\t\treturn false;\n\t}\n\tconst [host, ...pathParts] = source.split(\"/\");\n\treturn (\n\t\t!!host &&\n\t\tpathParts.length >= 2 &&","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/cline/cline/blob/491b30b806fdb8c93513f821f2b87d63a61542f5/sdk/packages/core/src/services/plugin-install.ts#L175-L211","documentation":"Error \"Invalid npm plugin source: npm:${spec}\" thrown in cline/cline.","triggerScenarios":"Thrown at sdk/packages/core/src/services/plugin-install.ts:193 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"491b30b806fdb8c93513f821f2b87d63a61542f5","analyzedAt":"2026-08-25T13:45:22.367Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}