opencode-conductor-plugin 1.2.1 → 1.3.0

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5,11 +5,22 @@ import { statusCommand } from "./commands/status.js";
5
5
  import { revertCommand } from "./commands/revert.js";
6
6
  import { join } from "path";
7
7
  import { homedir } from "os";
8
- import { existsSync } from "fs";
8
+ import { existsSync, readFileSync } from "fs";
9
9
  const ConductorPlugin = async (ctx) => {
10
10
  // Detect oh-my-opencode for synergy features
11
- const omoPath = join(homedir(), ".config", "opencode", "node_modules", "oh-my-opencode");
12
- const isOMOActive = existsSync(omoPath);
11
+ const configPath = join(homedir(), ".config", "opencode", "opencode.json");
12
+ let isOMOActive = false;
13
+ try {
14
+ if (existsSync(configPath)) {
15
+ const config = JSON.parse(readFileSync(configPath, "utf-8"));
16
+ isOMOActive = config.plugin?.some((p) => p.includes("oh-my-opencode"));
17
+ }
18
+ }
19
+ catch (e) {
20
+ // Fallback to filesystem check if config read fails
21
+ const omoPath = join(homedir(), ".config", "opencode", "node_modules", "oh-my-opencode");
22
+ isOMOActive = existsSync(omoPath);
23
+ }
13
24
  console.log(`[Conductor] Plugin tools loaded. (OMO Synergy: ${isOMOActive ? "Enabled" : "Disabled"})`);
14
25
  const extendedCtx = { ...ctx, isOMOActive };
15
26
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-conductor-plugin",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "Conductor plugin for OpenCode",
5
5
  "type": "module",
6
6
  "repository": "derekbar90/opencode-conductor",