{"record":{"id":"6336a691b8cc6b57","repo":"paperclipai/paperclip","slug":"upgrade-for-pluginid-introduces-new-capabilit","errorCode":null,"errorMessage":"Upgrade for \"${pluginId}\" introduces new capabilities that require approval: ${escalated.join(\", \")}. The previous version declared [${[...oldCaps].join(\", \")}]. Please review and approve the capability escalation before upgrading.","messagePattern":"Upgrade for \"(.+?)\" introduces new capabilities that require approval: (.+?)\\. The previous version declared \\[(.+?)\\]\\. Please review and approve the capability escalation before upgrading\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/plugin-loader.ts","lineNumber":1832,"sourceCode":"\n      // 2. Validate it's the same plugin ID\n      if (newManifest.id !== oldManifest.id) {\n        throw new Error(\n          `Upgrade failed: new manifest ID '${newManifest.id}' does not match existing plugin ID '${oldManifest.id}'`,\n        );\n      }\n\n      // 3. Detect capability escalation — new capabilities not in the old manifest\n      const oldCaps = new Set(oldManifest.capabilities ?? []);\n      const newCaps = newManifest.capabilities ?? [];\n      const escalated = newCaps.filter((c) => !oldCaps.has(c));\n\n      if (escalated.length > 0) {\n        log.warn(\n          { pluginId, escalated, oldVersion: oldManifest.version, newVersion: newManifest.version },\n          \"plugin-loader: upgrade introduces new capabilities — requires admin approval\",\n        );\n        throw new Error(\n          `Upgrade for \"${pluginId}\" introduces new capabilities that require approval: ${escalated.join(\", \")}. ` +\n            `The previous version declared [${[...oldCaps].join(\", \")}]. ` +\n            `Please review and approve the capability escalation before upgrading.`,\n        );\n      }\n\n      // 4. Update the existing record\n      await registry.update(pluginId, {\n        packageName: discovered.packageName,\n        version: discovered.version,\n        manifest: newManifest,\n      });\n\n      return {\n        oldManifest,\n        newManifest,\n        discovered,\n      };","sourceCodeStart":1814,"sourceCodeEnd":1850,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/services/plugin-loader.ts#L1814-L1850","documentation":"Error \"Upgrade for \"${pluginId}\" introduces new capabilities that require approval: ${escalated.join(\", \")}. The previous version declared [${[...oldCaps].join(\", \")}]. Please review and approve the capability escalation before upgrading.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at server/src/services/plugin-loader.ts:1832 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Review the new capabilities listed in the error and approve the capability escalation, then retry the upgrade. If the escalation is unexpected, do not upgrade and check the package provenance."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}