mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
agentic-flow 3.0.0-alpha.1/.2 call their CLI main() at the bottom of dist/index.js with no is-main guard (2.x has one). Importing the root as a library therefore parses the host's process.argv: with `--help` it prints agentic-flow's help and exits the host, with `mcp start` it would start its MCP server, and with no agentic-flow flag it runs its demo agents with whatever model credentials are in the environment, plus a health server on :8080 and a runtime patch that rewrites files under node_modules. The root import was only ever a fallback or a probe for exports that no published root has (`embeddings`, `createAgenticFlow`, `VERSION`, `configTuning`; checked 2.0.14, 2.1.4, 3.0.0-alpha.1/.2): - cli memory-initializer: drop the dead root `embeddings` fallback. - cli hooks token-optimize: drop the root availability fallback; the root re-exports the same reasoningbank module the subpath check already loads. - integration TokenOptimizer: detect agentic-flow from the reasoningbank / agent-booster subpaths instead of the root. - integration AgentAdapter, SwarmAdapter, AgenticFlowBridge: stop importing the root for a `createAgenticFlow` factory no release exports; keep the existing local-implementation path and events. - integration SDKBridge: use the baseline version instead of a root VERSION export that does not exist. - Point the "for ML embeddings" comments at agentic-flow/reasoningbank. The regression test runs the CLI source in a child process with loader hooks that replace the root entry with a marker, and scans v3 sources for any root-entry import.