claudeboard 2.0.0 → 2.1.0

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.
@@ -11,6 +11,33 @@
11
11
 
12
12
  import { query } from "@anthropic-ai/claude-agent-sdk";
13
13
  import { startTask, completeTask, failTask, addLog } from "./board-client.js";
14
+ import { execSync } from "child_process";
15
+
16
+ // Resolve the global `claude` binary path at startup
17
+ function resolveClaudePath() {
18
+ // 1. Explicit override via env var
19
+ if (process.env.CLAUDE_CODE_PATH) return process.env.CLAUDE_CODE_PATH;
20
+
21
+ // 2. Ask the shell where `claude` lives (works after: npm install -g @anthropic-ai/claude-code)
22
+ try {
23
+ return execSync("which claude", { stdio: "pipe" }).toString().trim();
24
+ } catch {}
25
+
26
+ // 3. Common Homebrew / nvm / fnm paths
27
+ const candidates = [
28
+ "/opt/homebrew/bin/claude",
29
+ "/usr/local/bin/claude",
30
+ `${process.env.HOME}/.nvm/versions/node/current/bin/claude`,
31
+ `${process.env.HOME}/.npm-global/bin/claude`,
32
+ ];
33
+ for (const p of candidates) {
34
+ try { execSync(`test -f "${p}"`, { stdio: "pipe" }); return p; } catch {}
35
+ }
36
+
37
+ return null; // will surface as CLINotFoundError
38
+ }
39
+
40
+ const CLAUDE_PATH = resolveClaudePath();
14
41
 
15
42
  // Tools Claude Code can use — full developer access
16
43
  const DEVELOPER_TOOLS = [
@@ -41,6 +68,15 @@ RULES:
41
68
 
42
69
  export async function runDeveloperAgent(task, projectPath, techStack, retryContext = null) {
43
70
  console.log(` 🤖 Claude Code working on: ${task.title}`);
71
+ if (CLAUDE_PATH) {
72
+ console.log(` CLI: ${CLAUDE_PATH}`);
73
+ } else {
74
+ const hint = "Claude Code CLI not found. Run: npm install -g @anthropic-ai/claude-code";
75
+ await startTask(task.id, hint);
76
+ await failTask(task.id, hint);
77
+ console.error(`\n ✗ ${hint}\n`);
78
+ return { success: false, error: hint };
79
+ }
44
80
  await startTask(task.id, `Claude Code starting: ${task.title}`);
45
81
 
46
82
  const retryNote = retryContext
@@ -80,6 +116,7 @@ ${retryNote}
80
116
  permissionMode: "bypassPermissions",
81
117
  allowedTools: DEVELOPER_TOOLS,
82
118
  maxTurns: 80,
119
+ ...(CLAUDE_PATH ? { pathToClaudeCodeExecutable: CLAUDE_PATH } : {}),
83
120
  systemPrompt: {
84
121
  type: "preset",
85
122
  preset: "claude_code",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudeboard",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "AI engineering team — from PRD to working mobile app, autonomously",
5
5
  "type": "module",
6
6
  "bin": {