@devilsdev/rag-pipeline-utils 2.4.5 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/.ragrc.schema.json +83 -192
  2. package/CHANGELOG.md +431 -0
  3. package/README.md +418 -117
  4. package/SECURITY.md +5 -5
  5. package/dist/experimental.cjs +2 -0
  6. package/dist/experimental.d.ts +1 -0
  7. package/dist/experimental.mjs +5 -0
  8. package/dist/index.cjs +6442 -1355
  9. package/dist/index.d.ts +129 -2
  10. package/dist/index.mjs +1 -1
  11. package/dist/testing.cjs +2 -0
  12. package/dist/testing.d.ts +1 -0
  13. package/dist/testing.mjs +5 -0
  14. package/dist/types/adapters/ai-sdk.d.ts +53 -0
  15. package/dist/types/agentic/agentic-pipeline.d.ts +103 -0
  16. package/dist/types/agentic/iterative-retriever.d.ts +85 -0
  17. package/dist/types/agentic/query-planner.d.ts +145 -0
  18. package/dist/types/agentic/self-critique.d.ts +45 -0
  19. package/dist/types/ai/adaptive-retrieval.d.ts +44 -0
  20. package/dist/types/ai/federation/federated-learning-coordinator.d.ts +62 -0
  21. package/dist/types/ai/multimodal-processing.d.ts +32 -0
  22. package/dist/types/ai/multimodal.d.ts +39 -0
  23. package/dist/types/ai/retrieval-engine.d.ts +37 -0
  24. package/dist/types/ai/training/model-training-orchestrator.d.ts +31 -0
  25. package/dist/types/cache/component-keys.d.ts +7 -0
  26. package/dist/types/cache/memory-cache.d.ts +54 -0
  27. package/dist/types/cache/pipeline-cache.d.ts +66 -0
  28. package/dist/types/cache/redis-cache.d.ts +46 -0
  29. package/dist/types/chunking/chunking-engine.d.ts +70 -0
  30. package/dist/types/chunking/strategies/fixed-size.d.ts +17 -0
  31. package/dist/types/chunking/strategies/recursive.d.ts +20 -0
  32. package/dist/types/chunking/strategies/semantic.d.ts +19 -0
  33. package/dist/types/chunking/strategies/sentence.d.ts +13 -0
  34. package/dist/types/chunking/strategies/structure-aware.d.ts +19 -0
  35. package/dist/types/citation/citation-tracker.d.ts +64 -0
  36. package/dist/types/citation/hallucination-detector.d.ts +40 -0
  37. package/dist/types/citation/source-mapper.d.ts +37 -0
  38. package/dist/types/connectors/anthropic-connector.d.ts +97 -0
  39. package/dist/types/connectors/base-connector.d.ts +87 -0
  40. package/dist/types/connectors/cohere-connector.d.ts +94 -0
  41. package/dist/types/connectors/connector-utils.d.ts +110 -0
  42. package/dist/types/connectors/local-embedder.d.ts +95 -0
  43. package/dist/types/connectors/memory-retriever.d.ts +99 -0
  44. package/dist/types/connectors/ollama-connector.d.ts +115 -0
  45. package/dist/types/connectors/openai-connector.d.ts +129 -0
  46. package/dist/types/connectors/rag-prompt.d.ts +40 -0
  47. package/dist/types/core/create-pipeline.d.ts +8 -0
  48. package/dist/types/core/plugin-registry.d.ts +136 -0
  49. package/dist/types/core/stage-contracts.d.ts +36 -0
  50. package/dist/types/core/validate-plugin.d.ts +45 -0
  51. package/dist/types/cost/cost-calculator.d.ts +152 -0
  52. package/dist/types/cost/cost-tracker.d.ts +126 -0
  53. package/dist/types/cost/token-budget.d.ts +110 -0
  54. package/dist/types/dag/core/error-context.d.ts +239 -0
  55. package/dist/types/dag/core/execution-scheduler.d.ts +191 -0
  56. package/dist/types/dag/core/topology-validation.d.ts +226 -0
  57. package/dist/types/dag/dag-engine.d.ts +156 -0
  58. package/dist/types/dag/dag-node.d.ts +37 -0
  59. package/dist/types/dashboard/dashboard-generator.d.ts +127 -0
  60. package/dist/types/dashboard/metrics-aggregator.d.ts +218 -0
  61. package/dist/types/debug/execution-tracer.d.ts +57 -0
  62. package/dist/types/debug/trace-inspector.d.ts +31 -0
  63. package/dist/types/ecosystem/plugin-certification.d.ts +169 -0
  64. package/dist/types/enterprise/data-governance.d.ts +203 -0
  65. package/dist/types/enterprise/multi-tenancy.d.ts +137 -0
  66. package/dist/types/enterprise/sso-integration.d.ts +420 -0
  67. package/dist/types/evaluate/context-metrics.d.ts +55 -0
  68. package/dist/types/evaluate/faithfulness.d.ts +41 -0
  69. package/dist/types/evaluate/groundedness.d.ts +60 -0
  70. package/dist/types/evaluate/pipeline-evaluator.d.ts +88 -0
  71. package/dist/types/evaluate/relevance.d.ts +21 -0
  72. package/dist/types/evaluate/scoring.d.ts +123 -0
  73. package/dist/types/evaluate/semantic-similarity.d.ts +14 -0
  74. package/dist/types/experimental.d.ts +15 -0
  75. package/dist/types/graph/entity-extractor.d.ts +84 -0
  76. package/dist/types/graph/graph-index.d.ts +49 -0
  77. package/dist/types/graph/graph-retriever.d.ts +81 -0
  78. package/dist/types/graph/knowledge-graph.d.ts +129 -0
  79. package/dist/types/grounding/check-answer.d.ts +101 -0
  80. package/dist/types/guardrails/guardrails-pipeline.d.ts +63 -0
  81. package/dist/types/guardrails/injection-detector.d.ts +47 -0
  82. package/dist/types/guardrails/post-generation-guard.d.ts +61 -0
  83. package/dist/types/guardrails/pre-retrieval-guard.d.ts +64 -0
  84. package/dist/types/guardrails/retrieval-guard.d.ts +57 -0
  85. package/dist/types/mcp/mcp-server.d.ts +85 -0
  86. package/dist/types/mcp/mcp-tool-builder.d.ts +55 -0
  87. package/dist/types/reranker/cascade-reranker.d.ts +40 -0
  88. package/dist/types/reranker/embedding-reranker.d.ts +77 -0
  89. package/dist/types/reranker/scoring-reranker.d.ts +41 -0
  90. package/dist/types/retrieval/bm25-search.d.ts +43 -0
  91. package/dist/types/retrieval/file-vector-store.d.ts +99 -0
  92. package/dist/types/retrieval/hybrid-retriever.d.ts +35 -0
  93. package/dist/types/retrieval/rank-fusion.d.ts +10 -0
  94. package/dist/types/security/jwt-config.d.ts +80 -0
  95. package/dist/types/security/jwt-validator.d.ts +195 -0
  96. package/dist/types/security/plugin-sandbox.d.ts +158 -0
  97. package/dist/types/security/plugin-signature-verifier.d.ts +139 -0
  98. package/dist/types/security/validator.d.ts +5 -0
  99. package/dist/types/streaming/embedding-stream.d.ts +65 -0
  100. package/dist/types/streaming/sse-adapter.d.ts +59 -0
  101. package/dist/types/streaming/stream-router.d.ts +88 -0
  102. package/dist/types/streaming/streaming-embedder.d.ts +99 -0
  103. package/dist/types/streaming/websocket-adapter.d.ts +71 -0
  104. package/dist/types/templates/scaffold.d.ts +55 -0
  105. package/dist/types/templates/template-registry.d.ts +63 -0
  106. package/dist/types/testing.d.ts +168 -0
  107. package/dist/types/utils/embed-query.d.ts +20 -0
  108. package/dist/types/utils/logger.d.ts +50 -0
  109. package/dist/types/utils/rate-limiter.d.ts +66 -0
  110. package/dist/types/utils/retry.d.ts +27 -0
  111. package/dist/types/utils/run-abort.d.ts +34 -0
  112. package/dist/types/utils/secure-logging.d.ts +51 -0
  113. package/dist/types/utils/structured-logger.d.ts +126 -0
  114. package/package.json +72 -33
  115. package/src/adapters/ai-sdk.js +215 -0
  116. package/src/agentic/agentic-pipeline.js +75 -7
  117. package/src/agentic/iterative-retriever.js +47 -10
  118. package/src/agentic/query-planner.js +329 -78
  119. package/src/cache/component-keys.js +38 -0
  120. package/src/cache/memory-cache.js +87 -0
  121. package/src/cache/pipeline-cache.js +260 -0
  122. package/src/cache/redis-cache.js +83 -0
  123. package/src/citation/citation-tracker.js +6 -4
  124. package/src/citation/hallucination-detector.js +2 -2
  125. package/src/citation/source-mapper.js +15 -28
  126. package/src/cli/commands/ai.js +106 -0
  127. package/src/cli/commands/plugin-hub/event-handlers.js +6 -0
  128. package/src/cli/commands/plugin-hub/hub-commands.js +0 -74
  129. package/src/cli/commands/plugin-hub/local-commands.js +143 -0
  130. package/src/cli/commands/plugin-hub.js +114 -49
  131. package/src/cli/diagnostics/config-checker.js +76 -63
  132. package/src/cli/diagnostics/environment-checker.js +62 -31
  133. package/src/cli/diagnostics/plugin-checker.js +36 -89
  134. package/src/cli/doctor-command.js +39 -5
  135. package/src/cli/enhanced-cli-commands.js +104 -233
  136. package/src/cli/handlers/ai-handler.js +364 -0
  137. package/src/cli/handlers/diagnostics-handler.js +78 -31
  138. package/src/cli/handlers/ingest-handler.js +28 -22
  139. package/src/cli/handlers/init-handler.js +148 -25
  140. package/src/cli/handlers/query-handler.js +203 -25
  141. package/src/cli/handlers/run-handler.js +16 -167
  142. package/src/cli/handlers/serve-handler.js +60 -0
  143. package/src/cli/services/bench-stats.js +54 -0
  144. package/src/cli/services/benchmark.js +161 -0
  145. package/src/cli/services/feedback.js +155 -0
  146. package/src/cli/services/instrument.js +83 -0
  147. package/src/cli/services/rag-service.js +361 -0
  148. package/src/cli/shared/cli-utils.js +24 -7
  149. package/src/cli/shared/config-context.js +21 -0
  150. package/src/cli/wizard/config-builder.js +81 -0
  151. package/src/cli/wizard/init-wizard.js +602 -0
  152. package/src/config/component-factory.js +125 -0
  153. package/src/config/enhanced-ragrc-schema.js +0 -2
  154. package/src/config/load-config.js +29 -10
  155. package/src/config/load-plugin-config.js +46 -2
  156. package/src/config/validate-schema.js +4 -1
  157. package/src/connectors/anthropic-connector.js +115 -57
  158. package/src/connectors/base-connector.js +74 -19
  159. package/src/connectors/cohere-connector.js +108 -34
  160. package/src/connectors/connector-utils.js +302 -0
  161. package/src/connectors/local-embedder.js +63 -5
  162. package/src/connectors/memory-retriever.js +125 -14
  163. package/src/connectors/ollama-connector.js +112 -51
  164. package/src/connectors/openai-connector.js +153 -44
  165. package/src/connectors/rag-prompt.js +88 -0
  166. package/src/core/create-pipeline.js +307 -61
  167. package/src/core/performance/parallel-processor.js +62 -1
  168. package/src/core/plugin-registry.js +125 -26
  169. package/src/core/stage-contracts.js +36 -0
  170. package/src/core/validate-plugin.js +85 -0
  171. package/src/cost/cost-calculator.js +205 -32
  172. package/src/debug/execution-tracer.js +14 -4
  173. package/src/dev/dev-server.js +173 -11
  174. package/src/dev/hot-reload.js +44 -4
  175. package/src/ecosystem/plugin-checks.js +181 -0
  176. package/src/ecosystem/plugin-hub.js +50 -125
  177. package/src/ecosystem/plugin-installer.js +298 -0
  178. package/src/ecosystem/plugin-probe.js +127 -0
  179. package/src/ecosystem/plugin-scanner.js +185 -0
  180. package/src/ecosystem/tar-extract.js +114 -0
  181. package/src/enterprise/audit-logging.js +158 -29
  182. package/src/enterprise/sso-integration.js +716 -228
  183. package/src/evaluate/context-metrics.js +28 -16
  184. package/src/evaluate/evaluator.js +3 -3
  185. package/src/evaluate/faithfulness.js +18 -14
  186. package/src/evaluate/groundedness.js +43 -12
  187. package/src/evaluate/pipeline-evaluator.js +35 -8
  188. package/src/evaluate/scoring.js +251 -3
  189. package/src/evaluate/semantic-similarity.js +79 -0
  190. package/src/experimental.js +71 -0
  191. package/src/grounding/check-answer.js +173 -0
  192. package/src/guardrails/guardrails-pipeline.js +69 -7
  193. package/src/guardrails/injection-detector.js +283 -0
  194. package/src/guardrails/post-generation-guard.js +19 -0
  195. package/src/guardrails/pre-retrieval-guard.js +36 -36
  196. package/src/guardrails/retrieval-guard.js +58 -8
  197. package/src/index.js +58 -1
  198. package/src/loader/csv-loader.js +3 -2
  199. package/src/loader/document-reader.js +91 -0
  200. package/src/loader/html-loader.js +3 -1
  201. package/src/loader/markdown-loader.js +3 -2
  202. package/src/reranker/cascade-reranker.js +3 -0
  203. package/src/reranker/embedding-reranker.js +136 -21
  204. package/src/reranker/llm-reranker.js +79 -12
  205. package/src/reranker/scoring-reranker.js +3 -0
  206. package/src/retrieval/bm25-search.js +12 -6
  207. package/src/retrieval/file-vector-store.js +241 -0
  208. package/src/retrieval/hybrid-retriever.js +22 -19
  209. package/src/security/jwt-config.js +13 -2
  210. package/src/security/jwt-validator.js +139 -34
  211. package/src/security/plugin-sandbox.js +18 -1
  212. package/src/security/plugin-signature-verifier.js +245 -70
  213. package/src/testing.js +254 -0
  214. package/src/utils/deprecate.js +69 -0
  215. package/src/utils/embed-query.js +33 -0
  216. package/src/utils/input-sanitizer.js +19 -4
  217. package/src/utils/logger.js +34 -4
  218. package/src/utils/run-abort.js +102 -0
  219. package/src/ai/federated-learning.js +0 -211
  220. package/src/ai/federation.js +0 -71
  221. package/src/ai/index.js +0 -22
  222. package/src/ai/model-trainer.js +0 -217
  223. package/src/ai/model-training.js +0 -202
  224. package/src/ai/multimodal/multi-modal-processor.js +0 -345
  225. package/src/ai/orchestrator.js +0 -65
  226. package/src/ai/retrieval/adaptive-retrieval-engine.js +0 -398
  227. package/src/cli/commands/ai-ml/adaptive-commands.js +0 -178
  228. package/src/cli/commands/ai-ml/federated-commands.js +0 -207
  229. package/src/cli/commands/ai-ml/index.js +0 -17
  230. package/src/cli/commands/ai-ml/multimodal-commands.js +0 -187
  231. package/src/cli/commands/ai-ml/shared.js +0 -51
  232. package/src/cli/commands/ai-ml/training-commands.js +0 -228
  233. package/src/cli/commands/ai-ml.js +0 -386
  234. package/src/cli/commands/docs.js +0 -228
  235. package/src/cli/commands/dx.js +0 -538
  236. package/src/cli/commands/wizard.js +0 -627
  237. package/src/cli/input-sanitization-middleware.js +0 -356
  238. package/src/cli/interactive-wizard.js +0 -373
  239. package/src/cli/templates/development.template.json +0 -64
  240. package/src/cli/templates/minimal.template.json +0 -33
  241. package/src/cli/templates/production.template.json +0 -104
  242. package/src/cli/templates/testing.template.json +0 -45
  243. package/src/cli/wizard/configuration.js +0 -148
  244. package/src/cli/wizard/observability.js +0 -79
  245. package/src/cli/wizard/performance.js +0 -76
  246. package/src/cli/wizard/plugin-selection.js +0 -297
  247. package/src/cli/wizard/preview-save.js +0 -172
  248. package/src/cli/wizard/project-setup.js +0 -66
  249. package/src/core/pipeline-factory.js +0 -59
  250. package/src/dag/enhanced-dag-engine.js +0 -894
  251. package/src/dx/index.js +0 -40
  252. package/src/dx/integration-templates.js +0 -662
  253. package/src/dx/performance-profiler.js +0 -968
  254. package/src/dx/realtime-debugger.js +0 -755
  255. package/src/dx/visual-pipeline-builder.js +0 -578
  256. package/src/ingest.js +0 -59
  257. package/src/pipeline/pipeline.js +0 -18
  258. package/src/query.js +0 -117
