compound-workflow 1.9.5 → 1.9.6
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/package.json +1 -1
- package/scripts/install-cli.mjs +29 -19
package/package.json
CHANGED
package/scripts/install-cli.mjs
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* compound-workflow install
|
|
4
4
|
*
|
|
5
|
-
* Copies agents, skills, and commands from the package into
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* .
|
|
11
|
-
* .agents
|
|
12
|
-
* .agents/commands
|
|
5
|
+
* Copies agents, skills, and commands from the package into every harness dir.
|
|
6
|
+
* Harnesses are declared in HARNESSES below; every harness receives all three
|
|
7
|
+
* asset kinds so skills and commands stay in parity across .claude/, .cursor/,
|
|
8
|
+
* and .agents/. Only agent layout varies per harness (flat vs. recursive).
|
|
9
|
+
*
|
|
10
|
+
* .claude/{agents,skills,commands} — Claude Code (flat agents)
|
|
11
|
+
* .cursor/{agents,skills,commands} — Cursor (recursive agents)
|
|
12
|
+
* .agents/{agents,skills,commands} — OpenCode / generic (recursive agents)
|
|
13
13
|
*
|
|
14
14
|
* Also writes opencode.json, AGENTS.md, and standard docs directories.
|
|
15
15
|
*
|
|
@@ -365,6 +365,18 @@ function parseArgs(argv) {
|
|
|
365
365
|
return out;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
+
// ---------------------------------------------------------------------------
|
|
369
|
+
// Harness registry — every harness receives agents + skills + commands.
|
|
370
|
+
// Agent layout varies because Claude Code requires flat .md files while
|
|
371
|
+
// Cursor and OpenCode preserve subdirectories.
|
|
372
|
+
// ---------------------------------------------------------------------------
|
|
373
|
+
|
|
374
|
+
const HARNESSES = [
|
|
375
|
+
{ name: ".claude", agentsMode: "flat" },
|
|
376
|
+
{ name: ".cursor", agentsMode: "recursive" },
|
|
377
|
+
{ name: ".agents", agentsMode: "recursive" },
|
|
378
|
+
];
|
|
379
|
+
|
|
368
380
|
// ---------------------------------------------------------------------------
|
|
369
381
|
// Main
|
|
370
382
|
// ---------------------------------------------------------------------------
|
|
@@ -391,18 +403,16 @@ function main() {
|
|
|
391
403
|
console.log("Package:", PACKAGE_ROOT);
|
|
392
404
|
console.log("OpenCode CLI:", hasCommand("opencode") ? "yes" : "no");
|
|
393
405
|
|
|
394
|
-
|
|
395
|
-
|
|
406
|
+
for (const h of HARNESSES) {
|
|
407
|
+
const agentsDest = path.join(targetRoot, h.name, "agents");
|
|
408
|
+
const skillsDest = path.join(targetRoot, h.name, "skills");
|
|
409
|
+
const commandsDest = path.join(targetRoot, h.name, "commands");
|
|
396
410
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
// .agents/agents/, .agents/skills/, .agents/commands/ (OpenCode / general)
|
|
403
|
-
copyAgentsRecursive(srcAgents, path.join(targetRoot, ".agents", "agents"), args.dryRun, ".agents/agents/");
|
|
404
|
-
copySkills(srcSkills, path.join(targetRoot, ".agents", "skills"), args.dryRun, ".agents/skills/");
|
|
405
|
-
copyCommands(srcCommands, path.join(targetRoot, ".agents", "commands"), args.dryRun, ".agents/commands/");
|
|
411
|
+
const copyAgents = h.agentsMode === "flat" ? copyAgentsFlat : copyAgentsRecursive;
|
|
412
|
+
copyAgents(srcAgents, agentsDest, args.dryRun, `${h.name}/agents/`);
|
|
413
|
+
copySkills(srcSkills, skillsDest, args.dryRun, `${h.name}/skills/`);
|
|
414
|
+
copyCommands(srcCommands, commandsDest, args.dryRun, `${h.name}/commands/`);
|
|
415
|
+
}
|
|
406
416
|
|
|
407
417
|
writeOpenCodeJson(targetRoot, packageSrc, args.dryRun);
|
|
408
418
|
writeAgentsMd(targetRoot, PACKAGE_ROOT, args.dryRun);
|