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 +1 -2
- package/dist/scripts/postinstall.js +14 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
#
|
|
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
|
[](LICENSE)
|
|
8
7
|
[](https://www.npmjs.com/package/opencode-orchestrator)
|
|
9
8
|
[](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
|
-
|
|
13
|
-
|
|
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
|
}
|