package/README.md CHANGED
@@ -1,14 +1,48 @@
1
- # rag-pipeline-utils
2
-
3
- **Composable RAG for Node.js — with built-in evaluation, citations, guardrails, and observability.**
1
+ <p align="center">
2
+ <img src="https://cdn.jsdelivr.net/gh/DevilsDev/rag-pipeline-utils@main/assets/banner.svg" alt="rag-pipeline-utils: composable RAG for Node.js with grounded citations, evaluation, guardrails and a working CLI" width="100%">
3
+ </p>
4
+
5
+ <p align="center">
6
+ <a href="https://www.npmjs.com/package/@devilsdev/rag-pipeline-utils"><img src="https://img.shields.io/npm/v/@devilsdev/rag-pipeline-utils.svg" alt="npm version"></a>
7
+ <a href="https://github.com/DevilsDev/rag-pipeline-utils/actions/workflows/ci.yml"><img src="https://github.com/DevilsDev/rag-pipeline-utils/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"></a>
8
+ <a href="https://www.npmjs.com/package/@devilsdev/rag-pipeline-utils"><img src="https://img.shields.io/npm/dm/@devilsdev/rag-pipeline-utils.svg" alt="Downloads"></a>
9
+ <a href="https://www.npmjs.com/package/@devilsdev/rag-pipeline-utils"><img src="https://img.shields.io/npm/types/@devilsdev/rag-pipeline-utils.svg" alt="TypeScript types"></a>
10
+ <a href="https://nodejs.org/"><img src="https://img.shields.io/node/v/@devilsdev/rag-pipeline-utils.svg" alt="Node.js version"></a>
11
+ <a href="https://github.com/DevilsDev/rag-pipeline-utils/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
12
+ </p>
13
+
14
+ <p align="center">
15
+ <a href="#quick-start">Quick start</a> ·
16
+ <a href="#use-cases">Use cases</a> ·
17
+ <a href="#how-it-compares">How it compares</a> ·
18
+ <a href="https://devilsdev.github.io/rag-pipeline-utils/">Documentation</a> ·
19
+ <a href="https://github.com/DevilsDev/rag-pipeline-utils/tree/main/examples">Examples</a>
20
+ </p>
4
21
 
