oh-my-opencode 2.6.1 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -2244,7 +2244,7 @@ var require_picocolors = __commonJS((exports, module) => {
2244
2244
  var require_package = __commonJS((exports, module) => {
2245
2245
  module.exports = {
2246
2246
  name: "oh-my-opencode",
2247
- version: "2.6.0",
2247
+ version: "2.6.1",
2248
2248
  description: "OpenCode plugin - custom agents (oracle, librarian) and enhanced features",
2249
2249
  main: "dist/index.js",
2250
2250
  types: "dist/index.d.ts",
@@ -18,13 +18,26 @@ export interface PluginInstallation {
18
18
  isLocal?: boolean;
19
19
  }
20
20
  /**
21
- * Installed plugins database structure
22
- * Located at ~/.claude/plugins/installed_plugins.json
21
+ * Installed plugins database v1 (legacy)
22
+ * plugins stored as direct objects
23
+ */
24
+ export interface InstalledPluginsDatabaseV1 {
25
+ version: 1;
26
+ plugins: Record<string, PluginInstallation>;
27
+ }
28
+ /**
29
+ * Installed plugins database v2 (current)
30
+ * plugins stored as arrays
23
31
  */
24
- export interface InstalledPluginsDatabase {
25
- version: number;
32
+ export interface InstalledPluginsDatabaseV2 {
33
+ version: 2;
26
34
  plugins: Record<string, PluginInstallation[]>;
27
35
  }
36
+ /**
37
+ * Installed plugins database structure
38
+ * Located at ~/.claude/plugins/installed_plugins.json
39
+ */
40
+ export type InstalledPluginsDatabase = InstalledPluginsDatabaseV1 | InstalledPluginsDatabaseV2;
28
41
  /**
29
42
  * Plugin author information
30
43
  */
package/dist/index.js CHANGED
@@ -13186,6 +13186,12 @@ function isPluginEnabled(pluginKey, settingsEnabledPlugins, overrideEnabledPlugi
13186
13186
  }
13187
13187
  return true;
13188
13188
  }
13189
+ function extractPluginEntries(db) {
13190
+ if (db.version === 1) {
13191
+ return Object.entries(db.plugins).map(([key, installation]) => [key, installation]);
13192
+ }
13193
+ return Object.entries(db.plugins).map(([key, installations]) => [key, installations[0]]);
13194
+ }
13189
13195
  function discoverInstalledPlugins(options) {
13190
13196
  const db = loadInstalledPlugins();
13191
13197
  const settings = loadClaudeSettings();
@@ -13196,14 +13202,13 @@ function discoverInstalledPlugins(options) {
13196
13202
  }
13197
13203
  const settingsEnabledPlugins = settings?.enabledPlugins;
13198
13204
  const overrideEnabledPlugins = options?.enabledPluginsOverride;
13199
- for (const [pluginKey, installations] of Object.entries(db.plugins)) {
13200
- if (!installations || installations.length === 0)
13205
+ for (const [pluginKey, installation] of extractPluginEntries(db)) {
13206
+ if (!installation)
13201
13207
  continue;
13202
13208
  if (!isPluginEnabled(pluginKey, settingsEnabledPlugins, overrideEnabledPlugins)) {
13203
13209
  log(`Plugin disabled: ${pluginKey}`);
13204
13210
  continue;
13205
13211
  }
13206
- const installation = installations[0];
13207
13212
  const { installPath, scope, version } = installation;
13208
13213
  if (!existsSync33(installPath)) {
13209
13214
  errors.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-opencode",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "description": "OpenCode plugin - custom agents (oracle, librarian) and enhanced features",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",