coder-config 0.44.28 → 0.44.29
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 +30 -3
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.29",
|
|
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
|
@@ -5,6 +5,31 @@
|
|
|
5
5
|
const fs = require('fs');
|
|
6
6
|
const path = require('path');
|
|
7
7
|
const os = require('os');
|
|
8
|
+
const { execFileSync } = require('child_process');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Get the full path to the claude binary
|
|
12
|
+
* Needed because daemon processes may not have full PATH
|
|
13
|
+
*/
|
|
14
|
+
function getClaudePath() {
|
|
15
|
+
const candidates = [
|
|
16
|
+
path.join(os.homedir(), '.local', 'bin', 'claude'),
|
|
17
|
+
'/usr/local/bin/claude',
|
|
18
|
+
'/opt/homebrew/bin/claude',
|
|
19
|
+
path.join(os.homedir(), '.npm-global', 'bin', 'claude'),
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
for (const p of candidates) {
|
|
23
|
+
if (fs.existsSync(p)) return p;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
const resolved = execFileSync('which', ['claude'], { encoding: 'utf8' }).trim();
|
|
28
|
+
if (resolved && fs.existsSync(resolved)) return resolved;
|
|
29
|
+
} catch (e) {}
|
|
30
|
+
|
|
31
|
+
return 'claude';
|
|
32
|
+
}
|
|
8
33
|
|
|
9
34
|
/**
|
|
10
35
|
* Get all loops
|
|
@@ -330,12 +355,12 @@ function getRalphLoopPluginStatus() {
|
|
|
330
355
|
* Uses execFileSync with fixed args (no shell injection risk)
|
|
331
356
|
*/
|
|
332
357
|
async function installRalphLoopPlugin() {
|
|
333
|
-
const
|
|
358
|
+
const claudePath = getClaudePath();
|
|
334
359
|
|
|
335
360
|
try {
|
|
336
361
|
// Run claude plugin install command with execFileSync (safer than execSync)
|
|
337
362
|
// All arguments are fixed strings - no user input
|
|
338
|
-
execFileSync(
|
|
363
|
+
execFileSync(claudePath, ['plugin', 'install', 'ralph-loop@claude-plugins-official', '--scope', 'user'], {
|
|
339
364
|
encoding: 'utf8',
|
|
340
365
|
timeout: 30000, // 30 second timeout
|
|
341
366
|
stdio: ['pipe', 'pipe', 'pipe']
|
|
@@ -458,6 +483,8 @@ ${task}
|
|
|
458
483
|
## Rewritten Task:`;
|
|
459
484
|
|
|
460
485
|
return new Promise((resolve) => {
|
|
486
|
+
const { spawn } = require('child_process');
|
|
487
|
+
const claudePath = getClaudePath();
|
|
461
488
|
const args = ['-p', metaPrompt];
|
|
462
489
|
|
|
463
490
|
// Run from project directory if provided
|
|
@@ -471,7 +498,7 @@ ${task}
|
|
|
471
498
|
let resolved = false;
|
|
472
499
|
let timeoutId = null;
|
|
473
500
|
|
|
474
|
-
const proc = spawn(
|
|
501
|
+
const proc = spawn(claudePath, args, options);
|
|
475
502
|
|
|
476
503
|
const safeResolve = (result) => {
|
|
477
504
|
if (resolved) return;
|