{"record":{"id":"d23ce6e8a1d26948","repo":"ruvnet/ruflo","slug":"plugin-pluginname-not-found-in-collection-col","errorCode":null,"errorMessage":"Plugin ${pluginName} not found in collection ${collectionId}","messagePattern":"Plugin (.+?) not found in collection (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/plugins/src/collections/collection-manager.ts","lineNumber":202,"sourceCode":"\n  /**\n   * Get a collection by ID.\n   */\n  getCollection(id: string): PluginCollection | undefined {\n    return this.collections.get(id);\n  }\n\n  // =========================================================================\n  // Plugin Activation\n  // =========================================================================\n\n  /**\n   * Enable a plugin from a collection.\n   */\n  async enablePlugin(collectionId: string, pluginName: string): Promise<void> {\n    const resolved = this.findResolvedEntry(collectionId, pluginName);\n    if (!resolved) {\n      throw new Error(`Plugin ${pluginName} not found in collection ${collectionId}`);\n    }\n\n    // Remove from disabled, add to enabled\n    this.disabledOverrides.get(collectionId)?.delete(pluginName);\n    this.enabledOverrides.get(collectionId)?.add(pluginName);\n\n    // Register if not already registered\n    if (!this.registry.getPlugin(pluginName)) {\n      await this.registerResolvedPlugin(resolved.plugin, resolved.entry);\n    }\n  }\n\n  /**\n   * Disable a plugin from a collection.\n   */\n  async disablePlugin(collectionId: string, pluginName: string): Promise<void> {\n    const resolved = this.findResolvedEntry(collectionId, pluginName);\n    if (!resolved) {","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/plugins/src/collections/collection-manager.ts#L184-L220","documentation":"enablePlugin resolves the (collectionId, pluginName) pair through findResolvedEntry against the entries resolved at loadCollection time; a miss — the name is not part of that collection, the collection was never loaded (nothing resolved), or a casing/typo mismatch — is rejected before any override or registration happens.","triggerScenarios":"Enabling a plugin name that is not in the loaded collection's manifest; calling enablePlugin before loadCollection for that collection; using a plugin name that was renamed in a newer collection version.","commonSituations":"Plugin renamed across versions while operator config keeps the old name; referencing a plugin that belongs to a different collection; enabling on a manager whose load failed so no entries resolved.","solutions":["Enumerate the collection's plugin names from the loaded manifest and use the exact string","Ensure the collection was loaded successfully before enable/disable calls","After upgrading a collection, re-check plugin names against its manifest"],"exampleFix":"// before\nawait manager.enablePlugin('analytics', 'telemetry-sink'); // name not in manifest -> throws\n\n// after\nconst names = collection.plugins.map((e) => expectedPluginName(e));\nif (!names.includes('telemetry-sink')) {\n  throw new Error(`collection provides: ${names.join(', ')}`);\n}\nawait manager.enablePlugin('analytics', 'telemetry-sink');","handlingStrategy":"validation","validationCode":"const known = new Set(collection.plugins.map((e) => expectedPluginName(e)));\nif (!known.has(pluginName)) {\n  throw new Error(`unknown plugin ${pluginName}; collection provides: ${[...known].join(', ')}`);\n}\nawait manager.enablePlugin(collectionId, pluginName);","typeGuard":null,"tryCatchPattern":"try {\n  await manager.enablePlugin(collectionId, pluginName);\n} catch (e) {\n  if (e instanceof Error && e.message.includes('not found in collection')) {\n    // re-derive names from the manifest and surface the available list\n  } else throw e;\n}","preventionTips":["Source plugin names from collection manifest constants, not free text","Verify collection load success before enable/disable calls","Pin collection versions and re-validate names on upgrade"],"tags":["plugins","collection-manager","entity-not-found","configuration"],"backgroundTag":"entity-not-found","analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}