coder-config 0.44.2 → 0.44.4
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 +1 -1
- package/package.json +1 -1
- package/ui/routes/loops.js +73 -0
package/lib/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coder-config",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.4",
|
|
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",
|
package/ui/routes/loops.js
CHANGED
|
@@ -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,72 @@ 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
|
+
* Also fixes frontmatter issues (hide-from-slash-command-tool -> name)
|
|
359
|
+
*/
|
|
360
|
+
function fixRalphLoopPluginStructure() {
|
|
361
|
+
const pluginCacheDir = path.join(os.homedir(), '.claude', 'plugins', 'cache', 'claude-plugins-official', 'ralph-loop');
|
|
362
|
+
|
|
363
|
+
if (!fs.existsSync(pluginCacheDir)) {
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// Find all version directories
|
|
368
|
+
const versions = fs.readdirSync(pluginCacheDir).filter(f => {
|
|
369
|
+
const fullPath = path.join(pluginCacheDir, f);
|
|
370
|
+
return fs.statSync(fullPath).isDirectory();
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
for (const version of versions) {
|
|
374
|
+
const versionDir = path.join(pluginCacheDir, version);
|
|
375
|
+
const commandsDir = path.join(versionDir, 'commands');
|
|
376
|
+
const skillsDir = path.join(versionDir, 'skills');
|
|
377
|
+
|
|
378
|
+
if (!fs.existsSync(commandsDir)) {
|
|
379
|
+
continue;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// Remove old symlink if it exists
|
|
383
|
+
if (fs.existsSync(skillsDir) && fs.lstatSync(skillsDir).isSymbolicLink()) {
|
|
384
|
+
fs.unlinkSync(skillsDir);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// Create skills directory if it doesn't exist
|
|
388
|
+
if (!fs.existsSync(skillsDir)) {
|
|
389
|
+
fs.mkdirSync(skillsDir, { recursive: true });
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// Convert each command to skill format
|
|
393
|
+
// commands/ralph-loop.md -> skills/ralph-loop/SKILL.md
|
|
394
|
+
const commands = fs.readdirSync(commandsDir).filter(f => f.endsWith('.md'));
|
|
395
|
+
for (const cmdFile of commands) {
|
|
396
|
+
const skillName = cmdFile.replace('.md', '');
|
|
397
|
+
const skillDir = path.join(skillsDir, skillName);
|
|
398
|
+
const skillFile = path.join(skillDir, 'SKILL.md');
|
|
399
|
+
|
|
400
|
+
// Create skill directory
|
|
401
|
+
if (!fs.existsSync(skillDir)) {
|
|
402
|
+
fs.mkdirSync(skillDir, { recursive: true });
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// Read command file content
|
|
406
|
+
const cmdPath = path.join(commandsDir, cmdFile);
|
|
407
|
+
let content = fs.readFileSync(cmdPath, 'utf8');
|
|
408
|
+
|
|
409
|
+
// Fix frontmatter: replace hide-from-slash-command-tool with name
|
|
410
|
+
content = content.replace(
|
|
411
|
+
/hide-from-slash-command-tool:\s*["']true["']/g,
|
|
412
|
+
`name: ${skillName}`
|
|
413
|
+
);
|
|
414
|
+
|
|
415
|
+
// Write skill file (always overwrite to ensure fix is applied)
|
|
416
|
+
fs.writeFileSync(skillFile, content, 'utf8');
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
349
421
|
/**
|
|
350
422
|
* Install loop hooks (or verify official plugin is installed)
|
|
351
423
|
*/
|
|
@@ -398,4 +470,5 @@ module.exports = {
|
|
|
398
470
|
installLoopHooks,
|
|
399
471
|
getRalphLoopPluginStatus,
|
|
400
472
|
installRalphLoopPlugin,
|
|
473
|
+
fixRalphLoopPluginStructure,
|
|
401
474
|
};
|