@jive-ai/cli 0.0.43 → 0.0.45

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.
@@ -58,14 +58,23 @@ var SystemdServiceManager = class {
58
58
  const runnerConfig = await getRunnerConfig();
59
59
  const credentials = await getCredentials();
60
60
  if (!credentials?.token) throw new Error("No API key found. Run `jive login` first.");
61
- const { stdout: binaryPath } = await execAsync$1("which jive", { timeout: 3e4 });
61
+ const { stdout: binaryPath } = await execAsync$1("readlink -f $(which jive)", { timeout: 3e4 });
62
62
  const resolvedPath = binaryPath.trim();
63
63
  if (!resolvedPath) throw new Error("Cannot locate jive binary in PATH");
64
64
  const { stdout: nodePath } = await execAsync$1("readlink -f $(which node)", { timeout: 3e4 });
65
65
  const resolvedNodePath = nodePath.trim();
66
+ const nodeBinDir = path.dirname(resolvedNodePath);
67
+ for (const pattern of [
68
+ "/run/",
69
+ "fnm_multishells",
70
+ "/tmp/"
71
+ ]) {
72
+ if (resolvedPath.includes(pattern)) throw new Error(`Detected unstable path for jive binary: ${resolvedPath}\nThis path contains '${pattern}' which may not persist across reboots.\n\nIf you're using fnm, try:\n 1. Run: fnm exec --using=default -- npm install -g @jive-ai/cli\n 2. Then run install-service again from a fresh terminal`);
73
+ if (resolvedNodePath.includes(pattern)) throw new Error(`Detected unstable path for node binary: ${resolvedNodePath}\nThis path contains '${pattern}' which may not persist across reboots.\n\nIf you're using fnm, ensure you have a default node version set:\n fnm default <version>`);
74
+ }
66
75
  const variables = {
67
76
  JIVE_BINARY_PATH: resolvedPath,
68
- NODE_BIN_PATH: path.dirname(resolvedNodePath),
77
+ NODE_BIN_PATH: nodeBinDir,
69
78
  JIVE_API_KEY: credentials.token,
70
79
  ANTHROPIC_API_KEY: credentials.anthropicApiKey || "",
71
80
  JIVE_TEAM_ID: runnerConfig.teamId,
@@ -319,10 +328,32 @@ async function validateServiceInstallation() {
319
328
  }
320
329
  }
321
330
  try {
322
- const { stdout } = await execAsync("which jive", { timeout: 3e4 });
331
+ const { stdout } = await execAsync("readlink -f $(which jive)", { timeout: 3e4 });
323
332
  const binaryPath = stdout.trim();
324
333
  if (!binaryPath) throw new Error("Binary not in PATH");
325
- checks.push({
334
+ const unstable = [
335
+ {
336
+ pattern: "/run/",
337
+ name: "tmpfs"
338
+ },
339
+ {
340
+ pattern: "fnm_multishells",
341
+ name: "fnm temp directory"
342
+ },
343
+ {
344
+ pattern: "/tmp/",
345
+ name: "temp directory"
346
+ }
347
+ ].find((p) => binaryPath.includes(p.pattern));
348
+ if (unstable) {
349
+ checks.push({
350
+ name: "Binary path",
351
+ status: "error",
352
+ message: `Unstable path detected (${unstable.name})`,
353
+ detail: `Path ${binaryPath} won't persist. If using fnm, reinstall jive and try again.`
354
+ });
355
+ canInstall = false;
356
+ } else checks.push({
326
357
  name: "Binary path",
327
358
  status: "success",
328
359
  message: binaryPath
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@jive-ai/cli",
4
- "version": "0.0.43",
4
+ "version": "0.0.45",
5
5
  "main": "index.js",
6
6
  "files": [
7
7
  "dist",