@jive-ai/cli 0.0.42 → 0.0.44

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/dist/index.mjs CHANGED
@@ -3444,7 +3444,7 @@ async function createGraphQLClient() {
3444
3444
 
3445
3445
  //#endregion
3446
3446
  //#region package.json
3447
- var version = "0.0.42";
3447
+ var version = "0.0.44";
3448
3448
 
3449
3449
  //#endregion
3450
3450
  //#region src/runner/index.ts
@@ -3559,6 +3559,7 @@ var TaskRunner = class {
3559
3559
  environmentVariables
3560
3560
  betaFlags
3561
3561
  permissionMode
3562
+ secrets
3562
3563
  }
3563
3564
  }
3564
3565
  }
@@ -3590,6 +3591,7 @@ var TaskRunner = class {
3590
3591
  permissionMode: data.taskContext.permissionMode,
3591
3592
  settings: {
3592
3593
  model: data.taskContext.settings.model,
3594
+ secrets: data.taskContext.settings.secrets,
3593
3595
  environmentVariables: data.taskContext.settings.environmentVariables,
3594
3596
  betaFlags: data.taskContext.settings.betaFlags,
3595
3597
  permissionMode: data.taskContext.settings.permissionMode
@@ -3852,11 +3854,15 @@ async function queryClaude(prompt, mcpServer, opts) {
3852
3854
  const credentials = await getCredentials();
3853
3855
  if (!credentials?.anthropicApiKey) throw new Error("Anthropic API key not found in credentials JSON");
3854
3856
  process.env.ANTHROPIC_API_KEY = credentials.anthropicApiKey;
3855
- const { model: defaultModel, environmentVariables, betaFlags } = task.getSettings();
3857
+ const { model: defaultModel, environmentVariables, betaFlags, secrets } = task.getSettings();
3856
3858
  for (const [key, value$1] of Object.entries(environmentVariables)) process.env[key] = value$1;
3859
+ if (secrets) for (const [key, value$1] of Object.entries(secrets)) process.env[key] = value$1;
3857
3860
  debugLog(`[Task ${task.id}] Querying Claude with permission mode: ${permissionMode}`);
3858
3861
  debugLog(`[Task ${task.id}] Using model: ${defaultModel}`);
3859
3862
  if (Object.keys(environmentVariables).length > 0) debugLog(`[Task ${task.id}] Environment variables: ${Object.keys(environmentVariables).join(", ")}`);
3863
+ else debugLog(`[Task ${task.id}] No environment variables applied`);
3864
+ if (secrets && Object.keys(secrets).length > 0) debugLog(`[Task ${task.id}] Secrets applied: ${Object.keys(secrets).join(", ")}`);
3865
+ else debugLog(`[Task ${task.id}] No secrets applied`);
3860
3866
  if (betaFlags.length > 0) debugLog(`[Task ${task.id}] Beta flags: ${betaFlags.join(", ")}`);
3861
3867
  return query({
3862
3868
  prompt,
@@ -5589,7 +5595,7 @@ async function installServiceCommand() {
5589
5595
  console.log(chalk.bold("\nJive Task Runner Service Installation"));
5590
5596
  console.log(chalk.dim("=========================================\n"));
5591
5597
  try {
5592
- const { getServiceManager, validateServiceInstallation, detectPlatform } = await import("./service-DTf-SkmQ.mjs");
5598
+ const { getServiceManager, validateServiceInstallation, detectPlatform } = await import("./service-4H4YceKv.mjs");
5593
5599
  if (detectPlatform() === "unsupported") {
5594
5600
  console.error(chalk.red("Service installation is not supported on this platform."));
5595
5601
  console.log(chalk.dim("\nCurrently supported platforms:"));
@@ -5664,7 +5670,7 @@ async function installServiceCommand() {
5664
5670
  */
5665
5671
  async function uninstallServiceCommand() {
5666
5672
  try {
5667
- const { getServiceManager } = await import("./service-DTf-SkmQ.mjs");
5673
+ const { getServiceManager } = await import("./service-4H4YceKv.mjs");
5668
5674
  const manager = getServiceManager();
5669
5675
  if (!await manager.isInstalled()) {
5670
5676
  console.log(chalk.yellow("Service is not installed."));
@@ -5694,7 +5700,7 @@ async function uninstallServiceCommand() {
5694
5700
  */
5695
5701
  async function serviceStatusCommand() {
5696
5702
  try {
5697
- const { getServiceManager } = await import("./service-DTf-SkmQ.mjs");
5703
+ const { getServiceManager } = await import("./service-4H4YceKv.mjs");
5698
5704
  const manager = getServiceManager();
5699
5705
  if (!await manager.isInstalled()) {
5700
5706
  console.log(chalk.dim("Service is not installed."));
@@ -5742,7 +5748,7 @@ async function serviceStatusCommand() {
5742
5748
  */
5743
5749
  async function serviceLogsCommand(options) {
5744
5750
  try {
5745
- const { getServiceManager } = await import("./service-DTf-SkmQ.mjs");
5751
+ const { getServiceManager } = await import("./service-4H4YceKv.mjs");
5746
5752
  const manager = getServiceManager();
5747
5753
  if (!await manager.isInstalled()) {
5748
5754
  console.log(chalk.dim("Service is not installed."));
@@ -5764,7 +5770,7 @@ async function serviceLogsCommand(options) {
5764
5770
  */
5765
5771
  async function serviceRestartCommand() {
5766
5772
  try {
5767
- const { getServiceManager } = await import("./service-DTf-SkmQ.mjs");
5773
+ const { getServiceManager } = await import("./service-4H4YceKv.mjs");
5768
5774
  const manager = getServiceManager();
5769
5775
  if (!await manager.isInstalled()) {
5770
5776
  console.log(chalk.dim("Service is not installed."));
@@ -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.42",
4
+ "version": "0.0.44",
5
5
  "main": "index.js",
6
6
  "files": [
7
7
  "dist",