coder-config 0.44.29 → 0.44.30

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.29';
5
+ const VERSION = '0.44.30';
6
6
 
7
7
  // Tool-specific path configurations
8
8
  const TOOL_PATHS = {
@@ -666,6 +666,25 @@ async function generateRulesWithClaude(projects) {
666
666
  }
667
667
 
668
668
  const { execFileSync } = require('child_process');
669
+ const os = require('os');
670
+
671
+ // Find claude binary (daemon processes may not have full PATH)
672
+ const getClaudePath = () => {
673
+ const candidates = [
674
+ path.join(os.homedir(), '.local', 'bin', 'claude'),
675
+ '/usr/local/bin/claude',
676
+ '/opt/homebrew/bin/claude',
677
+ path.join(os.homedir(), '.npm-global', 'bin', 'claude'),
678
+ ];
679
+ for (const p of candidates) {
680
+ if (fs.existsSync(p)) return p;
681
+ }
682
+ try {
683
+ const resolved = execFileSync('which', ['claude'], { encoding: 'utf8' }).trim();
684
+ if (resolved && fs.existsSync(resolved)) return resolved;
685
+ } catch (e) {}
686
+ return 'claude';
687
+ };
669
688
 
670
689
  const projectPaths = projects.map(p =>
671
690
  path.resolve(p.replace(/^~/, process.env.HOME || ''))
@@ -686,7 +705,8 @@ Output markdown suitable for injecting into an AI assistant's context. Keep it c
686
705
 
687
706
  try {
688
707
  // Run claude -p with the prompt using execFileSync (safer than exec)
689
- const result = execFileSync('claude', ['-p', prompt], {
708
+ const claudePath = getClaudePath();
709
+ const result = execFileSync(claudePath, ['-p', prompt], {
690
710
  cwd: projectPaths[0],
691
711
  encoding: 'utf8',
692
712
  timeout: 60000, // 60 second timeout
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coder-config",
3
- "version": "0.44.29",
3
+ "version": "0.44.30",
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",
@@ -109,7 +109,7 @@ function addProject(manager, projectPath, name, setProjectDir, runClaudeInit = f
109
109
  // Run claude /init if requested and CLAUDE.md doesn't exist
110
110
  if (runClaudeInit && !fs.existsSync(claudeMd)) {
111
111
  try {
112
- execFileSync('claude', ['-p', '/init'], {
112
+ execFileSync(getClaudePath(), ['-p', '/init'], {
113
113
  cwd: absPath,
114
114
  stdio: 'pipe',
115
115
  timeout: 30000