coder-config 0.44.2 → 0.44.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/lib/constants.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Constants and tool path configurations
3
3
  */
4
4
 
5
- const VERSION = '0.44.2';
5
+ const VERSION = '0.44.3';
6
6
 
7
7
  // Tool-specific path configurations
8
8
  const TOOL_PATHS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coder-config",
3
- "version": "0.44.2",
3
+ "version": "0.44.3",
4
4
  "description": "Configuration manager for AI coding tools - Claude Code, Gemini CLI, Codex CLI, Antigravity. Manage MCPs, rules, permissions, memory, and workstreams.",
5
5
  "author": "regression.io",
6
6
  "main": "config-loader.js",
@@ -301,6 +301,8 @@ function getRalphLoopPluginStatus() {
301
301
  // Check if any installation is at user scope
302
302
  const userScopeInstall = ralphLoop.find(p => p.scope === 'user');
303
303
  if (userScopeInstall) {
304
+ // Fix plugin structure in case it's using old commands/ format
305
+ fixRalphLoopPluginStructure();
304
306
  return { installed: true, scope: 'user', needsInstall: false };
305
307
  }
306
308
 
@@ -333,6 +335,10 @@ async function installRalphLoopPlugin() {
333
335
  stdio: ['pipe', 'pipe', 'pipe']
334
336
  });
335
337
 
338
+ // Fix the plugin structure - create skills symlink if needed
339
+ // The official plugin uses commands/ but Claude Code expects skills/
340
+ fixRalphLoopPluginStructure();
341
+
336
342
  return {
337
343
  success: true,
338
344
  message: 'ralph-loop plugin installed successfully at user scope'
@@ -346,6 +352,62 @@ async function installRalphLoopPlugin() {
346
352
  }
347
353
  }
348
354
 
355
+ /**
356
+ * Fix the ralph-loop plugin structure by converting commands to skills format
357
+ * Claude Code expects skills/<name>/SKILL.md, but the plugin has commands/<name>.md
358
+ */
359
+ function fixRalphLoopPluginStructure() {
360
+ const pluginCacheDir = path.join(os.homedir(), '.claude', 'plugins', 'cache', 'claude-plugins-official', 'ralph-loop');
361
+
362
+ if (!fs.existsSync(pluginCacheDir)) {
363
+ return;
364
+ }
365
+
366
+ // Find all version directories
367
+ const versions = fs.readdirSync(pluginCacheDir).filter(f => {
368
+ const fullPath = path.join(pluginCacheDir, f);
369
+ return fs.statSync(fullPath).isDirectory();
370
+ });
371
+
372
+ for (const version of versions) {
373
+ const versionDir = path.join(pluginCacheDir, version);
374
+ const commandsDir = path.join(versionDir, 'commands');
375
+ const skillsDir = path.join(versionDir, 'skills');
376
+
377
+ if (!fs.existsSync(commandsDir)) {
378
+ continue;
379
+ }
380
+
381
+ // Create skills directory if it doesn't exist
382
+ if (!fs.existsSync(skillsDir)) {
383
+ fs.mkdirSync(skillsDir, { recursive: true });
384
+ }
385
+
386
+ // Convert each command to skill format
387
+ // commands/ralph-loop.md -> skills/ralph-loop/SKILL.md
388
+ const commands = fs.readdirSync(commandsDir).filter(f => f.endsWith('.md'));
389
+ for (const cmdFile of commands) {
390
+ const skillName = cmdFile.replace('.md', '');
391
+ const skillDir = path.join(skillsDir, skillName);
392
+ const skillFile = path.join(skillDir, 'SKILL.md');
393
+
394
+ // Skip if skill already exists
395
+ if (fs.existsSync(skillFile)) {
396
+ continue;
397
+ }
398
+
399
+ // Create skill directory
400
+ if (!fs.existsSync(skillDir)) {
401
+ fs.mkdirSync(skillDir, { recursive: true });
402
+ }
403
+
404
+ // Copy command file to SKILL.md
405
+ const cmdPath = path.join(commandsDir, cmdFile);
406
+ fs.copyFileSync(cmdPath, skillFile);
407
+ }
408
+ }
409
+ }
410
+
349
411
  /**
350
412
  * Install loop hooks (or verify official plugin is installed)
351
413
  */
@@ -398,4 +460,5 @@ module.exports = {
398
460
  installLoopHooks,
399
461
  getRalphLoopPluginStatus,
400
462
  installRalphLoopPlugin,
463
+ fixRalphLoopPluginStructure,
401
464
  };