clementine-agent 1.0.35 → 1.0.36
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/cli/index.js +39 -16
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -480,6 +480,7 @@ function cmdDoctor(opts = {}) {
|
|
|
480
480
|
console.log(` ${DIM}Running health checks...${fix ? ` (auto-fix enabled)` : ''}${RESET}`);
|
|
481
481
|
console.log();
|
|
482
482
|
let issues = 0;
|
|
483
|
+
let warnings = 0;
|
|
483
484
|
let fixed = 0;
|
|
484
485
|
const isMac = process.platform === 'darwin';
|
|
485
486
|
const isLinux = process.platform === 'linux';
|
|
@@ -497,6 +498,9 @@ function cmdDoctor(opts = {}) {
|
|
|
497
498
|
catch {
|
|
498
499
|
return false;
|
|
499
500
|
} })();
|
|
501
|
+
// One-liner to install Homebrew on macOS — surfaced when brew is missing
|
|
502
|
+
// so users have a copy-pasteable fix instead of searching for it.
|
|
503
|
+
const BREW_INSTALL_CMD = '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"';
|
|
500
504
|
/** Attempt a fix command, return true on success. */
|
|
501
505
|
function tryFix(label, cmd, opts) {
|
|
502
506
|
if (!fix)
|
|
@@ -572,24 +576,32 @@ function cmdDoctor(opts = {}) {
|
|
|
572
576
|
}
|
|
573
577
|
}
|
|
574
578
|
// FalkorDB graph engine — system dependencies: redis
|
|
579
|
+
// Optional at runtime: graph-store.ts degrades gracefully (isAvailable()
|
|
580
|
+
// returns false; graph operations become no-ops). Missing deps are a
|
|
581
|
+
// warning, not a blocking issue — daemon launches fine without them.
|
|
575
582
|
try {
|
|
576
583
|
execSync('which redis-server', { stdio: 'pipe' });
|
|
577
584
|
console.log(` ${GREEN}OK${RESET} redis-server found`);
|
|
578
585
|
}
|
|
579
586
|
catch {
|
|
580
|
-
console.log(` ${
|
|
587
|
+
console.log(` ${YELLOW}WARN${RESET} redis-server not found (optional — enables knowledge graph)`);
|
|
581
588
|
const fixCmd = hasBrew ? 'brew install redis' : hasApt ? 'sudo apt-get install -y redis-server' : null;
|
|
582
589
|
if (fixCmd && tryFix('redis-server', fixCmd)) {
|
|
583
590
|
// fixed
|
|
584
591
|
}
|
|
585
592
|
else if (!fixCmd && fix) {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
593
|
+
if (isMac) {
|
|
594
|
+
console.log(` ${YELLOW}Homebrew not installed.${RESET} Install it first, then re-run ${CYAN}clementine doctor --fix${RESET}:`);
|
|
595
|
+
console.log(` ${BREW_INSTALL_CMD}`);
|
|
596
|
+
}
|
|
597
|
+
else {
|
|
598
|
+
console.log(` Install redis-server manually (no supported package manager detected)`);
|
|
599
|
+
}
|
|
600
|
+
warnings++;
|
|
589
601
|
}
|
|
590
602
|
else {
|
|
591
603
|
console.log(` Fix: brew install redis (macOS) or sudo apt install redis-server (Linux)`);
|
|
592
|
-
|
|
604
|
+
warnings++;
|
|
593
605
|
}
|
|
594
606
|
}
|
|
595
607
|
// FalkorDB graph engine — system dependencies: libomp
|
|
@@ -603,19 +615,25 @@ function cmdDoctor(opts = {}) {
|
|
|
603
615
|
console.log(` ${GREEN}OK${RESET} libomp (OpenMP runtime) found`);
|
|
604
616
|
}
|
|
605
617
|
catch {
|
|
606
|
-
console.log(` ${
|
|
618
|
+
console.log(` ${YELLOW}WARN${RESET} libomp (OpenMP runtime) not found (optional — enables knowledge graph)`);
|
|
607
619
|
const fixCmd = hasBrew ? 'brew install libomp' : hasApt ? 'sudo apt-get install -y libomp-dev' : null;
|
|
608
620
|
if (fixCmd && tryFix('libomp', fixCmd)) {
|
|
609
621
|
// fixed
|
|
610
622
|
}
|
|
611
623
|
else if (!fixCmd && fix) {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
624
|
+
if (isMac) {
|
|
625
|
+
// Redis check above already printed the brew installer command;
|
|
626
|
+
// avoid spamming it twice by just pointing back to that guidance.
|
|
627
|
+
console.log(` Install Homebrew (see redis-server WARN above), then ${CYAN}brew install libomp${RESET}`);
|
|
628
|
+
}
|
|
629
|
+
else {
|
|
630
|
+
console.log(` Install libomp manually (no supported package manager detected)`);
|
|
631
|
+
}
|
|
632
|
+
warnings++;
|
|
615
633
|
}
|
|
616
634
|
else {
|
|
617
635
|
console.log(` Fix: brew install libomp (macOS) or sudo apt install libomp-dev (Linux)`);
|
|
618
|
-
|
|
636
|
+
warnings++;
|
|
619
637
|
}
|
|
620
638
|
}
|
|
621
639
|
// FalkorDB graph engine — module binaries
|
|
@@ -624,10 +642,11 @@ function cmdDoctor(opts = {}) {
|
|
|
624
642
|
console.log(` ${GREEN}OK${RESET} FalkorDB graph engine binaries installed`);
|
|
625
643
|
}
|
|
626
644
|
catch {
|
|
627
|
-
console.log(` ${
|
|
645
|
+
console.log(` ${YELLOW}WARN${RESET} FalkorDB graph engine binaries not available (optional — enables knowledge graph)`);
|
|
628
646
|
if (!tryFix('FalkorDB binaries', `node node_modules/falkordblite/scripts/postinstall.js`, { cwd: PACKAGE_ROOT, timeout: 180000 })) {
|
|
629
647
|
console.log(` Fix: cd ${PACKAGE_ROOT} && node node_modules/falkordblite/scripts/postinstall.js`);
|
|
630
|
-
|
|
648
|
+
console.log(` ${DIM}(Usually self-heals once redis-server + libomp are installed)${RESET}`);
|
|
649
|
+
warnings++;
|
|
631
650
|
}
|
|
632
651
|
}
|
|
633
652
|
// Data home
|
|
@@ -829,17 +848,21 @@ function cmdDoctor(opts = {}) {
|
|
|
829
848
|
}
|
|
830
849
|
}
|
|
831
850
|
console.log();
|
|
832
|
-
|
|
851
|
+
const warnSuffix = warnings > 0 ? `, ${warnings} warning(s)` : '';
|
|
852
|
+
if (issues === 0 && fixed === 0 && warnings === 0) {
|
|
833
853
|
console.log(` ${GREEN}All checks passed.${RESET}`);
|
|
834
854
|
}
|
|
855
|
+
else if (issues === 0 && fixed === 0 && warnings > 0) {
|
|
856
|
+
console.log(` ${GREEN}Ready to launch.${RESET} ${warnings} optional dependency warning(s) — safe to ignore or install for full experience.`);
|
|
857
|
+
}
|
|
835
858
|
else if (issues === 0 && fixed > 0) {
|
|
836
|
-
console.log(` ${GREEN}All issues fixed!${RESET} (${fixed} auto-fixed)`);
|
|
859
|
+
console.log(` ${GREEN}All issues fixed!${RESET} (${fixed} auto-fixed${warnSuffix})`);
|
|
837
860
|
}
|
|
838
861
|
else if (fixed > 0) {
|
|
839
|
-
console.log(` ${YELLOW}${issues} issue(s) remaining${RESET} (${fixed} auto-fixed)`);
|
|
862
|
+
console.log(` ${YELLOW}${issues} issue(s) remaining${RESET} (${fixed} auto-fixed${warnSuffix})`);
|
|
840
863
|
}
|
|
841
864
|
else {
|
|
842
|
-
console.log(` ${YELLOW}${issues} issue(s) found.${RESET}${!fix ? ` Run ${CYAN}clementine doctor --fix${RESET} to auto-install dependencies.` : ''}`);
|
|
865
|
+
console.log(` ${YELLOW}${issues} issue(s) found${warnSuffix}.${RESET}${!fix ? ` Run ${CYAN}clementine doctor --fix${RESET} to auto-install dependencies.` : ''}`);
|
|
843
866
|
}
|
|
844
867
|
console.log();
|
|
845
868
|
}
|