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

test(agentbbs): allow lazy runtime loading

ruvnet6d685574b966
diff --git a/.github/workflows/no-agentbbs-smoke.yml b/.github/workflows/no-agentbbs-smoke.yml
index 0b60a2e31e..ca9edb4bc7 100644
--- a/.github/workflows/no-agentbbs-smoke.yml
+++ b/.github/workflows/no-agentbbs-smoke.yml
@@ -3,7 +3,7 @@
# "Ruflo remains operational if the agentbbs package is removed."
#
# This workflow asserts three architectural rules from ADR-164 §5.1.1:
-# 1. agentbbs lives in `optionalDependencies`, NEVER `dependencies`
+# 1. agentbbs is lazy/optional and NEVER lives in `dependencies`
# 2. Every code path that touches agentbbs in v3/@claude-flow/cli/src/
# is preceded by `loadAgentbbs()` (or a dynamic `import('agentbbs')`)
# 3. Runtime drill: with `--no-optional` / unreachable registry, the smoke
@@ -48,9 +48,9 @@ jobs:
node-version: '20'
- name: Rule 1 — agentbbs must NOT appear in non-optional dependencies anywhere
- # Static check: every package.json that could carry the dep must list
- # agentbbs only under optionalDependencies. If it appears in
- # `dependencies` anywhere, we've broken the architectural constraint.
+ # Static check: agentbbs may be omitted entirely for cold-start
+ # performance or listed under optionalDependencies, but never under
+ # dependencies.
run: |
node -e "
const { readFileSync, readdirSync, statSync } = require('fs');
diff --git a/scripts/smoke-agentbbs.sh b/scripts/smoke-agentbbs.sh
index 7ea1316ebc..d533a6b0e5 100755
--- a/scripts/smoke-agentbbs.sh
+++ b/scripts/smoke-agentbbs.sh
@@ -4,7 +4,7 @@
# Verifies:
# 1. Source files exist where mcp-client expects them
# 2. dist artifact exists (build ran)
-# 3. Optional dependency is declared in v3/@claude-flow/cli/package.json
+# 3. agentbbs is not a hard dependency (it may be lazy or optional)
# 4. Tool registration lines are present in mcp-tools/index.ts
# 5. mcp-client.ts imports + registers agentbbsTools
# 6. all 4 tool names present in the source file
@@ -29,8 +29,12 @@ step "1. agentbbs-tools.ts exists in cli/src/mcp-tools/"
step "2. dist/.../agentbbs-tools.js exists (build ran)"
[[ -f "$CLI/dist/src/mcp-tools/agentbbs-tools.js" ]] && ok || bad "missing dist file (run 'npm run build' in $CLI)"
-step "3. optionalDependencies declares agentbbs"
-if grep -q '"agentbbs"' "$CLI/package.json"; then ok ; else bad "agentbbs not in package.json"; fi
+step "3. agentbbs is not a hard dependency"
+if node -e "const p=require(process.argv[1]);process.exit(p.dependencies?.agentbbs ? 1 : 0)" "$CLI/package.json"; then
+ ok
+else
+ bad "agentbbs must be lazy or optional, never a hard dependency"
+fi
step "4. mcp-tools/index.ts re-exports agentbbsTools"
if grep -q "agentbbsTools" "$CLI/src/mcp-tools/index.ts"; then ok ; else bad "not re-exported"; fi