@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
@@ -1,218 +1,109 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://raw.githubusercontent.com/DevilsDev/rag-pipeline-utils/main/.ragrc.schema.json",
4
- "title": "RAG Pipeline Configuration Schema",
5
- "description": "Configuration schema for @devilsdev/rag-pipeline-utils",
4
+ "title": "rag-pipeline configuration (.ragrc.json)",
5
+ "description": "Configuration read by the rag-pipeline CLI and loadRagConfig() in @devilsdev/rag-pipeline-utils. Each pipeline entry names a built-in component, a custom module under \"plugins\", or a plugin registered on pluginRegistry.",
6
6
  "type": "object",
7
- "required": ["plugins"],
7
+ "required": ["pipeline"],
8
8
  "properties": {
9
- "plugins": {
9
+ "$schema": { "type": "string" },
10
+ "namespace": {
11
+ "type": "string",
12
+ "minLength": 1,
13
+ "default": "default",
14
+ "description": "Logical name for this configuration."
15
+ },
16
+ "metadata": {
10
17
  "type": "object",
11
- "description": "Plugin specifications for RAG pipeline components",
12
- "required": ["loader", "embedder", "retriever", "llm"],
18
+ "description": "Free-form information about the configuration.",
13
19
  "properties": {
14
- "loader": {
15
- "type": "object",
16
- "description": "Document loader plugins",
17
- "minProperties": 1,
18
- "additionalProperties": {
19
- "oneOf": [
20
- { "type": "string" },
21
- {
22
- "type": "object",
23
- "required": ["name"],
24
- "properties": {
25
- "name": { "type": "string" },
26
- "version": { "type": "string" },
27
- "source": {
28
- "type": "string",
29
- "enum": ["registry", "local", "git", "npm"]
30
- },
31
- "path": { "type": "string" },
32
- "config": { "type": "object" },
33
- "enabled": { "type": "boolean" }
34
- }
35
- }
36
- ]
37
- }
38
- },
39
- "embedder": {
40
- "type": "object",
41
- "description": "Text embedding plugins",
42
- "minProperties": 1,
43
- "additionalProperties": {
44
- "oneOf": [
45
- { "type": "string" },
46
- {
47
- "type": "object",
48
- "required": ["name"],
49
- "properties": {
50
- "name": { "type": "string" },
51
- "version": { "type": "string" },
52
- "source": {
53
- "type": "string",
54
- "enum": ["registry", "local", "git", "npm"]
55
- },
56
- "path": { "type": "string" },
57
- "config": { "type": "object" },
58
- "enabled": { "type": "boolean" }
59
- }
60
- }
61
- ]
62
- }
63
- },
64
- "retriever": {
65
- "type": "object",
66
- "description": "Vector retrieval plugins",
67
- "minProperties": 1,
68
- "additionalProperties": {
69
- "oneOf": [
70
- { "type": "string" },
71
- {
72
- "type": "object",
73
- "required": ["name"],
74
- "properties": {
75
- "name": { "type": "string" },
76
- "version": { "type": "string" },
77
- "source": {
78
- "type": "string",
79
- "enum": ["registry", "local", "git", "npm"]
80
- },
81
- "path": { "type": "string" },
82
- "config": { "type": "object" },
83
- "enabled": { "type": "boolean" }
84
- }
85
- }
86
- ]
87
- }
88
- },
89
- "llm": {
90
- "type": "object",
91
- "description": "Language model plugins",
92
- "minProperties": 1,
93
- "additionalProperties": {
94
- "oneOf": [
95
- { "type": "string" },
96
- {
97
- "type": "object",
98
- "required": ["name"],
99
- "properties": {
100
- "name": { "type": "string" },
101
- "version": { "type": "string" },
102
- "source": {
103
- "type": "string",
104
- "enum": ["registry", "local", "git", "npm"]
105
- },
106
- "path": { "type": "string" },
107
- "config": { "type": "object" },
108
- "enabled": { "type": "boolean" }
109
- }
110
- }
111
- ]
112
- }
113
- },
114
- "reranker": {
115
- "type": "object",
116
- "description": "Result reranking plugins (optional)",
117
- "minProperties": 1,
118
- "additionalProperties": {
119
- "oneOf": [
120
- { "type": "string" },
121
- {
122
- "type": "object",
123
- "required": ["name"],
124
- "properties": {
125
- "name": { "type": "string" },
126
- "version": { "type": "string" },
127
- "source": {
128
- "type": "string",
129
- "enum": ["registry", "local", "git", "npm"]
130
- },
131
- "path": { "type": "string" },
132
- "config": { "type": "object" },
133
- "enabled": { "type": "boolean" }
134
- }
135
- }
136
- ]
137
- }
138
- }
139
- },
140
- "additionalProperties": false
20
+ "name": { "type": "string" },
21
+ "version": { "type": "string" },
22
+ "description": { "type": "string" },
23
+ "createdAt": { "type": "string" }
24
+ }
141
25
  },
142
26
  "pipeline": {
27
+ "type": "array",
28
+ "description": "Components in pipeline order. At least an embedder and a retriever are needed for ingest and query.",
29
+ "items": { "$ref": "#/definitions/pipelineEntry" }
30
+ },
31
+ "plugins": {
143
32
  "type": "object",
144
- "description": "Pipeline execution configuration",
145
- "properties": {
146
- "stages": {
147
- "type": "array",
148
- "description": "Pipeline execution stages",
149
- "items": {
150
- "type": "string",
151
- "enum": ["loader", "embedder", "retriever", "llm", "reranker"]
152
- }
153
- },
154
- "mode": {
33
+ "description": "Custom plugin modules by stage and name. Paths are relative to the configuration file; the module exports a class (constructed with the entry's config) or an object.",
34
+ "propertyNames": { "$ref": "#/definitions/stage" },
35
+ "additionalProperties": {
36
+ "type": "object",
37
+ "additionalProperties": {
155
38
  "type": "string",
156
- "description": "Pipeline execution mode",
157
- "enum": ["sequential", "parallel", "dag"],
158
- "default": "sequential"
39
+ "description": "Path to the plugin module, e.g. \"./plugins/my-llm.js\"."
159
40
  }
160
- }
41
+ },
42
+ "examples": [{ "llm": { "my-llm": "./plugins/my-llm.js" } }]
161
43
  },
162
44
  "performance": {
163
45
  "type": "object",
164
- "description": "Performance and optimization settings",
165
- "properties": {
166
- "parallel": {
167
- "type": "object",
168
- "properties": {
169
- "enabled": { "type": "boolean", "default": false },
170
- "maxConcurrency": { "type": "number", "default": 5 },
171
- "batchSize": { "type": "number", "default": 10 }
172
- }
173
- },
174
- "streaming": {
175
- "type": "object",
176
- "properties": {
177
- "enabled": { "type": "boolean", "default": false },
178
- "maxMemoryMB": { "type": "number", "default": 512 },
179
- "bufferSize": { "type": "number", "default": 100 }
180
- }
181
- }
182
- }
46
+ "description": "Optional performance settings, preserved for plugins and tooling."
183
47
  },
184
48
  "observability": {
185
49
  "type": "object",
186
- "description": "Logging and monitoring configuration",
50
+ "description": "Optional logging and metrics settings, preserved for plugins and tooling."
51
+ },
52
+ "cache": { "type": "object" },
53
+ "limits": { "type": "object" },
54
+ "storage": { "type": "object" }
55
+ },
56
+ "definitions": {
57
+ "stage": {
58
+ "type": "string",
59
+ "enum": ["loader", "embedder", "retriever", "reranker", "llm"]
60
+ },
61
+ "pipelineEntry": {
62
+ "type": "object",
63
+ "required": ["stage", "name"],
187
64
  "properties": {
188
- "logging": {
189
- "type": "object",
190
- "properties": {
191
- "level": {
192
- "type": "string",
193
- "enum": ["debug", "info", "warn", "error"],
194
- "default": "info"
195
- },
196
- "structured": { "type": "boolean", "default": true }
197
- }
65
+ "stage": { "$ref": "#/definitions/stage" },
66
+ "name": {
67
+ "type": "string",
68
+ "minLength": 1,
69
+ "description": "Built-in names: loader \"auto\"; embedder \"local\", \"openai\", \"ollama\", \"cohere\"; retriever \"file-store\", \"memory\"; llm \"openai\", \"anthropic\", \"ollama\"; reranker \"scoring\". Any other name must be declared under \"plugins\" or registered on pluginRegistry.",
70
+ "examples": [
71
+ "auto",
72
+ "local",
73
+ "openai",
74
+ "ollama",
75
+ "cohere",
76
+ "file-store",
77
+ "memory",
78
+ "anthropic",
79
+ "scoring"
80
+ ]
198
81
  },
199
- "metrics": {
82
+ "version": { "type": "string" },
83
+ "config": {
200
84
  "type": "object",
201
- "properties": {
202
- "enabled": { "type": "boolean", "default": false },
203
- "exportFormat": {
204
- "type": "string",
205
- "enum": ["prometheus", "json", "statsd"],
206
- "default": "json"
207
- }
208
- }
85
+ "description": "Options passed to the component's constructor, e.g. { \"model\": \"gpt-4o-mini\" } or { \"path\": \".rag/index.json\" } for file-store. Do not put API keys here; use environment variables."
209
86
  }
210
87
  }
211
- },
212
- "namespace": {
213
- "type": "string",
214
- "description": "Configuration namespace for isolation"
215
88
  }
216
89
  },
217
- "additionalProperties": false
90
+ "examples": [
91
+ {
92
+ "namespace": "default",
93
+ "pipeline": [
94
+ { "stage": "loader", "name": "auto" },
95
+ { "stage": "embedder", "name": "local" },
96
+ {
97
+ "stage": "retriever",
98
+ "name": "file-store",
99
+ "config": { "path": ".rag/index.json" }
100
+ },
101
+ {
102
+ "stage": "llm",
103
+ "name": "openai",
104
+ "config": { "model": "gpt-4o-mini" }
105
+ }
106
+ ]
107
+ }
108
+ ]
218
109
  }