compound-workflow 1.6.7 → 1.6.8
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
CHANGED
package/scripts/install-cli.mjs
CHANGED
|
@@ -450,27 +450,17 @@ function cursorDetected() {
|
|
|
450
450
|
|
|
451
451
|
function applyCursorRegistration(targetRoot, dryRun, noRegisterCursor, forceRegister) {
|
|
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
|
+
const pluginDescriptor = {
|
|
459
|
+
pluginId: "compound-workflow@local",
|
|
460
|
+
scope: "user",
|
|
461
|
+
installPath: realpathSafe(targetRoot),
|
|
462
|
+
};
|
|
463
|
+
|
|
474
464
|
let installed = {};
|
|
475
465
|
if (fs.existsSync(installedPath)) {
|
|
476
466
|
try {
|
|
@@ -480,7 +470,7 @@ function applyCursorRegistration(targetRoot, dryRun, noRegisterCursor, forceRegi
|
|
|
480
470
|
}
|
|
481
471
|
}
|
|
482
472
|
const plugins = ensureObject(installed.plugins);
|
|
483
|
-
plugins[
|
|
473
|
+
plugins[pluginDescriptor.pluginId] = [{ scope: pluginDescriptor.scope || "user", installPath: pluginDescriptor.installPath }];
|
|
484
474
|
installed.plugins = plugins;
|
|
485
475
|
|
|
486
476
|
let settings = {};
|
|
@@ -492,12 +482,23 @@ function applyCursorRegistration(targetRoot, dryRun, noRegisterCursor, forceRegi
|
|
|
492
482
|
}
|
|
493
483
|
}
|
|
494
484
|
settings.enabledPlugins = ensureObject(settings.enabledPlugins);
|
|
495
|
-
settings.enabledPlugins[
|
|
485
|
+
settings.enabledPlugins[pluginDescriptor.pluginId] = true;
|
|
496
486
|
|
|
497
487
|
fs.mkdirSync(claudePluginsDir, { recursive: true });
|
|
498
488
|
fs.mkdirSync(path.dirname(settingsPath), { recursive: true });
|
|
499
489
|
fs.writeFileSync(installedPath, JSON.stringify(installed, null, 2) + "\n", "utf8");
|
|
500
490
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n", "utf8");
|
|
491
|
+
console.log("Registered compound-workflow with Claude Code. Restart Claude Code; enable 'Include third-party Plugins, Skills, and other configs' in Settings if needed.");
|
|
492
|
+
|
|
493
|
+
if (noRegisterCursor && !forceRegister) return;
|
|
494
|
+
const shouldApply = forceRegister || (cursorDetected() && !noRegisterCursor);
|
|
495
|
+
if (!shouldApply) {
|
|
496
|
+
console.log("[cursor] Cursor not detected; skipped Cursor plugin registration. Use --register-cursor to force.");
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
const registrationPath = path.join(targetRoot, ".cursor-plugin", "registration.json");
|
|
501
|
+
if (!fs.existsSync(registrationPath)) return;
|
|
501
502
|
console.log("Registered compound-workflow with Cursor. Restart Cursor; enable 'Include third-party Plugins, Skills, and other configs' in Settings if needed.");
|
|
502
503
|
}
|
|
503
504
|
|