opencode-orchestrator 0.5.7 → 0.5.12

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 agnusdei1207
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 agnusdei1207
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,94 +1,92 @@
1
- <div align="center">
2
- <img src="assets/logo.png" alt="Logo" width="200" />
3
- </div>
4
-
5
- # OpenCode Orchestrator 🎯
6
-
7
- > **Autonomous Multi-Agent Plugin for [OpenCode](https://opencode.ai)**
8
-
9
- [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
10
- [![npm](https://img.shields.io/npm/v/opencode-orchestrator.svg)](https://www.npmjs.com/package/opencode-orchestrator)
11
-
12
- ---
13
-
14
- ## What is this?
15
-
16
- A **5-agent autonomous architecture** for OpenCode that completes complex engineering tasks reliably.
17
-
18
- > *"Intelligence is a resource. Orchestrate it."*
19
-
20
- ### Key Features
21
- - **🎯 Autonomous Loop** — Commander runs until the mission is complete
22
- - **🔍 Environment Scan** — Analyzes Infra, Stack, and Domain before coding
23
- - **🔨 Smart Implementation** — Matches existing codebase patterns
24
- - **🛡️ Rigorous Audit** — Proves success with builds/tests/logs
25
- - **💾 Persistent Context** — Saves session state to disk
26
- - **🏗️ Parallel Agents** — Run multiple agents concurrently
27
- - **⏳ Background Tasks** — Non-blocking command execution
28
-
29
- ---
30
-
31
- ## Installation
32
-
33
- ```bash
34
- npm install -g opencode-orchestrator
35
- ```
36
-
37
- Restart OpenCode after installation.
38
-
39
- ---
40
-
41
- ## Usage
42
-
43
- ### 🚀 Select Commander via Tab Key (Recommended)
44
-
45
- Press `Tab` in OpenCode → Select **Commander** → Type your mission!
46
-
47
- ```
48
- "Fix the login bug in the docker-compose environment"
49
- ```
50
-
51
- ### 📋 Use /task Command
52
-
53
- ```bash
54
- /task "Implement user authentication with JWT"
55
- ```
56
-
57
- > **💡 Tip:** `/task` makes Commander run **2x longer** for complex tasks.
58
-
59
- ---
60
-
61
- ## The 5 Agents
62
-
63
- | Agent | Role | Responsibility |
64
- | :--- | :--- | :--- |
65
- | **Commander** 🎯 | Orchestrator | Autonomous mission control |
66
- | **Architect** 🏗️ | Planner | Task decomposition |
67
- | **Builder** 🔨 | Developer | Full-stack implementation |
68
- | **Inspector** 🔍 | Quality | Audit & auto-fix |
69
- | **Recorder** 💾 | Context | Progress tracking |
70
-
71
- ---
72
-
73
- ## Uninstall
74
-
75
- ```bash
76
- npm uninstall -g opencode-orchestrator
77
- ```
78
-
79
- ---
80
-
81
- ## Documentation
82
-
83
- - [Architecture & Design](docs/ARCHITECTURE.md)
84
- - [Troubleshooting](docs/PLUGIN_TROUBLESHOOTING.md)
85
-
86
- ---
87
-
88
- ## License
89
-
90
- MIT License. [LICENSE](LICENSE)
91
-
92
- ---
93
-
94
- **Reliability over slop. Environment over assumptions.**
1
+ <div align="center">
2
+ <img src="assets/logo.png" alt="Logo" width="200" />
3
+ </div>
4
+
5
+ # OpenCode Orchestrator 🎯
6
+
7
+ > **Autonomous Multi-Agent Plugin for [OpenCode](https://opencode.ai)**
8
+
9
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
10
+ [![npm](https://img.shields.io/npm/v/opencode-orchestrator.svg)](https://www.npmjs.com/package/opencode-orchestrator)
11
+
12
+ ---
13
+
14
+ ## Why?
15
+
16
+ Tested GLM-4, got disappointed. Built this to make mid-tier models work like premium ones through structured orchestration.
17
+
18
+ ### Key Features
19
+ - **🎯 Autonomous Loop** — Commander runs until the mission is complete
20
+ - **🔍 Environment Scan** — Analyzes Infra, Stack, and Domain before coding
21
+ - **🔨 Smart Implementation** — Matches existing codebase patterns
22
+ - **🛡️ Rigorous Audit** — Proves success with builds/tests/logs
23
+ - **💾 Persistent Context** — Saves session state to disk
24
+ - **🏗️ Parallel Agents** — Run multiple agents concurrently
25
+ - **⏳ Background Tasks** — Non-blocking command execution
26
+
27
+ ---
28
+
29
+ ## Installation
30
+
31
+ ```bash
32
+ npm install -g opencode-orchestrator
33
+ ```
34
+
35
+ Restart OpenCode after installation.
36
+
37
+ ---
38
+
39
+ ## Usage
40
+
41
+ ### 🚀 Select Commander via Tab Key (Recommended)
42
+
43
+ Press `Tab` in OpenCode → Select **Commander** Type your mission!
44
+
45
+ ```
46
+ "Fix the login bug in the docker-compose environment"
47
+ ```
48
+
49
+ ### 📋 Use /task Command
50
+
51
+ ```bash
52
+ /task "Implement user authentication with JWT"
53
+ ```
54
+
55
+ > **💡 Tip:** `/task` makes Commander run **2x longer** for complex tasks.
56
+
57
+ ---
58
+
59
+ ## The 5 Agents
60
+
61
+ | Agent | Role | Responsibility |
62
+ | :--- | :--- | :--- |
63
+ | **Commander** 🎯 | Orchestrator | Autonomous mission control |
64
+ | **Architect** 🏗️ | Planner | Task decomposition |
65
+ | **Builder** 🔨 | Developer | Full-stack implementation |
66
+ | **Inspector** 🔍 | Quality | Audit & auto-fix |
67
+ | **Recorder** 💾 | Context | Progress tracking |
68
+
69
+ ---
70
+
71
+ ## Uninstall
72
+
73
+ ```bash
74
+ npm uninstall -g opencode-orchestrator
75
+ ```
76
+
77
+ ---
78
+
79
+ ## Documentation
80
+
81
+ - [Architecture & Design](docs/ARCHITECTURE.md)
82
+ - [Troubleshooting](docs/PLUGIN_TROUBLESHOOTING.md)
83
+
84
+ ---
85
+
86
+ ## License
87
+
88
+ MIT License. [LICENSE](LICENSE)
89
+
90
+ ---
91
+
92
+ **Reliability over slop. Environment over assumptions.**
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // scripts/postinstall.ts
4
- import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
5
- import { join } from "path";
4
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
6
5
  import { homedir } from "os";
6
+ import { join } from "path";
7
7
  function formatError(err, context) {
8
8
  if (err instanceof Error) {
9
9
  const nodeErr = err;
@@ -29,33 +29,80 @@ function formatError(err, context) {
29
29
  }
30
30
  return `Failed to ${context}: ${String(err)}`;
31
31
  }
32
- var CONFIG_DIR = process.env.XDG_CONFIG_HOME ? join(process.env.XDG_CONFIG_HOME, "opencode") : process.platform === "win32" ? join(process.env.APPDATA || join(homedir(), "AppData", "Roaming"), "opencode") : join(homedir(), ".config", "opencode");
33
- var CONFIG_FILE = join(CONFIG_DIR, "opencode.json");
34
32
  var PLUGIN_NAME = "opencode-orchestrator";
35
- try {
36
- console.log("\u{1F3AF} OpenCode Orchestrator - Installing...");
37
- if (!existsSync(CONFIG_DIR)) {
38
- mkdirSync(CONFIG_DIR, { recursive: true });
33
+ function getConfigPaths() {
34
+ const paths = [];
35
+ if (process.env.XDG_CONFIG_HOME) {
36
+ paths.push(join(process.env.XDG_CONFIG_HOME, "opencode"));
39
37
  }
40
- let config = {};
41
- if (existsSync(CONFIG_FILE)) {
42
- try {
43
- config = JSON.parse(readFileSync(CONFIG_FILE, "utf-8"));
44
- } catch {
45
- config = {};
38
+ if (process.platform === "win32") {
39
+ const appDataPath = process.env.APPDATA || join(homedir(), "AppData", "Roaming");
40
+ paths.push(join(appDataPath, "opencode"));
41
+ const dotConfigPath = join(homedir(), ".config", "opencode");
42
+ if (!paths.includes(dotConfigPath)) {
43
+ paths.push(dotConfigPath);
46
44
  }
45
+ } else {
46
+ paths.push(join(homedir(), ".config", "opencode"));
47
47
  }
48
- if (!config.plugin) {
49
- config.plugin = [];
48
+ return paths;
49
+ }
50
+ function registerInConfig(configDir) {
51
+ const configFile = join(configDir, "opencode.json");
52
+ try {
53
+ if (!existsSync(configDir)) {
54
+ mkdirSync(configDir, { recursive: true });
55
+ }
56
+ let config = {};
57
+ if (existsSync(configFile)) {
58
+ try {
59
+ config = JSON.parse(readFileSync(configFile, "utf-8"));
60
+ } catch {
61
+ config = {};
62
+ }
63
+ }
64
+ if (!config.plugin) {
65
+ config.plugin = [];
66
+ }
67
+ const hasPlugin = config.plugin.some(
68
+ (p) => p.includes(PLUGIN_NAME)
69
+ );
70
+ if (!hasPlugin) {
71
+ config.plugin.push(PLUGIN_NAME);
72
+ writeFileSync(configFile, JSON.stringify(config, null, 2) + "\n");
73
+ return true;
74
+ }
75
+ return false;
76
+ } catch {
77
+ return false;
50
78
  }
51
- const hasPlugin = config.plugin.some((p) => p.includes(PLUGIN_NAME));
52
- if (!hasPlugin) {
53
- config.plugin.push(PLUGIN_NAME);
54
- writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2) + "\n");
55
- console.log("\u2705 Plugin registered!");
56
- console.log(` Name: ${PLUGIN_NAME}`);
57
- } else {
79
+ }
80
+ try {
81
+ console.log("\u{1F3AF} OpenCode Orchestrator - Installing...");
82
+ const configPaths = getConfigPaths();
83
+ let registered = false;
84
+ let alreadyRegistered = false;
85
+ for (const configDir of configPaths) {
86
+ const configFile = join(configDir, "opencode.json");
87
+ if (existsSync(configFile)) {
88
+ try {
89
+ const config = JSON.parse(readFileSync(configFile, "utf-8"));
90
+ if (config.plugin?.some((p) => p.includes(PLUGIN_NAME))) {
91
+ alreadyRegistered = true;
92
+ continue;
93
+ }
94
+ } catch {
95
+ }
96
+ }
97
+ if (registerInConfig(configDir)) {
98
+ console.log(`\u2705 Plugin registered: ${configFile}`);
99
+ registered = true;
100
+ }
101
+ }
102
+ if (!registered && alreadyRegistered) {
58
103
  console.log("\u2705 Plugin already registered.");
104
+ } else if (!registered) {
105
+ console.log("\u26A0\uFE0F Could not register plugin in any config location.");
59
106
  }
60
107
  console.log("");
61
108
  console.log("\u{1F680} Ready! Restart OpenCode to use.");
@@ -2,8 +2,8 @@
2
2
 
3
3
  // scripts/preuninstall.ts
4
4
  import { existsSync, readFileSync, writeFileSync } from "fs";
5
- import { join } from "path";
6
5
  import { homedir } from "os";
6
+ import { join } from "path";
7
7
  function formatError(err, context) {
8
8
  if (err instanceof Error) {
9
9
  const nodeErr = err;
@@ -29,26 +29,59 @@ function formatError(err, context) {
29
29
  }
30
30
  return `Failed to ${context}: ${String(err)}`;
31
31
  }
32
- var CONFIG_DIR = process.env.XDG_CONFIG_HOME ? join(process.env.XDG_CONFIG_HOME, "opencode") : process.platform === "win32" ? join(process.env.APPDATA || join(homedir(), "AppData", "Roaming"), "opencode") : join(homedir(), ".config", "opencode");
33
- var CONFIG_FILE = join(CONFIG_DIR, "opencode.json");
34
32
  var PLUGIN_NAME = "opencode-orchestrator";
33
+ function getConfigPaths() {
34
+ const paths = [];
35
+ if (process.env.XDG_CONFIG_HOME) {
36
+ paths.push(join(process.env.XDG_CONFIG_HOME, "opencode"));
37
+ }
38
+ if (process.platform === "win32") {
39
+ const appDataPath = process.env.APPDATA || join(homedir(), "AppData", "Roaming");
40
+ paths.push(join(appDataPath, "opencode"));
41
+ const dotConfigPath = join(homedir(), ".config", "opencode");
42
+ if (!paths.includes(dotConfigPath)) {
43
+ paths.push(dotConfigPath);
44
+ }
45
+ } else {
46
+ paths.push(join(homedir(), ".config", "opencode"));
47
+ }
48
+ return paths;
49
+ }
50
+ function removeFromConfig(configDir) {
51
+ const configFile = join(configDir, "opencode.json");
52
+ try {
53
+ if (!existsSync(configFile)) {
54
+ return false;
55
+ }
56
+ const config = JSON.parse(readFileSync(configFile, "utf-8"));
57
+ if (!config.plugin || !Array.isArray(config.plugin)) {
58
+ return false;
59
+ }
60
+ const originalLength = config.plugin.length;
61
+ config.plugin = config.plugin.filter(
62
+ (p) => !p.includes(PLUGIN_NAME)
63
+ );
64
+ if (config.plugin.length < originalLength) {
65
+ writeFileSync(configFile, JSON.stringify(config, null, 2) + "\n");
66
+ return true;
67
+ }
68
+ return false;
69
+ } catch {
70
+ return false;
71
+ }
72
+ }
35
73
  try {
36
74
  console.log("\u{1F9F9} OpenCode Orchestrator - Uninstalling...");
37
- if (!existsSync(CONFIG_FILE)) {
38
- console.log("\u2705 No config file found. Nothing to clean up.");
39
- process.exit(0);
40
- }
41
- const config = JSON.parse(readFileSync(CONFIG_FILE, "utf-8"));
42
- if (!config.plugin || !Array.isArray(config.plugin)) {
43
- console.log("\u2705 No plugins registered. Nothing to clean up.");
44
- process.exit(0);
75
+ const configPaths = getConfigPaths();
76
+ let removed = false;
77
+ for (const configDir of configPaths) {
78
+ const configFile = join(configDir, "opencode.json");
79
+ if (removeFromConfig(configDir)) {
80
+ console.log(`\u2705 Plugin removed: ${configFile}`);
81
+ removed = true;
82
+ }
45
83
  }
46
- const originalLength = config.plugin.length;
47
- config.plugin = config.plugin.filter((p) => !p.includes(PLUGIN_NAME));
48
- if (config.plugin.length < originalLength) {
49
- writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2) + "\n");
50
- console.log("\u2705 Plugin removed from OpenCode config.");
51
- } else {
84
+ if (!removed) {
52
85
  console.log("\u2705 Plugin was not registered. Nothing to clean up.");
53
86
  }
54
87
  } catch (error) {
package/package.json CHANGED
@@ -1,73 +1,73 @@
1
- {
2
- "name": "opencode-orchestrator",
3
- "displayName": "OpenCode Orchestrator",
4
- "description": "Distributed Cognitive Architecture for OpenCode. Turns simple prompts into specialized multi-agent workflows (Planner, Coder, Reviewer).",
5
- "version": "0.5.7",
6
- "author": "agnusdei1207",
7
- "license": "MIT",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/agnusdei1207/opencode-orchestrator.git"
11
- },
12
- "homepage": "https://github.com/agnusdei1207/opencode-orchestrator#readme",
13
- "bugs": {
14
- "url": "https://github.com/agnusdei1207/opencode-orchestrator/issues"
15
- },
16
- "keywords": [
17
- "opencode",
18
- "ai",
19
- "agent",
20
- "orchestrator",
21
- "multi-agent",
22
- "llm",
23
- "plugin",
24
- "code-generation"
25
- ],
26
- "main": "dist/index.js",
27
- "types": "dist/index.d.ts",
28
- "type": "module",
29
- "exports": {
30
- ".": {
31
- "types": "./dist/index.d.ts",
32
- "import": "./dist/index.js"
33
- }
34
- },
35
- "files": [
36
- "dist",
37
- "README.md",
38
- "LICENSE"
39
- ],
40
- "scripts": {
41
- "build": "shx rm -rf dist && npx esbuild src/index.ts --bundle --outfile=dist/index.js --platform=node --format=esm && tsc --emitDeclarationOnly && shx mkdir -p dist/scripts && npx esbuild scripts/postinstall.ts --bundle --outfile=dist/scripts/postinstall.js --platform=node --format=esm && npx esbuild scripts/preuninstall.ts --bundle --outfile=dist/scripts/preuninstall.js --platform=node --format=esm",
42
- "test": "vitest run --reporter=verbose",
43
- "test:watch": "vitest",
44
- "test:coverage": "vitest run --coverage",
45
- "test:unit": "vitest run tests/unit --reporter=verbose",
46
- "test:e2e": "vitest run tests/e2e --reporter=verbose",
47
- "test:all": "vitest run --reporter=verbose && echo '✅ ALL TESTS PASSED'",
48
- "postinstall": "node dist/scripts/postinstall.js",
49
- "preuninstall": "node dist/scripts/preuninstall.js",
50
- "prepublishOnly": "npm run build",
51
- "release:patch": "npm run build && npm version patch && git push --follow-tags && npm publish --access public",
52
- "release:minor": "npm run build && npm version minor && git push --follow-tags && npm publish --access public",
53
- "release:major": "npm run build && npm version major && git push --follow-tags && npm publish --access public",
54
- "dev:clean": "shx rm -rf $(npm root -g)/opencode-orchestrator && npm cache clean --force && echo 'Cleaned global + cache'",
55
- "dev:link": "npm run dev:clean || true && npm run build && npm link && echo 'SUCCESS: Linked. Restart OpenCode.'",
56
- "dev:unlink": "npm unlink -g opencode-orchestrator || true && npm run dev:clean && echo 'SUCCESS: Unlinked'",
57
- "dev:status": "echo '=== Global Link ===' && ls -la $(npm root -g)/opencode-orchestrator 2>/dev/null || echo 'Not linked'",
58
- "dev:test": "node dist/scripts/postinstall.js && echo '---' && node dist/scripts/preuninstall.js",
59
- "reset": "npm run dev:unlink || true && npm uninstall -g opencode-orchestrator || true && brew uninstall opencode || true && rm -rf ~/.config/opencode ~/.opencode ~/.local/share/opencode && echo '=== Clean done ===' && brew install opencode && npm run dev:link && echo '=== Reset complete ==='",
60
- "reset:global": "npm run dev:unlink || true && npm uninstall -g opencode-orchestrator || true && brew uninstall opencode || true && rm -rf ~/.config/opencode ~/.opencode ~/.local/share/opencode && echo '=== Clean done ===' && brew install opencode && npm install -g opencode-orchestrator && echo '=== Reset Global complete ==='"
61
- },
62
- "dependencies": {
63
- "@opencode-ai/plugin": "^1.1.1",
64
- "@opencode-ai/sdk": "^1.1.14"
65
- },
66
- "devDependencies": {
67
- "@types/node": "^22.0.0",
68
- "esbuild": "^0.24.0",
69
- "shx": "^0.4.0",
70
- "typescript": "^5.7.0",
71
- "vitest": "^4.0.17"
72
- }
73
- }
1
+ {
2
+ "name": "opencode-orchestrator",
3
+ "displayName": "OpenCode Orchestrator",
4
+ "description": "Distributed Cognitive Architecture for OpenCode. Turns simple prompts into specialized multi-agent workflows (Planner, Coder, Reviewer).",
5
+ "version": "0.5.12",
6
+ "author": "agnusdei1207",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/agnusdei1207/opencode-orchestrator.git"
11
+ },
12
+ "homepage": "https://github.com/agnusdei1207/opencode-orchestrator#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/agnusdei1207/opencode-orchestrator/issues"
15
+ },
16
+ "keywords": [
17
+ "opencode",
18
+ "ai",
19
+ "agent",
20
+ "orchestrator",
21
+ "multi-agent",
22
+ "llm",
23
+ "plugin",
24
+ "code-generation"
25
+ ],
26
+ "main": "dist/index.js",
27
+ "types": "dist/index.d.ts",
28
+ "type": "module",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "import": "./dist/index.js"
33
+ }
34
+ },
35
+ "files": [
36
+ "dist",
37
+ "README.md",
38
+ "LICENSE"
39
+ ],
40
+ "scripts": {
41
+ "build": "shx rm -rf dist && npx esbuild src/index.ts --bundle --outfile=dist/index.js --platform=node --format=esm && tsc --emitDeclarationOnly && shx mkdir -p dist/scripts && npx esbuild scripts/postinstall.ts --bundle --outfile=dist/scripts/postinstall.js --platform=node --format=esm && npx esbuild scripts/preuninstall.ts --bundle --outfile=dist/scripts/preuninstall.js --platform=node --format=esm",
42
+ "test": "vitest run --reporter=verbose",
43
+ "test:watch": "vitest",
44
+ "test:coverage": "vitest run --coverage",
45
+ "test:unit": "vitest run tests/unit --reporter=verbose",
46
+ "test:e2e": "vitest run tests/e2e --reporter=verbose",
47
+ "test:all": "vitest run --reporter=verbose && echo '✅ ALL TESTS PASSED'",
48
+ "postinstall": "node dist/scripts/postinstall.js",
49
+ "preuninstall": "node dist/scripts/preuninstall.js",
50
+ "prepublishOnly": "npm run build",
51
+ "release:patch": "npm run build && npm version patch && git push --follow-tags && npm publish --access public",
52
+ "release:minor": "npm run build && npm version minor && git push --follow-tags && npm publish --access public",
53
+ "release:major": "npm run build && npm version major && git push --follow-tags && npm publish --access public",
54
+ "dev:clean": "shx rm -rf $(npm root -g)/opencode-orchestrator && npm cache clean --force && echo 'Cleaned global + cache'",
55
+ "dev:link": "npm run dev:clean || true && npm run build && npm link && echo 'SUCCESS: Linked. Restart OpenCode.'",
56
+ "dev:unlink": "npm unlink -g opencode-orchestrator || true && npm run dev:clean && echo 'SUCCESS: Unlinked'",
57
+ "dev:status": "echo '=== Global Link ===' && ls -la $(npm root -g)/opencode-orchestrator 2>/dev/null || echo 'Not linked'",
58
+ "dev:test": "node dist/scripts/postinstall.js && echo '---' && node dist/scripts/preuninstall.js",
59
+ "reset": "npm run dev:unlink || true && npm uninstall -g opencode-orchestrator || true && brew uninstall opencode || true && rm -rf ~/.config/opencode ~/.opencode ~/.local/share/opencode && echo '=== Clean done ===' && brew install opencode && npm run dev:link && echo '=== Reset complete ==='",
60
+ "reset:global": "npm run dev:unlink || true && npm uninstall -g opencode-orchestrator || true && brew uninstall opencode || true && rm -rf ~/.config/opencode ~/.opencode ~/.local/share/opencode && echo '=== Clean done ===' && brew install opencode && npm install -g opencode-orchestrator && echo '=== Reset Global complete ==='"
61
+ },
62
+ "dependencies": {
63
+ "@opencode-ai/plugin": "^1.1.1",
64
+ "@opencode-ai/sdk": "^1.1.14"
65
+ },
66
+ "devDependencies": {
67
+ "@types/node": "^22.0.0",
68
+ "esbuild": "^0.24.0",
69
+ "shx": "^0.4.0",
70
+ "typescript": "^5.7.0",
71
+ "vitest": "^4.0.17"
72
+ }
73
+ }