@mdsohail99/opencode-agent-teams 2.1.1 → 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.
Files changed (3) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/bin/cli.js +44 -13
  3. package/package.json +24 -5
package/CHANGELOG.md CHANGED
@@ -7,6 +7,14 @@ 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
+
10
18
  ## [2.1.1] - 2026-11-22
11
19
 
12
20
  ### Fixed
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
  }
@@ -167,10 +186,10 @@ async function doInstall(globalMode = true) {
167
186
 
168
187
  fs.writeFileSync(
169
188
  manifestPath,
170
- JSON.stringify({ plugin: "@mdsohail99/opencode-agent-teams", version: "2.1.0", files: installedList }, null, 2),
189
+ JSON.stringify({ plugin: "@mdsohail99/opencode-agent-teams", version: cliVersion, files: installedList }, null, 2),
171
190
  "utf-8"
172
191
  )
173
- 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}`)
174
193
  }
175
194
 
176
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`)
@@ -249,19 +268,25 @@ function printStatus() {
249
268
  const globalStat = getStatus(true)
250
269
  const localStat = getStatus(false)
251
270
 
252
- 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`)
253
272
  console.log(`${c.bold}Global Configuration (~/.config/opencode):${c.reset}`)
254
- console.log(` Status: ${globalStat.isInstalled ? c.green + "Installed (Active)" + c.reset : c.dim + "Not Installed" + c.reset}`)
255
- console.log(` Config Path: ${globalStat.configPath}`)
256
- console.log(` Subagent Depth: ${globalStat.subagentDepth ?? "not set"}`)
257
- console.log(` Plugin Linked: ${globalStat.isPluginRegistered ? c.green + "Yes" + c.reset : "No"}`)
258
- console.log(` Agents Count: ${globalStat.agentCount} agents in ${globalStat.agentsDir}`)
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}`)
259
281
 
260
282
  console.log(`\n${c.bold}Local Directory Configuration (.opencode):${c.reset}`)
261
- console.log(` Status: ${localStat.isInstalled ? c.green + "Installed (Local Active)" + c.reset : c.dim + "Not Installed" + c.reset}`)
262
- console.log(` Config Path: ${localStat.configPath}`)
263
- console.log(` Plugin Linked: ${localStat.isPluginRegistered ? c.green + "Yes" + c.reset : "No"}`)
264
- console.log(` Agents Count: ${localStat.agentCount} agents\n`)
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`)
265
290
  }
266
291
 
267
292
  async function runInteractiveMenu() {
@@ -269,12 +294,18 @@ async function runInteractiveMenu() {
269
294
 
270
295
  while (true) {
271
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
+
272
302
  console.log(`
273
303
  ${c.bold}${c.cyan}┌────────────────────────────────────────────────────────┐${c.reset}
274
304
  ${c.bold}${c.cyan}│ Agent-Teams v2 Setup & Management │${c.reset}
275
305
  ${c.bold}${c.cyan}└────────────────────────────────────────────────────────┘${c.reset}
306
+ ${c.dim}CLI Package:${c.reset} @mdsohail99/opencode-agent-teams@${cliVersion}
276
307
  ${c.dim}Global Config:${c.reset} ${stat.targetDir}
277
- ${c.dim}Status:${c.reset} ${stat.isInstalled ? c.green + "● Installed & Active" + c.reset : c.yellow + "○ Not Installed" + c.reset} ${stat.isInstalled ? `(Agents: ${stat.agentCount}, Depth: ${stat.subagentDepth})` : ""}
308
+ ${c.dim}Status:${c.reset} ${stat.isInstalled ? c.green + "● Installed & Active" + c.reset : c.yellow + "○ Not Installed" + c.reset} ${statusDetails}
278
309
 
279
310
  ${c.cyan}1${c.reset} Install / Update Agent-Teams ${c.green}(Global - Recommended)${c.reset}
280
311
  ${c.cyan}2${c.reset} Install to Current Project Only ${c.dim}(Local)${c.reset}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdsohail99/opencode-agent-teams",
3
- "version": "2.1.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
  },