opencode-orchestrator 0.1.41 → 0.1.43

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/README.md CHANGED
@@ -1,9 +1,8 @@
1
- # OpenCode Orchestrator Plugin
1
+ #OpenCode Orchestrator Plugin
2
2
 
3
3
  > **Multi-Agent Plugin for [OpenCode](https://opencode.ai)**
4
4
 
5
5
  <div align="center">
6
-
7
6
  [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
8
7
  [![npm](https://img.shields.io/npm/v/opencode-orchestrator.svg)](https://www.npmjs.com/package/opencode-orchestrator)
9
8
  [![npm downloads](https://img.shields.io/npm/dt/opencode-orchestrator.svg)](https://www.npmjs.com/package/opencode-orchestrator)
@@ -2,15 +2,26 @@
2
2
 
3
3
  // scripts/postinstall.ts
4
4
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
5
- import { join } from "path";
5
+ import { join, dirname } from "path";
6
6
  import { homedir } from "os";
7
+ import { fileURLToPath } from "url";
7
8
  var CONFIG_DIR = join(homedir(), ".config", "opencode");
8
9
  var CONFIG_FILE = join(CONFIG_DIR, "opencode.json");
9
10
  var PLUGIN_NAME = "opencode-orchestrator";
10
11
  function getPluginPath() {
11
12
  try {
12
- const packagePath = new URL(".", import.meta.url).pathname;
13
- return packagePath.replace(/\/$/, "");
13
+ let currentDir = dirname(fileURLToPath(import.meta.url));
14
+ while (true) {
15
+ if (existsSync(join(currentDir, "package.json"))) {
16
+ return currentDir;
17
+ }
18
+ const parentDir = dirname(currentDir);
19
+ if (parentDir === currentDir) {
20
+ break;
21
+ }
22
+ currentDir = parentDir;
23
+ }
24
+ return PLUGIN_NAME;
14
25
  } catch {
15
26
  return PLUGIN_NAME;
16
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-orchestrator",
3
- "version": "0.1.41",
3
+ "version": "0.1.43",
4
4
  "description": "6-Agent collaborative architecture for OpenCode - Make any model reliable",
5
5
  "author": "agnusdei1207",
6
6
  "license": "MIT",