Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Checkpoint: File edits

rUv6b56370ff5aa
diff --git a/v3/@claude-flow/cli/src/commands/doctor.ts b/v3/@claude-flow/cli/src/commands/doctor.ts
index fe2e4748d4..a193b702ca 100644
--- a/v3/@claude-flow/cli/src/commands/doctor.ts
+++ b/v3/@claude-flow/cli/src/commands/doctor.ts
@@ -242,17 +242,25 @@ async function checkVersionFreshness(): Promise<HealthCheck> {
// Get current CLI version from package.json
let currentVersion = '0.0.0';
try {
+ // Get directory of current module and walk up to find package.json
+ const moduleUrl = new URL(import.meta.url);
+ const modulePath = moduleUrl.protocol === 'file:' ? moduleUrl.pathname : import.meta.url;
+ const moduleDir = modulePath.substring(0, modulePath.lastIndexOf('/'));
+
// Look for package.json in multiple locations
const possiblePaths = [
- join(process.cwd(), 'node_modules/@claude-flow/cli/package.json'),
- new URL('../package.json', import.meta.url).pathname
+ join(moduleDir, '..', 'package.json'), // ../package.json from dist/commands
+ join(moduleDir, '..', '..', 'package.json'), // ../../package.json from dist/commands
+ join(process.cwd(), 'package.json'), // Current working directory
+ join(process.cwd(), 'node_modules/@claude-flow/cli/package.json')
];
for (const pkgPath of possiblePaths) {
try {
if (existsSync(pkgPath)) {
const packageJson = JSON.parse(readFileSync(pkgPath, 'utf8'));
- if (packageJson.version) {
+ // Make sure it's the right package
+ if (packageJson.name === '@claude-flow/cli' && packageJson.version) {
currentVersion = packageJson.version;
break;
}