5
- [![npm version](https://img.shields.io/npm/v/@devilsdev/rag-pipeline-utils.svg)](https://www.npmjs.com/package/@devilsdev/rag-pipeline-utils)
6
- [![Downloads](https://img.shields.io/npm/dm/@devilsdev/rag-pipeline-utils.svg)](https://www.npmjs.com/package/@devilsdev/rag-pipeline-utils)
7
- [![Types](https://img.shields.io/npm/types/@devilsdev/rag-pipeline-utils.svg)](https://www.npmjs.com/package/@devilsdev/rag-pipeline-utils)
8
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
- [![Node.js](https://img.shields.io/node/v/@devilsdev/rag-pipeline-utils.svg)](https://nodejs.org/)
22
+ # rag-pipeline-utils
10
23
 
11
- Start small with three core primitives — **pipeline**, **plugin**, **connector** — and opt in to evaluation, citations, guardrails, agentic reasoning, and GraphRAG as you need them.
24
+ `rag-pipeline-utils` gives you the building blocks of a RAG system as small, replaceable parts: an embedder, a retriever, an optional reranker and an LLM, wired together by one `createRagPipeline()` call. Evaluation, per-sentence citations, guardrails and agentic retrieval are opt-in layers on top. Every part follows a plain JavaScript contract, so you can swap a built-in connector for your own code without touching the rest.
25
+
26
+ - **Grounded by default.** Answers come back with the passages they were built from, sentence-level citations and a groundedness score, including a check that numbers in the answer appear in the sources.
27
+ - **Provider-neutral.** OpenAI, Anthropic, Cohere and Ollama connectors are built in, plus an offline TF-IDF embedder. Anything with an `embed()` or `generate()` method works too.
28
+ - **Production behaviour.** AbortSignal cancellation and timeouts, retries only on transient errors, ACL filtering before generation, PII redaction, typed exports for ESM, CommonJS and TypeScript.
29
+ - **A CLI that does real work.** `init`, `ingest`, `query` and `serve` run against a persistent local index, fully offline if you want.
30
+
31
+ ## Contents
32
+
33
+ - [Installation](#installation)
34
+ - [Quick start](#quick-start)
35
+ - [Command line](#command-line)
36
+ - [Use cases](#use-cases)
37
+ - [How it works](#how-it-works)
38
+ - [Capabilities](#capabilities)
39
+ - [How it compares](#how-it-compares)
40
+ - [Connectors and plugins](#connectors-and-plugins)
41
+ - [Experimental modules](#experimental-modules)
42
+ - [Compatibility](#compatibility)
43
+ - [Documentation](#documentation)
44
+ - [Security](#security)
45
+ - [Contributing](#contributing)
12
46
 
13
47
  ## Installation
14
48
 
@@ -16,169 +50,436 @@ Start small with three core primitives — **pipeline**, **plugin**, **connector
16
50
  npm install @devilsdev/rag-pipeline-utils
17
51
  ```
18
52
 
19
- ## Quick Start
53
+ Requires Node.js 18 or later. The package ships CommonJS, ESM and TypeScript declarations.
20
54
 
21
- ```javascript
55
+ ## Quick start
56
+
57
+ This example runs offline: it uses the built-in TF-IDF embedder and an in-memory vector store.
58
+
59
+ ```js
60
+ import {
61
+ createRagPipeline,
62
+ LocalEmbedder,
63
+ MemoryRetriever,
64
+ } from "@devilsdev/rag-pipeline-utils";
65
+
66
+ const docs = [
67
+ {
68
+ id: "vacation",
69
+ content:
70
+ "Full-time employees receive twenty days of paid vacation per year.",
71
+ },
72
+ {
73
+ id: "remote",
74
+ content: "Remote work is allowed two days per week with manager approval.",
75
+ },
76
+ ];
77
+
78
+ // 1. Fit the embedder to your corpus and index the documents.
79
+ const embedder = new LocalEmbedder();
80
+ embedder.train(docs.map((doc) => doc.content));
81
+
82
+ const retriever = new MemoryRetriever();
83
+ await retriever.store(
84
+ docs.map((doc) => ({ ...doc, vector: embedder.embed(doc.content) })),
85
+ );
86
+
87
+ // 2. Build the pipeline and ask a question.
88
+ const pipeline = createRagPipeline({ embedder, retriever });
89
+ const result = await pipeline.run({
90
+ query: "How many vacation days do I get?",
91
+ });
92
+
93
+ console.log(result.results[0].id); // "vacation"
94
+ console.log(result.answer); // null: no LLM configured, so retrieval only
95
+ ```
96
+
97
+ To generate answers, add an LLM. The same connector can also embed:
98
+
99
+ ```js
22
100
  import {
23
101
  createRagPipeline,
24
102
  OpenAIConnector,
25
103
  MemoryRetriever,
26
104
  } from "@devilsdev/rag-pipeline-utils";
27
105
 
106
+ const openai = new OpenAIConnector({ apiKey: process.env.OPENAI_API_KEY });
107
+
108
+ const retriever = new MemoryRetriever();
109
+ const policy =
110
+ "Full-time employees receive twenty days of paid vacation per year.";
111
+ await retriever.store([
112
+ { id: "vacation", content: policy, vector: await openai.embed(policy) },
113
+ ]);
114
+
28
115
  const pipeline = createRagPipeline({
29
- retriever: new MemoryRetriever(),
30
- llm: new OpenAIConnector({ apiKey: process.env.OPENAI_API_KEY }),
116
+ embedder: openai,
117
+ retriever,
118
+ llm: openai,
31
119
  });
32
-
33
120
  const result = await pipeline.run({
34
- query: "What is the vacation policy?",
121
+ query: "How many vacation days do I get?",
35
122
  options: { citations: true, evaluate: true },
36
123
  });
37
124
 
38
- console.log(result.results); // retrieved documents
39
- console.log(result.citations.groundednessScore); // 0.85
40
- console.log(result.evaluation.scores); // { faithfulness, relevance, ... }
125
+ console.log(result.answer);
126
+ console.log(result.citations.groundednessScore); // 0..1, share of grounded sentences
127
+ console.log(result.evaluation.scores); // { faithfulness, relevance, contextPrecision, groundedness }
128
+ ```
129
+
130
+ ## Command line
131
+
132
+ The `rag-pipeline` CLI builds a local index from your files and answers questions against it.
133
+
134
+ <p align="center">
135
+ <img src="https://cdn.jsdelivr.net/gh/DevilsDev/rag-pipeline-utils@main/assets/demo.gif" alt="Terminal recording: rag-pipeline init, ingest ./docs, then a query that returns the vacation policy as the top passage" width="720">
136
+ </p>
137
+
138
+ ```bash
139
+ npx rag-pipeline init # writes .ragrc.json (interactive in a terminal)
140
+ npx rag-pipeline ingest ./docs # indexes .md, .html, .csv and .txt files
141
+ npx rag-pipeline query "What is the remote work policy?"
142
+ npx rag-pipeline serve --port 3000 # local HTTP API: GET /health, POST /query
143
+ npx rag-pipeline doctor # checks config, API keys, plugins and the index
41
144
  ```
42
145
 
43
- **Requirements:** Node.js ≥ 18 · ESM or CommonJS
146
+ The default `local` template needs no API keys. Use `init --template openai`, `anthropic` or `ollama` to generate answers with a model. Other commands include `validate`, `hub install` for plugins and `ai benchmark` for measured latency. See the [CLI reference](https://devilsdev.github.io/rag-pipeline-utils/docs/CLI).
44
147
 
45
- ## Who This Is For
148
+ ## Use cases
46
149
 
47
- Teams building **production Node.js RAG services** who need:
150
+ ### Answer questions with sources your users can check
48
151
 
49
- - **Grounded outputs** they can trace back to sources
50
- - **Modular architecture** that doesn't lock them into a single provider
51
- - **Operational discipline** — tracing, metrics, cost controls, guardrails
52
- - **A stable foundation** with clear plugin contracts that outlast any vendor
152
+ Citations map every sentence of the answer to the passages that support it. A sentence whose facts or numbers are missing from the sources is reported as ungrounded.
53
153
 
54
- If you're looking for a framework you can grow into — start with retrieval, add evaluation when it matters, add guardrails when you ship to production — this is built for you.
154
+ ```js
155
+ import { CitationTracker } from "@devilsdev/rag-pipeline-utils";
55
156
 
56
- ## Use Cases
157
+ const sources = [
158
+ {
159
+ id: "policy",
160
+ content: "Employees receive twenty days of paid vacation per year.",
161
+ },
162
+ ];
163
+ const tracker = new CitationTracker();
57
164
 
58
- ### Document Q&A with citations
165
+ const good = tracker.track(
166
+ "Employees receive twenty days of paid vacation per year.",
167
+ sources,
168
+ );
169
+ const wrong = tracker.track(
170
+ "Employees receive thirty days of paid vacation per year.",
171
+ sources,
172
+ );
59
173
 
60
- ```javascript
61
- const result = await pipeline.run({
62
- query: "Which policy covers remote work?",
63
- options: { citations: true },
174
+ console.log(good.groundednessScore); // 1
175
+ console.log(wrong.groundednessScore); // 0: the number does not match the source
176
+ ```
177
+
178
+ ### Measure answer quality in CI
179
+
180
+ `PipelineEvaluator` scores faithfulness, relevance, context precision and, when you supply a reference answer, context recall. Run it over a fixed question set and fail the build when scores drop.
181
+
182
+ ```js
183
+ import { PipelineEvaluator } from "@devilsdev/rag-pipeline-utils";
184
+
185
+ const evaluator = new PipelineEvaluator();
186
+ const report = evaluator.evaluate(
187
+ {
188
+ query: "How many vacation days do employees get?",
189
+ answer: "Employees receive twenty days of paid vacation per year.",
190
+ results: [
191
+ { content: "Employees receive twenty days of paid vacation per year." },
192
+ ],
193
+ },
194
+ { referenceAnswer: "Twenty days of paid vacation per year." },
195
+ );
196
+
197
+ console.log(report.scores); // includes contextRecall because a reference was given
198
+ if (report.scores.faithfulness < 0.8) process.exitCode = 1;
199
+ ```
200
+
201
+ ### Protect an internal assistant
202
+
203
+ `GuardrailsPipeline` wraps any pipeline. Access control runs before the LLM sees a document, prompt-injection detection runs on the query, and PII is redacted from the answer, its citations and its evaluation details.
204
+
205
+ ```js
206
+ import {
207
+ createRagPipeline,
208
+ GuardrailsPipeline,
209
+ OpenAIConnector,
210
+ } from "@devilsdev/rag-pipeline-utils";
211
+
212
+ const openai = new OpenAIConnector({ apiKey: process.env.OPENAI_API_KEY });
213
+ const retriever = {
214
+ // Any object with retrieve() works; requiredRole drives access control.
215
+ async retrieve() {
216
+ return [
217
+ {
218
+ id: "handbook",
219
+ content: "The handbook covers vacation.",
220
+ metadata: {},
221
+ },
222
+ {
223
+ id: "salaries",
224
+ content: "Executive salaries ...",
225
+ metadata: { requiredRole: "exec" },
226
+ },
227
+ ];
228
+ },
229
+ };
230
+
231
+ const assistant = new GuardrailsPipeline(
232
+ createRagPipeline({ retriever, llm: openai }),
233
+ {
234
+ preRetrieval: { enableInjectionDetection: true },
235
+ retrieval: { enforceACL: true },
236
+ postGeneration: { enablePIIDetection: true },
237
+ strict: true, // block instead of warn
238
+ },
239
+ );
240
+
241
+ const result = await assistant.run({
242
+ query: "What does the handbook cover?",
243
+ context: { userPermissions: ["employee"] }, // "salaries" never reaches the LLM
64
244
  });
65
- // result.citations maps each answer sentence to its source documents
245
+ console.log(result.guardrails.retrieval.removed); // [{ id: "salaries" }]
66
246
  ```
67
247
 
68
- ### Internal knowledge assistant with evaluation
248
+ ### Combine keyword and vector search
69
249
 
70
- ```javascript
71
- const result = await pipeline.run({
72
- query: userQuestion,
73
- options: { evaluate: true },
250
+ `HybridRetriever` merges any retrievers with Reciprocal Rank Fusion. BM25 finds exact terms such as product codes; vectors find paraphrases.
251
+
252
+ ```js
253
+ import {
254
+ BM25Search,
255
+ HybridRetriever,
256
+ LocalEmbedder,
257
+ MemoryRetriever,
258
+ } from "@devilsdev/rag-pipeline-utils";
259
+
260
+ const docs = [
261
+ {
262
+ id: "err-4012",
263
+ content: "Error E4012 means the API token expired. Generate a new token.",
264
+ },
265
+ {
266
+ id: "billing",
267
+ content: "Invoices are emailed on the first business day of each month.",
268
+ },
269
+ ];
270
+
271
+ const bm25 = new BM25Search();
272
+ bm25.index(docs);
273
+
274
+ const embedder = new LocalEmbedder();
275
+ embedder.train(docs.map((doc) => doc.content));
276
+ const vectors = new MemoryRetriever();
277
+ await vectors.store(
278
+ docs.map((doc) => ({ ...doc, vector: embedder.embed(doc.content) })),
279
+ );
280
+
281
+ const hybrid = new HybridRetriever([
282
+ { retriever: bm25, weight: 1, name: "bm25" },
283
+ { retriever: vectors, weight: 1, name: "vectors" },
284
+ ]);
285
+ const results = await hybrid.retrieve({
286
+ query: "what does E4012 mean",
287
+ queryVector: embedder.embed("what does E4012 mean"),
288
+ topK: 2,
74
289
  });
75
- // result.evaluation.scores = { faithfulness, relevance, contextPrecision, ... }
76
- // Alert when faithfulness drops below threshold in production
290
+ console.log(results[0].id); // "err-4012"
77
291
  ```
78
292
 
79
- ### Enterprise service with guardrails
293
+ ### Answer multi-part questions
294
+
295
+ `AgenticPipeline` splits compound questions into sub-queries, retrieves for each, and self-checks the answer against the sources before returning it.
296
+
297
+ ```js
298
+ import {
299
+ AgenticPipeline,
300
+ MemoryRetriever,
301
+ OpenAIConnector,
302
+ } from "@devilsdev/rag-pipeline-utils";
303
+
304
+ const openai = new OpenAIConnector({ apiKey: process.env.OPENAI_API_KEY });
305
+ const retriever = new MemoryRetriever();
306
+ const policies = [
307
+ "Full-time employees receive twenty days of paid vacation per year.",
308
+ "Remote work is allowed two days per week with manager approval.",
309
+ ];
310
+ await retriever.store(
311
+ await Promise.all(
312
+ policies.map(async (content, i) => ({
313
+ id: `p${i}`,
314
+ content,
315
+ vector: await openai.embed(content),
316
+ })),
317
+ ),
318
+ );
319
+
320
+ const agent = new AgenticPipeline();
321
+ const result = await agent.run({
322
+ query: "How much vacation do I get, and can I work from home?",
323
+ retriever,
324
+ llm: openai,
325
+ embedder: openai, // each sub-query gets its own embedding
326
+ });
327
+ console.log(result.subQueries.map((q) => q.subQuery));
328
+ console.log(result.answer);
329
+ ```
330
+
331
+ ### Keep request latency bounded
332
+
333
+ Every run accepts a timeout and an `AbortSignal`. The signal is passed to the embedder, retriever, reranker and LLM, so cancelled work stops instead of running in the background.
334
+
335
+ ```js
336
+ import {
337
+ createRagPipeline,
338
+ OpenAIConnector,
339
+ MemoryRetriever,
340
+ } from "@devilsdev/rag-pipeline-utils";
80
341
 
81
- ```javascript
82
- import { GuardrailsPipeline, createRagPipeline } from "@devilsdev/rag-pipeline-utils";
342
+ const openai = new OpenAIConnector({ apiKey: process.env.OPENAI_API_KEY });
343
+ const pipeline = createRagPipeline({
344
+ embedder: openai,
345
+ retriever: new MemoryRetriever(),
346
+ llm: openai,
347
+ });
83
348
 
84
- const safePipeline = new GuardrailsPipeline(createRagPipeline({ ... }), {
85
- preRetrieval: { enableInjectionDetection: true },
86
- retrieval: { minRelevanceScore: 0.6 },
87
- postGeneration:{ enablePIIDetection: true, enableGroundednessCheck: true },
349
+ const controller = new AbortController(); // e.g. aborted when the HTTP client disconnects
350
+ const result = await pipeline.run({
351
+ query: "Summarise the travel policy",
352
+ options: { timeout: 10_000, signal: controller.signal },
88
353
  });
354
+ if (!result.success) console.error(result.error); // "Execution timeout" or "Execution aborted"
89
355
  ```
90
356
 
91
- ## Architecture
357
+ ### Run fully local
92
358
 
359
+ Pair the `LocalEmbedder` or Ollama embeddings with an Ollama model and `FileVectorStore` for a private, offline setup. The CLI's `local` and `ollama` templates set this up for you:
360
+
361
+ ```bash
362
+ npx rag-pipeline init --no-interactive --template ollama
363
+ npx rag-pipeline ingest ./docs
364
+ npx rag-pipeline serve
93
365
  ```
94
- Ingestion: Documents → Chunking → Embedder → Vector Store
95
366
 
96
- Query: User Query
97
- ↓
98
- Guardrails → prompt injection, topic filtering
99
- ↓
100
- Query Planner → decomposes complex queries
101
- ↓
102
- Hybrid Retriever → vector + BM25 with Reciprocal Rank Fusion
103
- ↓
104
- Reranker → BM25 / embedding / cascade
105
- ↓
106
- LLM → generates answer from context
107
- ↓
108
- Citation Tracker → maps sentences to sources
109
- ↓
110
- Evaluator → scores faithfulness & groundedness
111
- ↓
112
- Response { answer, citations, evaluation }
367
+ ## How it works
368
+
369
+ ```
370
+ ┌──────────────── GuardrailsPipeline (optional) ─────────────────┐
371
+ query ──▶ │ injection check ─▶ embed ─▶ retrieve ─▶ ACL / relevance filter │
372
+ │ ─▶ rerank ─▶ LLM ─▶ citations ─▶ evaluation ─▶ PII redaction │ ──▶ result
373
+ └────────────────────────────────────────────────────────────────┘
113
374
  ```
114
375
 
115
- Each stage is optional, pluggable, and observable.
376
+ `createRagPipeline()` runs embed → retrieve → rerank → generate, then citations and evaluation when requested. Each stage receives the run's `AbortSignal`, and a timeout or abort stops the remaining stages. `GuardrailsPipeline`, `AgenticPipeline` and `HybridRetriever` compose around or inside it; they are not hidden steps of the default pipeline.
116
377
 
117
- ## Capabilities
378
+ The result of `run()` is:
118
379
 
119
- Opt in only to what you need:
380
+ ```ts
381
+ {
382
+ success: boolean;
383
+ query: string;
384
+ results: Array<{ id; content; score; metadata }>;
385
+ answer: string | null; // null when no LLM is configured
386
+ citations?: { citations; groundednessScore; hallucinationReport };
387
+ evaluation?: { scores; details; metadata };
388
+ error?: string; // set when success is false
389
+ }
390
+ ```
120
391
 
121
- | Capability | What you get |
122
- | -------------- | ------------------------------------------------------------------------ |
123
- | **Chunking** | 5 strategies: sentence, fixed-size, recursive, semantic, structure-aware |
124
- | **Retrieval** | Hybrid vector + BM25 with Reciprocal Rank Fusion |
125
- | **Reranking** | LLM, BM25 scoring, embedding similarity, or cascade |
126
- | **Evaluation** | Faithfulness, relevance, context precision/recall, groundedness |
127
- | **Citation** | Per-sentence source attribution, hallucination detection |
128
- | **Agentic** | Query planning, iterative retrieval, self-critique |
129
- | **Guardrails** | Injection detection, PII filtering, ACL-aware access control |
130
- | **GraphRAG** | Knowledge graph construction with entity extraction |
131
- | **Streaming** | SSE and WebSocket adapters with backpressure control |
132
- | **Cost** | Token tracking, budget enforcement, provider pricing |
133
- | **Debugging** | Execution tracing, bottleneck detection |
134
- | **MCP** | Expose pipelines as Model Context Protocol tools |
135
- | **Enterprise** | Multi-tenancy, SSO (SAML/OAuth2/AD/OIDC), audit logs |
392
+ ## Capabilities
136
393
 
137
- See [full documentation](https://devilsdev.github.io/rag-pipeline-utils/) for complete API reference.
394
+ | Area | What you get |
395
+ | -------------- | ---------------------------------------------------------------------------------------------------------- |
396
+ | **Chunking** | `ChunkingEngine` with sentence, fixed-size, recursive, semantic and structure-aware strategies |
397
+ | **Retrieval** | `MemoryRetriever`, persistent `FileVectorStore`, `BM25Search`, `HybridRetriever` (Reciprocal Rank Fusion) |
398
+ | **Reranking** | `ScoringReranker`, `EmbeddingReranker` (cached), `CascadeReranker` |
399
+ | **Citations** | Per-sentence source mapping, hallucination report, numeric-consistency check |
400
+ | **Evaluation** | Faithfulness, relevance, context precision, context recall (with a reference), groundedness, BLEU/ROUGE |
401
+ | **Guardrails** | Injection detection with input normalisation, ACL and relevance filtering before generation, PII redaction |
402
+ | **Agentic** | `QueryPlanner`, `IterativeRetriever`, `SelfCritiqueChecker`, `AgenticPipeline` |
403
+ | **GraphRAG** | `KnowledgeGraph`, `EntityExtractor`, `GraphRetriever` |
404
+ | **Streaming** | Token streaming with a final chunk carrying citations and evaluation; `SSEAdapter`, `WebSocketAdapter` |
405
+ | **Cost** | `CostTracker`, `TokenBudget`, `CostCalculator` with sourced, overridable pricing |
406
+ | **Operations** | `DevServer` HTTP API, `ExecutionTracer`, `AuditLogger`, MCP tool server (`MCPServer`) |
407
+
408
+ ## How it compares
409
+
410
+ A short summary of the [comparison page](https://devilsdev.github.io/rag-pipeline-utils/docs/Comparison) (competitor details as of April 2026). The other libraries are broader frameworks; this one is narrower on purpose.
411
+
412
+ | | rag-pipeline-utils | LangChain.js | LlamaIndex.TS |
413
+ | ---------------- | ------------------------------------------------------- | ------------------------------------- | ------------------------------------ |
414
+ | Focus | RAG pipelines for Node.js services | General-purpose LLM orchestration | Indexing-first RAG |
415
+ | Evaluation | Built in: faithfulness, relevance, context P/R | Via LangSmith (separate, paid option) | Some metrics, evolving |
416
+ | Citations | Built in: per-sentence, with groundedness score | Possible, wired up by hand | Possible, wired up by hand |
417
+ | Guardrails | Built in: pre-retrieval, retrieval, post-generation | Via integrations (Guardrails AI etc.) | Via integrations |
418
+ | Vector stores | Memory and file-backed, plus a plugin contract | 50+ integrations | Many integrations and native indexes |
419
+ | LLM providers | OpenAI, Anthropic, Cohere, Ollama, plus plugins | Largest ecosystem | Large ecosystem |
420
+ | Agents and tools | Query planning and iterative retrieval | Mature agent framework | Agent framework |
421
+ | Packaging | One package, dual ESM and CommonJS | Many packages, mostly ESM | One package, mostly ESM |
422
+ | Stability | Documented [SEMVER policy](SEMVER.md) with deprecations | Versioned per package | Versioned |
423
+
424
+ Choose LangChain.js for the widest integration catalogue or work that goes well beyond RAG, and LlamaIndex.TS for rich index types and structured data sources. Choose this library when evaluation, citations and guardrails are requirements and you want a small surface to review.
425
+ 3
426
+
427
+ ## Connectors and plugins
428
+
429
+ | Connector | Embeddings | Generation | Notes |
430
+ | -------------------- | :--------: | :--------: | ------------------------------------------ |
431
+ | `OpenAIConnector` | ✓ | ✓ | `OPENAI_API_KEY` |
432
+ | `AnthropicConnector` | | ✓ | `ANTHROPIC_API_KEY` |
433
+ | `CohereConnector` | ✓ | | Embeddings and reranking, `COHERE_API_KEY` |
434
+ | `OllamaConnector` | ✓ | ✓ | Local models, no key |
435
+ | `LocalEmbedder` | ✓ | | Offline TF-IDF, fitted to your corpus |
436
+
437
+ Connectors read API keys when they are created, retry only transient failures (network errors, 429, 5xx) with backoff, and send retrieved documents to the model as clearly delimited, untrusted reference data rather than as instructions.
438
+
439
+ A plugin is any object with the method its stage needs: `embed()`, `retrieve()`/`store()`, `generate()`, `rerank()` or `load()`. Reference your own modules from `.ragrc.json`, or install packaged plugins with checksum verification and a static security scan:
138
440
 
139
- ## Provider Connectors
441
+ ```bash
442
+ npx rag-pipeline hub install ./my-llm-plugin # also .tgz files, npm:<package> or a registry
443
+ npx rag-pipeline hub certify check ./my-llm-plugin # scores contract, security, tests and docs
444
+ ```
140
445
 
141
- Built-in connectors for popular providers — or implement the contract for your own:
446
+ ## Experimental modules
142
447
 
143
- ```javascript
144
- import {
145
- OpenAIConnector, // GPT-4, text-embedding-3
146
- AnthropicConnector, // Claude 3 Opus, Sonnet, Haiku
147
- CohereConnector, // Embed + Rerank
148
- OllamaConnector, // Llama 3, Mistral (local, offline)
149
- LocalEmbedder, // TF-IDF (offline, no API)
150
- MemoryRetriever, // In-memory cosine similarity
151
- } from "@devilsdev/rag-pipeline-utils";
448
+ Simulated or incomplete modules live under a separate entry point and are not covered by the stability guarantees in [SEMVER.md](SEMVER.md): model training, federated learning, multimodal processing, adaptive retrieval, SSO providers, multi-tenancy, data governance, the plugin sandbox and the plugin certification class.
449
+
450
+ ```js
451
+ import { TenantManager } from "@devilsdev/rag-pipeline-utils/experimental";
152
452
  ```
153
453
 
154
- ## Documentation
454
+ They are still exported from the main entry in 2.5 with a one-time deprecation warning, and will be removed from it in 3.0. Do not use them for authentication, tenant isolation or compliance. The [Experimental modules](https://devilsdev.github.io/rag-pipeline-utils/docs/Experimental) page describes what each one really does.
155
455
 
156
- - **[Documentation site](https://devilsdev.github.io/rag-pipeline-utils/)** — guides, API reference, deployment
157
- - **[Architecture](https://devilsdev.github.io/rag-pipeline-utils/docs/Architecture)** — plugin contracts, pipeline internals
158
- - **[API reference](https://devilsdev.github.io/rag-pipeline-utils/docs/API-Reference)** — complete export index
159
- - **[Examples](https://devilsdev.github.io/rag-pipeline-utils/docs/Examples)** — chatbot, Q&A, code search, support
160
- - **[Comparison vs LangChain.js / LlamaIndex.TS](https://devilsdev.github.io/rag-pipeline-utils/docs/Comparison)** — honest decision framework
161
- - **[Runnable demo](examples/fastify-rag-demo)** — Fastify + OpenAI + guardrails, deployable in one command
162
- - **[Benchmarks & methodology](BENCHMARKS.md)** — how we measure, how you reproduce
163
- - **[Security policy](SECURITY.md)** — responsible disclosure, supported versions
164
- - **[Security capability matrix](https://devilsdev.github.io/rag-pipeline-utils/docs/Security-Capabilities)** — what's battle-tested vs. recommended vs. example
165
- - **[API stability policy (SEMVER.md)](SEMVER.md)** — what counts as breaking, deprecation windows
166
- - **[Changelog](CHANGELOG.md)** — release history
456
+ ## Compatibility
167
457
 
168
- ## Roadmap
458
+ | | |
459
+ | -------------- | ------------------------------------------------------------------------- |
460
+ | Node.js | 18, 20, 22 (Node 18 support ends with 3.0) |
461
+ | Module formats | CommonJS (`require`) and ESM (`import`) |
462
+ | TypeScript | Declarations for every export, including `/experimental` |
463
+ | Versioning | Semantic versioning with a deprecation window, see [SEMVER.md](SEMVER.md) |
464
+ | Supply chain | Published from GitHub Actions with npm provenance |
465
+
466
+ ## Documentation
169
467
 
170
- **Current (v2.4):** chunking, citation, evaluation, agentic RAG, hybrid retrieval, 3-layer guardrails, GraphRAG, streaming, cost management, MCP integration, 7 provider connectors.
468
+ - [Documentation site](https://devilsdev.github.io/rag-pipeline-utils/): guides, API reference and deployment
469
+ - [CLI reference](https://devilsdev.github.io/rag-pipeline-utils/docs/CLI)
470
+ - [API reference](https://devilsdev.github.io/rag-pipeline-utils/docs/API-Reference)
471
+ - [Evaluation guide](https://devilsdev.github.io/rag-pipeline-utils/docs/Evaluation)
472
+ - [Examples](examples/): basic pipeline, OpenAI with Pinecone, and a deployable Fastify service ([run the basic pipeline in your browser](https://stackblitz.com/github/DevilsDev/rag-pipeline-utils/tree/main/examples/basic-pipeline))
473
+ - [Changelog](CHANGELOG.md) and [benchmarks methodology](BENCHMARKS.md)
171
474
 
172
- **Next (v3.0):** intelligent caching, native Rust bindings, Kubernetes operator, edge deployment.
475
+ ## Security
173
476
 
174
- Vote on features in [GitHub Discussions](https://github.com/DevilsDev/rag-pipeline-utils/discussions/categories/roadmap).
477
+ Report vulnerabilities privately as described in [SECURITY.md](SECURITY.md). The [security capability matrix](https://devilsdev.github.io/rag-pipeline-utils/docs/Security-Capabilities) lists what is hardened, what is recommended configuration, and what is an example only.
175
478
 
176
- ## Community
479
+ ## Contributing
177
480
 
178
- - **[GitHub Discussions](https://github.com/DevilsDev/rag-pipeline-utils/discussions)** — ask questions, share use cases
179
- - **[Issues](https://github.com/DevilsDev/rag-pipeline-utils/issues)** — report bugs, request features
180
- - **[Contributing guide](https://github.com/DevilsDev/rag-pipeline-utils/blob/main/docs/CONTRIBUTING.md)**
481
+ Issues and pull requests are welcome. Start with the [contributing guide](docs/CONTRIBUTING.md), and use [GitHub Discussions](https://github.com/DevilsDev/rag-pipeline-utils/discussions) for questions and ideas. Run `npm test` and `npm run lint` before opening a pull request.
181
482
 
182
483
  ## License
183
484
 
184
- MIT — see [LICENSE](LICENSE).
485
+ [MIT](LICENSE)
package/SECURITY.md CHANGED
@@ -8,11 +8,11 @@ Only the latest minor release line receives security patches. When a new
8
8
  minor version ships, the previous line receives one more patch window of
9
9
  30 days before support ends.
10
10
 
11
- | Version | Supported |
12
- | ------- | ------------------ |
13
- | 2.4.x | :white_check_mark: |
14
- | 2.3.x | :x: |
15
- | < 2.3 | :x: |
11
+ | Version | Supported |
12
+ | ------- | ------------------------------------------------------------ |
13
+ | 2.5.x | :white_check_mark: |
14
+ | 2.4.x | Security fixes for 30 days after the 2.5.0 release, then :x: |
15
+ | < 2.4 | :x: |
16
16
 
17
17
  ## Reporting a Vulnerability
18
18
 
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+ module.exports = require('./index.cjs')[Symbol.for('@devilsdev/rag-pipeline-utils/experimental')];
@@ -0,0 +1 @@
1
+ export * from "./types/experimental";
@@ -0,0 +1,5 @@
1
+ import { createRequire } from 'module';
2
+ const require = createRequire(import.meta.url);
3
+ const mod = require('./experimental.cjs');
4
+ export const { MultiModalProcessor, AdaptiveRetrievalEngine, FederatedLearningCoordinator, ModelTrainingOrchestrator, DataGovernanceManager, DataGovernance, TenantManager, ResourceMonitor, SSOManager, SAMLProvider, OAuth2Provider, ActiveDirectoryProvider, OIDCProvider, PluginSandbox, PluginCertification } = mod;
5
+ export default mod;