@jive-ai/cli 0.0.43 → 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.
|
|
3447
|
+
var version = "0.0.44";
|
|
3448
3448
|
|
|
3449
3449
|
//#endregion
|
|
3450
3450
|
//#region src/runner/index.ts
|
|
@@ -5595,7 +5595,7 @@ async function installServiceCommand() {
|
|
|
5595
5595
|
console.log(chalk.bold("\nJive Task Runner Service Installation"));
|
|
5596
5596
|
console.log(chalk.dim("=========================================\n"));
|
|
5597
5597
|
try {
|
|
5598
|
-
const { getServiceManager, validateServiceInstallation, detectPlatform } = await import("./service-
|
|
5598
|
+
const { getServiceManager, validateServiceInstallation, detectPlatform } = await import("./service-4H4YceKv.mjs");
|
|
5599
5599
|
if (detectPlatform() === "unsupported") {
|
|
5600
5600
|
console.error(chalk.red("Service installation is not supported on this platform."));
|
|
5601
5601
|
console.log(chalk.dim("\nCurrently supported platforms:"));
|
|
@@ -5670,7 +5670,7 @@ async function installServiceCommand() {
|
|
|
5670
5670
|
*/
|
|
5671
5671
|
async function uninstallServiceCommand() {
|
|
5672
5672
|
try {
|
|
5673
|
-
const { getServiceManager } = await import("./service-
|
|
5673
|
+
const { getServiceManager } = await import("./service-4H4YceKv.mjs");
|
|
5674
5674
|
const manager = getServiceManager();
|
|
5675
5675
|
if (!await manager.isInstalled()) {
|
|
5676
5676
|
console.log(chalk.yellow("Service is not installed."));
|
|
@@ -5700,7 +5700,7 @@ async function uninstallServiceCommand() {
|
|
|
5700
5700
|
*/
|
|
5701
5701
|
async function serviceStatusCommand() {
|
|
5702
5702
|
try {
|
|
5703
|
-
const { getServiceManager } = await import("./service-
|
|
5703
|
+
const { getServiceManager } = await import("./service-4H4YceKv.mjs");
|
|
5704
5704
|
const manager = getServiceManager();
|
|
5705
5705
|
if (!await manager.isInstalled()) {
|
|
5706
5706
|
console.log(chalk.dim("Service is not installed."));
|
|
@@ -5748,7 +5748,7 @@ async function serviceStatusCommand() {
|
|
|
5748
5748
|
*/
|
|
5749
5749
|
async function serviceLogsCommand(options) {
|
|
5750
5750
|
try {
|
|
5751
|
-
const { getServiceManager } = await import("./service-
|
|
5751
|
+
const { getServiceManager } = await import("./service-4H4YceKv.mjs");
|
|
5752
5752
|
const manager = getServiceManager();
|
|
5753
5753
|
if (!await manager.isInstalled()) {
|
|
5754
5754
|
console.log(chalk.dim("Service is not installed."));
|
|
@@ -5770,7 +5770,7 @@ async function serviceLogsCommand(options) {
|
|
|
5770
5770
|
*/
|
|
5771
5771
|
async function serviceRestartCommand() {
|
|
5772
5772
|
try {
|
|
5773
|
-
const { getServiceManager } = await import("./service-
|
|
5773
|
+
const { getServiceManager } = await import("./service-4H4YceKv.mjs");
|
|
5774
5774
|
const manager = getServiceManager();
|
|
5775
5775
|
if (!await manager.isInstalled()) {
|
|
5776
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:
|
|
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
|
-
|
|
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
|