@sna-sdk/core 0.9.8 → 0.9.9

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.
@@ -22,7 +22,8 @@ function resolveClaudePath(cwd) {
22
22
  for (const p of [
23
23
  "/opt/homebrew/bin/claude",
24
24
  "/usr/local/bin/claude",
25
- `${process.env.HOME}/.local/bin/claude`
25
+ `${process.env.HOME}/.local/bin/claude`,
26
+ `${process.env.HOME}/.claude/bin/claude`
26
27
  ]) {
27
28
  try {
28
29
  execSync(`test -x "${p}"`, { stdio: "pipe" });
@@ -31,7 +32,9 @@ function resolveClaudePath(cwd) {
31
32
  }
32
33
  }
33
34
  try {
34
- return execSync(`${SHELL} -l -c "which claude"`, { encoding: "utf8" }).trim();
35
+ const raw = execSync(`${SHELL} -i -l -c "command -v claude" 2>/dev/null`, { encoding: "utf8", timeout: 5e3 }).trim();
36
+ const match = raw.match(/=(.+)/) ?? raw.match(/^(\/\S+)/m);
37
+ return match ? match[1] : raw;
35
38
  } catch {
36
39
  return "claude";
37
40
  }
@@ -413,7 +413,8 @@ function resolveClaudePath(cwd) {
413
413
  for (const p of [
414
414
  "/opt/homebrew/bin/claude",
415
415
  "/usr/local/bin/claude",
416
- `${process.env.HOME}/.local/bin/claude`
416
+ `${process.env.HOME}/.local/bin/claude`,
417
+ `${process.env.HOME}/.claude/bin/claude`
417
418
  ]) {
418
419
  try {
419
420
  execSync(`test -x "${p}"`, { stdio: "pipe" });
@@ -422,7 +423,9 @@ function resolveClaudePath(cwd) {
422
423
  }
423
424
  }
424
425
  try {
425
- return execSync(`${SHELL} -l -c "which claude"`, { encoding: "utf8" }).trim();
426
+ const raw = execSync(`${SHELL} -i -l -c "command -v claude" 2>/dev/null`, { encoding: "utf8", timeout: 5e3 }).trim();
427
+ const match = raw.match(/=(.+)/) ?? raw.match(/^(\/\S+)/m);
428
+ return match ? match[1] : raw;
426
429
  } catch {
427
430
  return "claude";
428
431
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sna-sdk/core",
3
- "version": "0.9.8",
3
+ "version": "0.9.9",
4
4
  "description": "Skills-Native Application runtime — server, providers, session management, database, and CLI",
5
5
  "type": "module",
6
6
  "bin": {