compound-workflow 1.6.7 → 1.6.9

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compound-workflow",
3
- "version": "1.6.7",
3
+ "version": "1.6.9",
4
4
  "description": "Clarify -> plan -> execute -> verify -> capture workflow: commands, skills, and agents for Claude Code",
5
5
  "author": {
6
6
  "name": "Compound Workflow"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compound-workflow",
3
- "version": "1.6.7",
3
+ "version": "1.6.9",
4
4
  "description": "Clarify -> plan -> execute -> verify -> capture workflow for Cursor",
5
5
  "author": {
6
6
  "name": "Compound Workflow"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compound-workflow",
3
- "version": "1.6.7",
3
+ "version": "1.6.9",
4
4
  "description": "Clarify → plan → execute → verify → capture. One Install action for Cursor, Claude, and OpenCode.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -448,29 +448,25 @@ function cursorDetected() {
448
448
  return fs.existsSync(path.join(os.homedir(), ".cursor"));
449
449
  }
450
450
 
451
- function applyCursorRegistration(targetRoot, dryRun, noRegisterCursor, forceRegister) {
451
+ function applyCursorRegistration(targetRoot, dryRun, noRegisterCursor, forceRegister, isSelfInstall) {
452
452
  if (dryRun) return;
453
- if (noRegisterCursor && !forceRegister) return;
454
- const shouldApply = forceRegister || (cursorDetected() && !noRegisterCursor);
455
- if (!shouldApply) {
456
- console.log("[cursor] Cursor not detected; skipped plugin registration. Use --register-cursor to force.");
457
- return;
458
- }
459
-
460
- const registrationPath = path.join(targetRoot, ".cursor-plugin", "registration.json");
461
- if (!fs.existsSync(registrationPath)) return;
462
- let descriptor;
463
- try {
464
- descriptor = readJsonMaybe(registrationPath);
465
- } catch {
466
- return;
467
- }
468
- if (!descriptor?.pluginId || !descriptor?.installPath) return;
469
453
 
470
454
  const claudePluginsDir = path.join(os.homedir(), ".claude", "plugins");
471
455
  const installedPath = path.join(claudePluginsDir, "installed_plugins.json");
472
456
  const settingsPath = path.join(os.homedir(), ".claude", "settings.json");
473
457
 
458
+ // installPath must point to the package root so Claude Code resolves
459
+ // commands/agents/skills paths in .claude-plugin/plugin.json relative to it.
460
+ const pluginInstallPath = isSelfInstall
461
+ ? realpathSafe(PACKAGE_ROOT)
462
+ : realpathSafe(path.join(targetRoot, "node_modules", "compound-workflow"));
463
+
464
+ const pluginDescriptor = {
465
+ pluginId: "compound-workflow@local",
466
+ scope: "user",
467
+ installPath: pluginInstallPath,
468
+ };
469
+
474
470
  let installed = {};
475
471
  if (fs.existsSync(installedPath)) {
476
472
  try {
@@ -480,7 +476,7 @@ function applyCursorRegistration(targetRoot, dryRun, noRegisterCursor, forceRegi
480
476
  }
481
477
  }
482
478
  const plugins = ensureObject(installed.plugins);
483
- plugins[descriptor.pluginId] = [{ scope: descriptor.scope || "user", installPath: descriptor.installPath }];
479
+ plugins[pluginDescriptor.pluginId] = [{ scope: pluginDescriptor.scope || "user", installPath: pluginDescriptor.installPath }];
484
480
  installed.plugins = plugins;
485
481
 
486
482
  let settings = {};
@@ -492,12 +488,23 @@ function applyCursorRegistration(targetRoot, dryRun, noRegisterCursor, forceRegi
492
488
  }
493
489
  }
494
490
  settings.enabledPlugins = ensureObject(settings.enabledPlugins);
495
- settings.enabledPlugins[descriptor.pluginId] = true;
491
+ settings.enabledPlugins[pluginDescriptor.pluginId] = true;
496
492
 
497
493
  fs.mkdirSync(claudePluginsDir, { recursive: true });
498
494
  fs.mkdirSync(path.dirname(settingsPath), { recursive: true });
499
495
  fs.writeFileSync(installedPath, JSON.stringify(installed, null, 2) + "\n", "utf8");
500
496
  fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n", "utf8");
497
+ console.log("Registered compound-workflow with Claude Code. Restart Claude Code; enable 'Include third-party Plugins, Skills, and other configs' in Settings if needed.");
498
+
499
+ if (noRegisterCursor && !forceRegister) return;
500
+ const shouldApply = forceRegister || (cursorDetected() && !noRegisterCursor);
501
+ if (!shouldApply) {
502
+ console.log("[cursor] Cursor not detected; skipped Cursor plugin registration. Use --register-cursor to force.");
503
+ return;
504
+ }
505
+
506
+ const registrationPath = path.join(targetRoot, ".cursor-plugin", "registration.json");
507
+ if (!fs.existsSync(registrationPath)) return;
501
508
  console.log("Registered compound-workflow with Cursor. Restart Cursor; enable 'Include third-party Plugins, Skills, and other configs' in Settings if needed.");
502
509
  }
503
510
 
@@ -566,7 +573,7 @@ function main() {
566
573
  writeOpenCodeJson(targetRoot, args.dryRun, isSelfInstall);
567
574
  writePluginManifests(targetRoot, args.dryRun, isSelfInstall);
568
575
  syncCursorSkills(targetRoot, args.dryRun, isSelfInstall);
569
- applyCursorRegistration(targetRoot, args.dryRun, args.noRegisterCursor, args.registerCursor);
576
+ applyCursorRegistration(targetRoot, args.dryRun, args.noRegisterCursor, args.registerCursor, isSelfInstall);
570
577
  reportOpenCodeIntegration(targetRoot, args.dryRun);
571
578
  writeAgentsMd(targetRoot, args.dryRun);
572
579
  ensureDirs(targetRoot, args.dryRun);