DEV Community

Devil's Dev
Devil's Dev

Posted on Originally published at devilsdev.github.io

RAG Pipeline Utils v4.0.0: A Smaller Install, Stricter Audit Logs

4.0.0 is out. It removes the three things 3.x deprecated and changes nothing else: the pipeline API, answer checks, plugin contracts, configuration files, CLI commands and the Node.js requirement (22 or later) are the same as in 3.x. Installs that don't read HTML are about 13 MB smaller.

npm install @devilsdev/rag-pipeline-utils@^4.0.0
Enter fullscreen mode Exit fullscreen mode

Most projects can upgrade without changing a line. To check yours, run your app or tests on 3.10 with --trace-deprecation. If none of RAG_DEP_JSDOM_PEER, RAG_DEP_AUDIT_LOG_DIR or RAG_DEP_AUDIT_REPORT_NO_TENANT shows up, you're ready.

jsdom is an optional peer dependency

jsdom is about 13 MB, and most projects never read HTML, so it is no longer installed with the package. If you load .html or .htm files with rag-pipeline ingest or HTMLLoader, add it to your own project:

npm install jsdom
Enter fullscreen mode Exit fullscreen mode

Any version from 20 works, so a project that already has jsdom keeps its own copy. Without it, loading an HTML file fails with code MISSING_DEPENDENCY and a message that says what to install. With npx, include it in the command: npx -p jsdom -p @devilsdev/rag-pipeline-utils rag-pipeline ingest ./docs.

AuditLogger needs a logDir

3.x wrote audit logs to .rag-enterprise/audit-logs in whatever folder the process started in, which is easy to lose. In 4.0 the constructor throws a TypeError unless you say where the logs go. To keep the logs 3.x already wrote, point it at the old folder:

const audit = new AuditLogger({
  logDir: "./.rag-enterprise/audit-logs", // the 3.x default
});
Enter fullscreen mode Exit fullscreen mode

Compliance reports name their tenant

In 3.x, generateComplianceReport() with no tenant silently covered every tenant. In 4.0 that throws a TypeError, so a report can't include other tenants' records by accident. Pass tenantId, or allTenants: true when you really mean all of them:

await audit.generateComplianceReport({ standard: "SOC2", tenantId: "acme" });
await audit.generateComplianceReport({ standard: "SOC2", allTenants: true });
Enter fullscreen mode Exit fullscreen mode

The migration guide has each step in more detail.

Support for 3.x

3.10.x gets security fixes until 2027-01-02, 30 days after this release. To roll back, run npm install @devilsdev/rag-pipeline-utils@^3.

The scoped packages (@devilsdev/rag-core, -connectors, -eval and -guardrails), @devilsdev/rag-mcp-server and create-rag-pipeline are released at 4.0.0 too, unchanged apart from the version. Thanks to everyone who tried 4.0.0-rc.1. Full details are in the CHANGELOG.


Originally published on the rag-pipeline-utils blog.

Top comments (0)