@every-env/compound-plugin 2.36.2 → 2.36.3

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 CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  Release numbering now follows the repository `v*` tag line. Starting at `v2.34.0`, the root CLI package and this changelog stay on that shared version stream. Older entries below retain the previous `0.x` CLI numbering.
9
9
 
10
+ ## [2.36.3](https://github.com/EveryInc/compound-engineering-plugin/compare/v2.36.2...v2.36.3) (2026-03-13)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **targets:** nest colon-separated command names into directories ([a84682c](https://github.com/EveryInc/compound-engineering-plugin/commit/a84682cd35e94b0408f6c6a990af0732c2acf03f)), closes [#226](https://github.com/EveryInc/compound-engineering-plugin/issues/226)
16
+
10
17
  ## [2.36.2](https://github.com/EveryInc/compound-engineering-plugin/compare/v2.36.1...v2.36.2) (2026-03-13)
11
18
 
12
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@every-env/compound-plugin",
3
- "version": "2.36.2",
3
+ "version": "2.36.3",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "bin": {
@@ -1,5 +1,5 @@
1
1
  import path from "path"
2
- import { copyDir, ensureDir, writeText } from "../utils/files"
2
+ import { copyDir, ensureDir, resolveCommandPath, writeText } from "../utils/files"
3
3
  import type { DroidBundle } from "../types/droid"
4
4
 
5
5
  export async function writeDroidBundle(outputRoot: string, bundle: DroidBundle): Promise<void> {
@@ -9,7 +9,8 @@ export async function writeDroidBundle(outputRoot: string, bundle: DroidBundle):
9
9
  if (bundle.commands.length > 0) {
10
10
  await ensureDir(paths.commandsDir)
11
11
  for (const command of bundle.commands) {
12
- await writeText(path.join(paths.commandsDir, `${command.name}.md`), command.content + "\n")
12
+ const dest = await resolveCommandPath(paths.commandsDir, command.name, ".md")
13
+ await writeText(dest, command.content + "\n")
13
14
  }
14
15
  }
15
16
 
@@ -1,5 +1,5 @@
1
1
  import path from "path"
2
- import { backupFile, copyDir, ensureDir, pathExists, readJson, writeJson, writeText } from "../utils/files"
2
+ import { backupFile, copyDir, ensureDir, pathExists, readJson, resolveCommandPath, writeJson, writeText } from "../utils/files"
3
3
  import type { GeminiBundle } from "../types/gemini"
4
4
 
5
5
  export async function writeGeminiBundle(outputRoot: string, bundle: GeminiBundle): Promise<void> {
@@ -20,7 +20,8 @@ export async function writeGeminiBundle(outputRoot: string, bundle: GeminiBundle
20
20
 
21
21
  if (bundle.commands.length > 0) {
22
22
  for (const command of bundle.commands) {
23
- await writeText(path.join(paths.commandsDir, `${command.name}.toml`), command.content + "\n")
23
+ const dest = await resolveCommandPath(paths.commandsDir, command.name, ".toml")
24
+ await writeText(dest, command.content + "\n")
24
25
  }
25
26
  }
26
27
 
@@ -1,5 +1,5 @@
1
1
  import path from "path"
2
- import { backupFile, copyDir, ensureDir, pathExists, readJson, writeJson, writeText } from "../utils/files"
2
+ import { backupFile, copyDir, ensureDir, pathExists, readJson, resolveCommandPath, writeJson, writeText } from "../utils/files"
3
3
  import type { OpenCodeBundle, OpenCodeConfig } from "../types/opencode"
4
4
 
5
5
  // Merges plugin config into existing opencode.json. User keys win on conflict. See ADR-002.
@@ -75,7 +75,7 @@ export async function writeOpenCodeBundle(outputRoot: string, bundle: OpenCodeBu
75
75
  }
76
76
 
77
77
  for (const commandFile of bundle.commandFiles) {
78
- const dest = path.join(openCodePaths.commandDir, `${commandFile.name}.md`)
78
+ const dest = await resolveCommandPath(openCodePaths.commandDir, commandFile.name, ".md")
79
79
  const cmdBackupPath = await backupFile(dest)
80
80
  if (cmdBackupPath) {
81
81
  console.log(`Backed up existing command file to ${cmdBackupPath}`)
@@ -1,5 +1,5 @@
1
1
  import path from "path"
2
- import { backupFile, copyDir, ensureDir, writeJson, writeText } from "../utils/files"
2
+ import { backupFile, copyDir, ensureDir, resolveCommandPath, writeJson, writeText } from "../utils/files"
3
3
  import type { QwenBundle, QwenExtensionConfig } from "../types/qwen"
4
4
 
5
5
  export async function writeQwenBundle(outputRoot: string, bundle: QwenBundle): Promise<void> {
@@ -31,15 +31,8 @@ export async function writeQwenBundle(outputRoot: string, bundle: QwenBundle): P
31
31
  const commandsDir = qwenPaths.commandsDir
32
32
  await ensureDir(commandsDir)
33
33
  for (const commandFile of bundle.commandFiles) {
34
- // Support nested commands with colon separator
35
- const parts = commandFile.name.split(":")
36
- if (parts.length > 1) {
37
- const nestedDir = path.join(commandsDir, ...parts.slice(0, -1))
38
- await ensureDir(nestedDir)
39
- await writeText(path.join(nestedDir, `${parts[parts.length - 1]}.md`), commandFile.content + "\n")
40
- } else {
41
- await writeText(path.join(commandsDir, `${commandFile.name}.md`), commandFile.content + "\n")
42
- }
34
+ const dest = await resolveCommandPath(commandsDir, commandFile.name, ".md")
35
+ await writeText(dest, commandFile.content + "\n")
43
36
  }
44
37
 
45
38
  // Copy skills
@@ -75,6 +75,21 @@ export async function walkFiles(root: string): Promise<string[]> {
75
75
  return results
76
76
  }
77
77
 
78
+ /**
79
+ * Resolve a colon-separated command name into a filesystem path.
80
+ * e.g. resolveCommandPath("/commands", "ce:plan", ".md") -> "/commands/ce/plan.md"
81
+ * Creates intermediate directories as needed.
82
+ */
83
+ export async function resolveCommandPath(dir: string, name: string, ext: string): Promise<string> {
84
+ const parts = name.split(":")
85
+ if (parts.length > 1) {
86
+ const nestedDir = path.join(dir, ...parts.slice(0, -1))
87
+ await ensureDir(nestedDir)
88
+ return path.join(nestedDir, `${parts[parts.length - 1]}${ext}`)
89
+ }
90
+ return path.join(dir, `${name}${ext}`)
91
+ }
92
+
78
93
  export async function copyDir(sourceDir: string, targetDir: string): Promise<void> {
79
94
  await ensureDir(targetDir)
80
95
  const entries = await fs.readdir(sourceDir, { withFileTypes: true })