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

fix(verify): resolve plugin paths from source-tree when running locally

Reuven87cc2f323cb6
diff --git a/v3/@claude-flow/cli/src/commands/verify.ts b/v3/@claude-flow/cli/src/commands/verify.ts
index b55dc976d5..d3c3c798f1 100644
--- a/v3/@claude-flow/cli/src/commands/verify.ts
+++ b/v3/@claude-flow/cli/src/commands/verify.ts
@@ -85,12 +85,13 @@ function repoPathToInstalledPath(repoPath: string): string | null {
if (match) {
const pkg = match[1];
const rest = match[2];
- // Try several anchors: cwd/node_modules, the dirname of this script's package
const candidates: string[] = [];
+ // 1. cwd/node_modules/<pkg>/<rest> (typical end-user install)
candidates.push(join(process.cwd(), 'node_modules', pkg, rest));
+ // 2. Walk up from this script looking for node_modules/<pkg>/<rest>
+ // Covers cases where verify runs from inside a nested module.
try {
const __filename = fileURLToPath(import.meta.url);
- // Walk up looking for node_modules
let dir = dirname(__filename);
for (let i = 0; i < 10; i++) {
candidates.push(join(dir, 'node_modules', pkg, rest));
@@ -99,6 +100,22 @@ function repoPathToInstalledPath(repoPath: string): string | null {
dir = parent;
}
} catch { /* ignore */ }
+ // 3. Source-tree resolution: when verify runs against a checked-out
+ // repo (the developer's working copy), packages live at
+ // `<repoRoot>/v3/<pkg>/<rest>` rather than under node_modules.
+ // Walk up looking for the literal repo-relative path so the verify
+ // command works for maintainers running it from the repo itself.
+ try {
+ const __filename = fileURLToPath(import.meta.url);
+ let dir = dirname(__filename);
+ for (let i = 0; i < 10; i++) {
+ candidates.push(join(dir, repoPath));
+ const parent = dirname(dir);
+ if (parent === dir) break;
+ dir = parent;
+ }
+ } catch { /* ignore */ }
+ candidates.push(join(process.cwd(), repoPath));
for (const c of candidates) {
if (existsSync(c)) return c;
}