@mdsohail99/opencode-agent-teams 2.1.0 → 2.1.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/CHANGELOG.md +16 -0
- package/bin/cli.js +59 -14
- package/package.json +24 -5
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v1.0.0
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [2.1.2] - 2026-11-22
|
|
11
|
+
|
|
12
|
+
### Performance & Lightweight Optimization
|
|
13
|
+
- **Eliminate Redundant Transitive Downloads:** Moved `@opencode/plugin`, `@opencode/client`, `@opencode/schema`, and `effect` to optional `peerDependencies` since OpenCode already provides them natively at runtime.
|
|
14
|
+
- **Fast CLI Startup:** `npx @mdsohail99/opencode-agent-teams` now downloads in ~1.5s (370 KB total) with zero heavy sub-packages.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## [2.1.1] - 2026-11-22
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- **CLI Plugin Reference Isolation:** Fixed `bin/cli.js` to ensure the registered plugin in `opencode.json` is always `"@mdsohail99/opencode-agent-teams"` rather than an ephemeral `_npx` cache directory.
|
|
22
|
+
- **Explicit Menu Command:** Added `menu` / `--menu` command to `bin/cli.js` so users can explicitly open the interactive TUI management menu even in non-TTY or wrapped environments.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
10
26
|
## [2.1.0] - 2026-11-21
|
|
11
27
|
|
|
12
28
|
### Changed & Modernized (OpenCode v2.3.2 Engine Alignment)
|
package/bin/cli.js
CHANGED
|
@@ -11,6 +11,12 @@ const rootDir = path.resolve(__dirname, "..")
|
|
|
11
11
|
const args = process.argv.slice(2)
|
|
12
12
|
const binName = path.basename(process.argv[1] || "")
|
|
13
13
|
|
|
14
|
+
let cliVersion = ""
|
|
15
|
+
try {
|
|
16
|
+
const pkg = JSON.parse(fs.readFileSync(path.resolve(rootDir, "package.json"), "utf-8"))
|
|
17
|
+
cliVersion = pkg.version || ""
|
|
18
|
+
} catch {}
|
|
19
|
+
|
|
14
20
|
// ANSI styling
|
|
15
21
|
const c = {
|
|
16
22
|
reset: "\x1b[0m",
|
|
@@ -66,6 +72,7 @@ function getStatus(globalMode = true) {
|
|
|
66
72
|
let subagentDepth = null
|
|
67
73
|
let isPluginRegistered = false
|
|
68
74
|
let agentCount = 0
|
|
75
|
+
let installedVersion = null
|
|
69
76
|
|
|
70
77
|
if (fs.existsSync(configPath)) {
|
|
71
78
|
configExists = true
|
|
@@ -86,6 +93,16 @@ function getStatus(globalMode = true) {
|
|
|
86
93
|
} catch {}
|
|
87
94
|
}
|
|
88
95
|
|
|
96
|
+
const manifestPath = path.resolve(agentsDir, ".agent-teams-manifest.json")
|
|
97
|
+
if (fs.existsSync(manifestPath)) {
|
|
98
|
+
try {
|
|
99
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf-8"))
|
|
100
|
+
if (manifest.version) {
|
|
101
|
+
installedVersion = manifest.version
|
|
102
|
+
}
|
|
103
|
+
} catch {}
|
|
104
|
+
}
|
|
105
|
+
|
|
89
106
|
const isInstalled = isPluginRegistered && agentCount > 0
|
|
90
107
|
return {
|
|
91
108
|
targetDir,
|
|
@@ -95,6 +112,8 @@ function getStatus(globalMode = true) {
|
|
|
95
112
|
subagentDepth,
|
|
96
113
|
isPluginRegistered,
|
|
97
114
|
agentCount,
|
|
115
|
+
installedVersion,
|
|
116
|
+
cliVersion,
|
|
98
117
|
isInstalled,
|
|
99
118
|
}
|
|
100
119
|
}
|
|
@@ -132,13 +151,20 @@ async function doInstall(globalMode = true) {
|
|
|
132
151
|
}
|
|
133
152
|
config.experimental.subagent_depth = 2
|
|
134
153
|
|
|
135
|
-
const
|
|
154
|
+
const isLocalDev = fs.existsSync(path.join(rootDir, ".git"))
|
|
155
|
+
const pluginRef = isLocalDev
|
|
136
156
|
? rootDir.replace(/\\/g, "/")
|
|
137
157
|
: "@mdsohail99/opencode-agent-teams"
|
|
138
158
|
|
|
139
159
|
if (!Array.isArray(config.plugins)) {
|
|
140
160
|
config.plugins = []
|
|
141
161
|
}
|
|
162
|
+
// Clean up any stale or temporary npx cache paths
|
|
163
|
+
config.plugins = config.plugins.filter((p) => {
|
|
164
|
+
if (typeof p !== "string") return true
|
|
165
|
+
if (p.includes("_npx") && p.includes("opencode-agent-teams")) return false
|
|
166
|
+
return true
|
|
167
|
+
})
|
|
142
168
|
if (!config.plugins.includes(pluginRef)) {
|
|
143
169
|
config.plugins.push(pluginRef)
|
|
144
170
|
}
|
|
@@ -160,10 +186,10 @@ async function doInstall(globalMode = true) {
|
|
|
160
186
|
|
|
161
187
|
fs.writeFileSync(
|
|
162
188
|
manifestPath,
|
|
163
|
-
JSON.stringify({ plugin: "@mdsohail99/opencode-agent-teams", version:
|
|
189
|
+
JSON.stringify({ plugin: "@mdsohail99/opencode-agent-teams", version: cliVersion, files: installedList }, null, 2),
|
|
164
190
|
"utf-8"
|
|
165
191
|
)
|
|
166
|
-
console.log(` ${c.green}✓${c.reset} Installed ${installedList.length} curated agents into ${agentsTargetDir}`)
|
|
192
|
+
console.log(` ${c.green}✓${c.reset} Installed ${installedList.length} curated agents (v${cliVersion}) into ${agentsTargetDir}`)
|
|
167
193
|
}
|
|
168
194
|
|
|
169
195
|
console.log(`\n${c.green}${c.bold}✓ Setup complete!${c.reset} Launch OpenCode with ${c.bold}opencode${c.reset} and select agent-teams.\n`)
|
|
@@ -242,19 +268,25 @@ function printStatus() {
|
|
|
242
268
|
const globalStat = getStatus(true)
|
|
243
269
|
const localStat = getStatus(false)
|
|
244
270
|
|
|
245
|
-
console.log(`\n${c.bold}${c.cyan}Agent-Teams v2 Status Report${c.reset}\n`)
|
|
271
|
+
console.log(`\n${c.bold}${c.cyan}Agent-Teams v2 Status Report (CLI v${cliVersion})${c.reset}\n`)
|
|
246
272
|
console.log(`${c.bold}Global Configuration (~/.config/opencode):${c.reset}`)
|
|
247
|
-
console.log(` Status:
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
console.log(`
|
|
273
|
+
console.log(` Status: ${globalStat.isInstalled ? c.green + "Installed (Active)" + c.reset : c.dim + "Not Installed" + c.reset}`)
|
|
274
|
+
if (globalStat.isInstalled) {
|
|
275
|
+
console.log(` Installed Version: ${c.cyan}v${globalStat.installedVersion || cliVersion}${c.reset}`)
|
|
276
|
+
}
|
|
277
|
+
console.log(` Config Path: ${globalStat.configPath}`)
|
|
278
|
+
console.log(` Subagent Depth: ${globalStat.subagentDepth ?? "not set"}`)
|
|
279
|
+
console.log(` Plugin Linked: ${globalStat.isPluginRegistered ? c.green + "Yes" + c.reset : "No"}`)
|
|
280
|
+
console.log(` Agents Count: ${globalStat.agentCount} agents in ${globalStat.agentsDir}`)
|
|
252
281
|
|
|
253
282
|
console.log(`\n${c.bold}Local Directory Configuration (.opencode):${c.reset}`)
|
|
254
|
-
console.log(` Status:
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
283
|
+
console.log(` Status: ${localStat.isInstalled ? c.green + "Installed (Local Active)" + c.reset : c.dim + "Not Installed" + c.reset}`)
|
|
284
|
+
if (localStat.isInstalled) {
|
|
285
|
+
console.log(` Installed Version: ${c.cyan}v${localStat.installedVersion || cliVersion}${c.reset}`)
|
|
286
|
+
}
|
|
287
|
+
console.log(` Config Path: ${localStat.configPath}`)
|
|
288
|
+
console.log(` Plugin Linked: ${localStat.isPluginRegistered ? c.green + "Yes" + c.reset : "No"}`)
|
|
289
|
+
console.log(` Agents Count: ${localStat.agentCount} agents\n`)
|
|
258
290
|
}
|
|
259
291
|
|
|
260
292
|
async function runInteractiveMenu() {
|
|
@@ -262,12 +294,18 @@ async function runInteractiveMenu() {
|
|
|
262
294
|
|
|
263
295
|
while (true) {
|
|
264
296
|
const stat = getStatus(true)
|
|
297
|
+
const installedVer = stat.installedVersion ? `v${stat.installedVersion}` : `v${cliVersion}`
|
|
298
|
+
const statusDetails = stat.isInstalled
|
|
299
|
+
? `(${c.cyan}${installedVer}${c.reset}, Agents: ${stat.agentCount}, Depth: ${stat.subagentDepth})`
|
|
300
|
+
: ""
|
|
301
|
+
|
|
265
302
|
console.log(`
|
|
266
303
|
${c.bold}${c.cyan}┌────────────────────────────────────────────────────────┐${c.reset}
|
|
267
304
|
${c.bold}${c.cyan}│ Agent-Teams v2 Setup & Management │${c.reset}
|
|
268
305
|
${c.bold}${c.cyan}└────────────────────────────────────────────────────────┘${c.reset}
|
|
306
|
+
${c.dim}CLI Package:${c.reset} @mdsohail99/opencode-agent-teams@${cliVersion}
|
|
269
307
|
${c.dim}Global Config:${c.reset} ${stat.targetDir}
|
|
270
|
-
${c.dim}Status:${c.reset} ${stat.isInstalled ? c.green + "● Installed & Active" + c.reset : c.yellow + "○ Not Installed" + c.reset} ${
|
|
308
|
+
${c.dim}Status:${c.reset} ${stat.isInstalled ? c.green + "● Installed & Active" + c.reset : c.yellow + "○ Not Installed" + c.reset} ${statusDetails}
|
|
271
309
|
|
|
272
310
|
${c.cyan}1${c.reset} Install / Update Agent-Teams ${c.green}(Global - Recommended)${c.reset}
|
|
273
311
|
${c.cyan}2${c.reset} Install to Current Project Only ${c.dim}(Local)${c.reset}
|
|
@@ -312,6 +350,7 @@ const isLocal = args.includes("--local") || args.includes("-l")
|
|
|
312
350
|
const isGlobal = !isLocal
|
|
313
351
|
const isHelp = args.includes("--help") || args.includes("-h")
|
|
314
352
|
const isStatus = args.includes("status") || args.includes("--status")
|
|
353
|
+
const isMenu = args.includes("menu") || args.includes("--menu")
|
|
315
354
|
const isInstallExplicit = args.includes("install") || args.includes("--install")
|
|
316
355
|
|
|
317
356
|
if (isHelp) {
|
|
@@ -320,6 +359,7 @@ Agent-Teams v2 CLI for OpenCode
|
|
|
320
359
|
|
|
321
360
|
Usage:
|
|
322
361
|
npx @mdsohail99/opencode-agent-teams Launch interactive menu (default)
|
|
362
|
+
npx @mdsohail99/opencode-agent-teams menu Launch interactive menu explicitly
|
|
323
363
|
npx @mdsohail99/opencode-agent-teams install [options] Install Agent-Teams plugin and agents
|
|
324
364
|
npx @mdsohail99/opencode-agent-teams uninstall [options] Uninstall Agent-Teams cleanly
|
|
325
365
|
npx @mdsohail99/opencode-agent-teams status Inspect current status
|
|
@@ -337,6 +377,11 @@ if (isStatus) {
|
|
|
337
377
|
process.exit(0)
|
|
338
378
|
}
|
|
339
379
|
|
|
380
|
+
if (isMenu) {
|
|
381
|
+
await runInteractiveMenu()
|
|
382
|
+
process.exit(0)
|
|
383
|
+
}
|
|
384
|
+
|
|
340
385
|
if (isUninstallCommand) {
|
|
341
386
|
await doUninstall(isGlobal)
|
|
342
387
|
process.exit(0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mdsohail99/opencode-agent-teams",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Native Agent-Teams orchestration plugin for OpenCode v2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,14 +24,33 @@
|
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=20.19"
|
|
26
26
|
},
|
|
27
|
-
"dependencies": {
|
|
27
|
+
"dependencies": {},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@opencode/client": ">=2.1.0",
|
|
30
|
+
"@opencode/plugin": ">=2.1.0",
|
|
31
|
+
"@opencode/schema": ">=2.1.0",
|
|
32
|
+
"effect": ">=3.0.0 || >=4.0.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependenciesMeta": {
|
|
35
|
+
"@opencode/client": {
|
|
36
|
+
"optional": true
|
|
37
|
+
},
|
|
38
|
+
"@opencode/plugin": {
|
|
39
|
+
"optional": true
|
|
40
|
+
},
|
|
41
|
+
"@opencode/schema": {
|
|
42
|
+
"optional": true
|
|
43
|
+
},
|
|
44
|
+
"effect": {
|
|
45
|
+
"optional": true
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
28
49
|
"@opencode/client": "2.3.2",
|
|
29
50
|
"@opencode/plugin": "2.3.2",
|
|
30
51
|
"@opencode/schema": "2.3.2",
|
|
31
|
-
"effect": "4.1.0"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
52
|
"@types/node": "^24.12.2",
|
|
53
|
+
"effect": "4.1.0",
|
|
35
54
|
"tsx": "^4.23.15",
|
|
36
55
|
"typescript": "^7.0.2"
|
|
37
56
|
},
|