@devilsdev/rag-pipeline-utils 2.6.1 → 2.7.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 (90) hide show
  1. package/BENCHMARKS.md +7 -1
  2. package/CHANGELOG.md +135 -0
  3. package/README.md +37 -24
  4. package/dist/index.cjs +4164 -1825
  5. package/dist/index.d.ts +265 -256
  6. package/dist/index.mjs +1 -1
  7. package/dist/types/cache/memory-cache.d.ts +4 -1
  8. package/dist/types/cache/redis-cache.d.ts +4 -1
  9. package/dist/types/cli/services/instrument.d.ts +14 -0
  10. package/dist/types/cli/services/rag-service.d.ts +140 -0
  11. package/dist/types/cli/shared/config-context.d.ts +9 -0
  12. package/dist/types/config/component-factory.d.ts +57 -0
  13. package/dist/types/config/enhanced-ragrc-schema.d.ts +648 -0
  14. package/dist/types/config/load-config.d.ts +18 -0
  15. package/dist/types/config/normalize-config.d.ts +9 -0
  16. package/dist/types/core/observability/event-logger.d.ts +211 -0
  17. package/dist/types/core/observability/metrics.d.ts +585 -0
  18. package/dist/types/core/performance/parallel-processor.d.ts +92 -0
  19. package/dist/types/core/plugin-registry.d.ts +5 -0
  20. package/dist/types/dag/core/execution-scheduler.d.ts +3 -1
  21. package/dist/types/dag/dag-engine.d.ts +15 -2
  22. package/dist/types/dev/dev-server.d.ts +136 -0
  23. package/dist/types/dev/hot-reload.d.ts +226 -0
  24. package/dist/types/ecosystem/plugin-analytics-dashboard.d.ts +141 -0
  25. package/dist/types/ecosystem/plugin-hub.d.ts +161 -0
  26. package/dist/types/ecosystem/plugin-installer.d.ts +40 -0
  27. package/dist/types/ecosystem/plugin-probe.d.ts +21 -0
  28. package/dist/types/ecosystem/plugin-scanner.d.ts +30 -0
  29. package/dist/types/ecosystem/tar-extract.d.ts +24 -0
  30. package/dist/types/enterprise/audit-logging.d.ts +217 -0
  31. package/dist/types/evaluate/compare.d.ts +140 -0
  32. package/dist/types/evaluate/dataset.d.ts +43 -0
  33. package/dist/types/evaluate/evaluator.d.ts +14 -0
  34. package/dist/types/evaluate/report.d.ts +56 -0
  35. package/dist/types/evaluate/synthetic.d.ts +64 -0
  36. package/dist/types/loader/csv-loader.d.ts +10 -0
  37. package/dist/types/loader/document-reader.d.ts +18 -0
  38. package/dist/types/loader/html-loader.d.ts +21 -0
  39. package/dist/types/loader/markdown-loader.d.ts +21 -0
  40. package/dist/types/retrieval/bm25-search.d.ts +4 -0
  41. package/dist/types/retrieval/file-vector-store.d.ts +4 -1
  42. package/dist/types/retrieval/hybrid-retriever.d.ts +4 -0
  43. package/dist/types/retrieval/pgvector-retriever.d.ts +123 -0
  44. package/dist/types/retrieval/qdrant-retriever.d.ts +106 -0
  45. package/dist/types/security/validator.d.ts +11 -1
  46. package/dist/types/testing.d.ts +2 -0
  47. package/dist/types/utils/batch-processor.d.ts +205 -0
  48. package/dist/types/utils/connection-pool.d.ts +158 -0
  49. package/dist/types/utils/error-formatter.d.ts +312 -0
  50. package/dist/types/utils/logger.d.ts +29 -4
  51. package/dist/types/utils/rate-limiter.d.ts +13 -8
  52. package/dist/types/utils/retry.d.ts +10 -0
  53. package/package.json +13 -3
  54. package/src/cache/memory-cache.js +4 -1
  55. package/src/cache/redis-cache.js +4 -1
  56. package/src/cli/enhanced-cli-commands.js +79 -0
  57. package/src/cli/handlers/ai-handler.js +2 -2
  58. package/src/cli/handlers/eval-handler.js +201 -0
  59. package/src/cli/handlers/generate-handler.js +103 -0
  60. package/src/cli/services/benchmark.js +2 -2
  61. package/src/cli/services/rag-service.js +59 -10
  62. package/src/cli/shared/cli-utils.js +40 -1
  63. package/src/config/component-factory.js +32 -0
  64. package/src/connectors/local-embedder.js +20 -13
  65. package/src/core/observability/event-logger.js +135 -1
  66. package/src/core/observability/metrics.js +223 -5
  67. package/src/core/performance/parallel-processor.js +2 -0
  68. package/src/core/plugin-registry.js +5 -1
  69. package/src/dag/core/execution-scheduler.js +2 -0
  70. package/src/dag/dag-engine.js +13 -0
  71. package/src/dev/dev-server.js +6 -0
  72. package/src/ecosystem/plugin-hub.js +4 -0
  73. package/src/enterprise/audit-logging.js +5 -0
  74. package/src/evaluate/compare.js +395 -0
  75. package/src/evaluate/dataset.js +207 -0
  76. package/src/evaluate/report.js +350 -0
  77. package/src/evaluate/synthetic.js +246 -0
  78. package/src/index.js +17 -0
  79. package/src/retrieval/bm25-search.js +4 -0
  80. package/src/retrieval/file-vector-store.js +4 -1
  81. package/src/retrieval/hybrid-retriever.js +4 -0
  82. package/src/retrieval/pgvector-retriever.js +420 -0
  83. package/src/retrieval/qdrant-retriever.js +361 -0
  84. package/src/security/validator.js +8 -0
  85. package/src/testing.js +2 -0
  86. package/src/utils/batch-processor.js +7 -3
  87. package/src/utils/error-formatter.js +48 -20
  88. package/src/utils/logger.js +31 -1
  89. package/src/utils/rate-limiter.js +9 -4
  90. package/src/utils/retry.js +10 -1
@@ -0,0 +1,648 @@
1
+ /**
2
+ * Validate .ragrc.json configuration (single source of truth)
3
+ * @param {object} config - Configuration to validate
4
+ * @returns {{ valid: boolean, errors?: any[], normalized?: object }}
5
+ */
6
+ export function validateRagrc(config: object): {
7
+ valid: boolean;
8
+ errors?: any[];
9
+ normalized?: object;
10
+ };
11
+ import { normalizeConfig } from "./normalize-config";
12
+ /**
13
+ * Build the canonical .ragrc.json schema
14
+ * @returns {object} JSON Schema object
15
+ */
16
+ export function buildRagrcJsonSchema(): object;
17
+ /**
18
+ * Legacy function for backward compatibility
19
+ * @deprecated Use validateRagrc instead
20
+ */
21
+ export function validateEnhancedRagrcSchema(config: any): {
22
+ valid: boolean;
23
+ errors: any[];
24
+ legacy: boolean;
25
+ };
26
+ /**
27
+ * Convert legacy _config to enhanced format
28
+ * @param {object} legacyConfig - Legacy configuration
29
+ * @returns {object} Enhanced configuration
30
+ */
31
+ export function convertLegacyConfig(legacyConfig: object): object;
32
+ /**
33
+ * Normalize plugin specification to object format
34
+ * @param {string|object} spec - Plugin specification
35
+ * @returns {object} Normalized specification
36
+ */
37
+ export function normalizePluginSpec(spec: string | object): object;
38
+ /**
39
+ * Extract plugin dependencies from configuration
40
+ * @param {object} _config - Enhanced configuration
41
+ * @returns {Array<{type: string, name: string, spec: object}>}
42
+ */
43
+ export function extractPluginDependencies(config: any): Array<{
44
+ type: string;
45
+ name: string;
46
+ spec: object;
47
+ }>;
48
+ /**
49
+ * Validate plugin configuration consistency
50
+ * @param {object} config - Configuration to validate
51
+ * @returns {{ valid: boolean, issues: Array<string> }}
52
+ */
53
+ export function validateConfigConsistency(config: object): {
54
+ valid: boolean;
55
+ issues: Array<string>;
56
+ };
57
+ export namespace enhancedRagrcSchema {
58
+ export let type: string;
59
+ export let required: string[];
60
+ export namespace properties {
61
+ export namespace plugins {
62
+ let type_1: string;
63
+ export { type_1 as type };
64
+ let required_1: string[];
65
+ export { required_1 as required };
66
+ export namespace properties_1 {
67
+ export { pluginGroupSchema as loader };
68
+ export { pluginGroupSchema as embedder };
69
+ export { pluginGroupSchema as retriever };
70
+ export { pluginGroupSchema as llm };
71
+ export { pluginGroupSchema as reranker };
72
+ }
73
+ export { properties_1 as properties };
74
+ export let additionalProperties: boolean;
75
+ }
76
+ export { registryConfigSchema as registry };
77
+ export namespace pipeline {
78
+ let type_2: string;
79
+ export { type_2 as type };
80
+ export namespace properties_2 {
81
+ namespace stages {
82
+ let type_3: string;
83
+ export { type_3 as type };
84
+ export namespace items {
85
+ let type_4: string;
86
+ export { type_4 as type };
87
+ let _enum: string[];
88
+ export { _enum as enum };
89
+ }
90
+ let _default: string[];
91
+ export { _default as default };
92
+ export let description: string;
93
+ }
94
+ namespace middleware {
95
+ let type_5: string;
96
+ export { type_5 as type };
97
+ export namespace items_1 {
98
+ let type_6: string;
99
+ export { type_6 as type };
100
+ let required_2: string[];
101
+ export { required_2 as required };
102
+ export namespace properties_3 {
103
+ namespace name {
104
+ let type_7: string;
105
+ export { type_7 as type };
106
+ }
107
+ namespace _config {
108
+ let type_8: string;
109
+ export { type_8 as type };
110
+ }
111
+ namespace enabled {
112
+ let type_9: string;
113
+ export { type_9 as type };
114
+ let _default_1: boolean;
115
+ export { _default_1 as default };
116
+ }
117
+ }
118
+ export { properties_3 as properties };
119
+ }
120
+ export { items_1 as items };
121
+ let description_1: string;
122
+ export { description_1 as description };
123
+ }
124
+ namespace retries {
125
+ let type_10: string;
126
+ export { type_10 as type };
127
+ export namespace properties_4 {
128
+ export namespace enabled_1 {
129
+ let type_11: string;
130
+ export { type_11 as type };
131
+ let _default_2: boolean;
132
+ export { _default_2 as default };
133
+ }
134
+ export { enabled_1 as enabled };
135
+ export namespace maxAttempts {
136
+ let type_12: string;
137
+ export { type_12 as type };
138
+ let _default_3: number;
139
+ export { _default_3 as default };
140
+ }
141
+ export namespace backoff {
142
+ let type_13: string;
143
+ export { type_13 as type };
144
+ let _enum_1: string[];
145
+ export { _enum_1 as enum };
146
+ let _default_4: string;
147
+ export { _default_4 as default };
148
+ }
149
+ }
150
+ export { properties_4 as properties };
151
+ }
152
+ namespace timeout {
153
+ let type_14: string;
154
+ export { type_14 as type };
155
+ let description_2: string;
156
+ export { description_2 as description };
157
+ }
158
+ }
159
+ export { properties_2 as properties };
160
+ let additionalProperties_1: boolean;
161
+ export { additionalProperties_1 as additionalProperties };
162
+ }
163
+ export namespace performance {
164
+ let type_15: string;
165
+ export { type_15 as type };
166
+ export namespace properties_5 {
167
+ namespace parallel {
168
+ let type_16: string;
169
+ export { type_16 as type };
170
+ export namespace properties_6 {
171
+ export namespace enabled_2 {
172
+ let type_17: string;
173
+ export { type_17 as type };
174
+ let _default_5: boolean;
175
+ export { _default_5 as default };
176
+ }
177
+ export { enabled_2 as enabled };
178
+ export namespace maxConcurrency {
179
+ let type_18: string;
180
+ export { type_18 as type };
181
+ let _default_6: number;
182
+ export { _default_6 as default };
183
+ }
184
+ export namespace batchSize {
185
+ let type_19: string;
186
+ export { type_19 as type };
187
+ let _default_7: number;
188
+ export { _default_7 as default };
189
+ }
190
+ }
191
+ export { properties_6 as properties };
192
+ }
193
+ namespace streaming {
194
+ let type_20: string;
195
+ export { type_20 as type };
196
+ export namespace properties_7 {
197
+ export namespace enabled_3 {
198
+ let type_21: string;
199
+ export { type_21 as type };
200
+ let _default_8: boolean;
201
+ export { _default_8 as default };
202
+ }
203
+ export { enabled_3 as enabled };
204
+ export namespace maxMemoryMB {
205
+ let type_22: string;
206
+ export { type_22 as type };
207
+ let _default_9: number;
208
+ export { _default_9 as default };
209
+ }
210
+ export namespace bufferSize {
211
+ let type_23: string;
212
+ export { type_23 as type };
213
+ let _default_10: number;
214
+ export { _default_10 as default };
215
+ }
216
+ }
217
+ export { properties_7 as properties };
218
+ }
219
+ namespace caching {
220
+ let type_24: string;
221
+ export { type_24 as type };
222
+ export namespace properties_8 {
223
+ export namespace enabled_4 {
224
+ let type_25: string;
225
+ export { type_25 as type };
226
+ let _default_11: boolean;
227
+ export { _default_11 as default };
228
+ }
229
+ export { enabled_4 as enabled };
230
+ export namespace ttl {
231
+ let type_26: string;
232
+ export { type_26 as type };
233
+ let _default_12: number;
234
+ export { _default_12 as default };
235
+ }
236
+ export namespace maxSize {
237
+ let type_27: string;
238
+ export { type_27 as type };
239
+ let _default_13: number;
240
+ export { _default_13 as default };
241
+ }
242
+ }
243
+ export { properties_8 as properties };
244
+ }
245
+ }
246
+ export { properties_5 as properties };
247
+ let additionalProperties_2: boolean;
248
+ export { additionalProperties_2 as additionalProperties };
249
+ }
250
+ export namespace observability {
251
+ let type_28: string;
252
+ export { type_28 as type };
253
+ export namespace properties_9 {
254
+ namespace logging {
255
+ let type_29: string;
256
+ export { type_29 as type };
257
+ export namespace properties_10 {
258
+ namespace level {
259
+ let type_30: string;
260
+ export { type_30 as type };
261
+ let _enum_2: string[];
262
+ export { _enum_2 as enum };
263
+ let _default_14: string;
264
+ export { _default_14 as default };
265
+ }
266
+ namespace structured {
267
+ let type_31: string;
268
+ export { type_31 as type };
269
+ let _default_15: boolean;
270
+ export { _default_15 as default };
271
+ }
272
+ namespace events {
273
+ let type_32: string;
274
+ export { type_32 as type };
275
+ let _default_16: boolean;
276
+ export { _default_16 as default };
277
+ }
278
+ }
279
+ export { properties_10 as properties };
280
+ }
281
+ namespace tracing {
282
+ let type_33: string;
283
+ export { type_33 as type };
284
+ export namespace properties_11 {
285
+ export namespace enabled_5 {
286
+ let type_34: string;
287
+ export { type_34 as type };
288
+ let _default_17: boolean;
289
+ export { _default_17 as default };
290
+ }
291
+ export { enabled_5 as enabled };
292
+ export namespace exportUrl {
293
+ let type_35: string;
294
+ export { type_35 as type };
295
+ export let format: string;
296
+ }
297
+ export namespace sampleRate {
298
+ let type_36: string;
299
+ export { type_36 as type };
300
+ export let minimum: number;
301
+ export let maximum: number;
302
+ let _default_18: number;
303
+ export { _default_18 as default };
304
+ }
305
+ }
306
+ export { properties_11 as properties };
307
+ }
308
+ namespace metrics {
309
+ let type_37: string;
310
+ export { type_37 as type };
311
+ export namespace properties_12 {
312
+ export namespace enabled_6 {
313
+ let type_38: string;
314
+ export { type_38 as type };
315
+ let _default_19: boolean;
316
+ export { _default_19 as default };
317
+ }
318
+ export { enabled_6 as enabled };
319
+ export namespace exportUrl_1 {
320
+ let type_39: string;
321
+ export { type_39 as type };
322
+ let format_1: string;
323
+ export { format_1 as format };
324
+ }
325
+ export { exportUrl_1 as exportUrl };
326
+ export namespace interval {
327
+ let type_40: string;
328
+ export { type_40 as type };
329
+ let _default_20: number;
330
+ export { _default_20 as default };
331
+ }
332
+ }
333
+ export { properties_12 as properties };
334
+ }
335
+ }
336
+ export { properties_9 as properties };
337
+ let additionalProperties_3: boolean;
338
+ export { additionalProperties_3 as additionalProperties };
339
+ }
340
+ export namespace environments {
341
+ let type_41: string;
342
+ export { type_41 as type };
343
+ export namespace additionalProperties_4 {
344
+ let type_42: string;
345
+ export { type_42 as type };
346
+ let description_3: string;
347
+ export { description_3 as description };
348
+ }
349
+ export { additionalProperties_4 as additionalProperties };
350
+ }
351
+ export namespace metadata {
352
+ let type_43: string;
353
+ export { type_43 as type };
354
+ export namespace properties_13 {
355
+ export namespace name_1 {
356
+ let type_44: string;
357
+ export { type_44 as type };
358
+ let description_4: string;
359
+ export { description_4 as description };
360
+ }
361
+ export { name_1 as name };
362
+ export namespace version {
363
+ let type_45: string;
364
+ export { type_45 as type };
365
+ let description_5: string;
366
+ export { description_5 as description };
367
+ }
368
+ export namespace description_6 {
369
+ let type_46: string;
370
+ export { type_46 as type };
371
+ let description_7: string;
372
+ export { description_7 as description };
373
+ }
374
+ export { description_6 as description };
375
+ export namespace author {
376
+ let type_47: string;
377
+ export { type_47 as type };
378
+ let description_8: string;
379
+ export { description_8 as description };
380
+ }
381
+ export namespace tags {
382
+ let type_48: string;
383
+ export { type_48 as type };
384
+ export namespace items_2 {
385
+ let type_49: string;
386
+ export { type_49 as type };
387
+ }
388
+ export { items_2 as items };
389
+ let description_9: string;
390
+ export { description_9 as description };
391
+ }
392
+ }
393
+ export { properties_13 as properties };
394
+ let additionalProperties_5: boolean;
395
+ export { additionalProperties_5 as additionalProperties };
396
+ }
397
+ export namespace namespace {
398
+ let type_50: string;
399
+ export { type_50 as type };
400
+ let description_10: string;
401
+ export { description_10 as description };
402
+ }
403
+ }
404
+ let additionalProperties_6: boolean;
405
+ export { additionalProperties_6 as additionalProperties };
406
+ }
407
+ export namespace legacyRagrcSchema {
408
+ let type_51: string;
409
+ export { type_51 as type };
410
+ let required_3: string[];
411
+ export { required_3 as required };
412
+ export namespace properties_14 {
413
+ export namespace loader {
414
+ let type_52: string;
415
+ export { type_52 as type };
416
+ export let minProperties: number;
417
+ export namespace additionalProperties_7 {
418
+ let type_53: string;
419
+ export { type_53 as type };
420
+ }
421
+ export { additionalProperties_7 as additionalProperties };
422
+ }
423
+ export namespace embedder {
424
+ let type_54: string;
425
+ export { type_54 as type };
426
+ let minProperties_1: number;
427
+ export { minProperties_1 as minProperties };
428
+ export namespace additionalProperties_8 {
429
+ let type_55: string;
430
+ export { type_55 as type };
431
+ }
432
+ export { additionalProperties_8 as additionalProperties };
433
+ }
434
+ export namespace retriever {
435
+ let type_56: string;
436
+ export { type_56 as type };
437
+ let minProperties_2: number;
438
+ export { minProperties_2 as minProperties };
439
+ export namespace additionalProperties_9 {
440
+ let type_57: string;
441
+ export { type_57 as type };
442
+ }
443
+ export { additionalProperties_9 as additionalProperties };
444
+ }
445
+ export namespace llm {
446
+ let type_58: string;
447
+ export { type_58 as type };
448
+ let minProperties_3: number;
449
+ export { minProperties_3 as minProperties };
450
+ export namespace additionalProperties_10 {
451
+ let type_59: string;
452
+ export { type_59 as type };
453
+ }
454
+ export { additionalProperties_10 as additionalProperties };
455
+ }
456
+ export namespace reranker {
457
+ let type_60: string;
458
+ export { type_60 as type };
459
+ export namespace additionalProperties_11 {
460
+ let type_61: string;
461
+ export { type_61 as type };
462
+ }
463
+ export { additionalProperties_11 as additionalProperties };
464
+ }
465
+ export namespace namespace_1 {
466
+ let type_62: string;
467
+ export { type_62 as type };
468
+ export let minLength: number;
469
+ }
470
+ export { namespace_1 as namespace };
471
+ export namespace pipeline_1 {
472
+ let type_63: string;
473
+ export { type_63 as type };
474
+ export namespace items_3 {
475
+ let type_64: string;
476
+ export { type_64 as type };
477
+ let _enum_3: string[];
478
+ export { _enum_3 as enum };
479
+ }
480
+ export { items_3 as items };
481
+ export let minItems: number;
482
+ export let uniqueItems: boolean;
483
+ }
484
+ export { pipeline_1 as pipeline };
485
+ }
486
+ export { properties_14 as properties };
487
+ let additionalProperties_12: boolean;
488
+ export { additionalProperties_12 as additionalProperties };
489
+ }
490
+ declare namespace pluginGroupSchema {
491
+ let type_65: string;
492
+ export { type_65 as type };
493
+ let minProperties_4: number;
494
+ export { minProperties_4 as minProperties };
495
+ export { pluginSpecSchema as additionalProperties };
496
+ let description_11: string;
497
+ export { description_11 as description };
498
+ }
499
+ declare namespace registryConfigSchema {
500
+ let type_66: string;
501
+ export { type_66 as type };
502
+ export namespace properties_15 {
503
+ export namespace urls {
504
+ let type_67: string;
505
+ export { type_67 as type };
506
+ export namespace items_4 {
507
+ let type_68: string;
508
+ export { type_68 as type };
509
+ let format_2: string;
510
+ export { format_2 as format };
511
+ }
512
+ export { items_4 as items };
513
+ let description_12: string;
514
+ export { description_12 as description };
515
+ }
516
+ export namespace cache {
517
+ let type_69: string;
518
+ export { type_69 as type };
519
+ export namespace properties_16 {
520
+ export namespace enabled_7 {
521
+ let type_70: string;
522
+ export { type_70 as type };
523
+ let _default_21: boolean;
524
+ export { _default_21 as default };
525
+ }
526
+ export { enabled_7 as enabled };
527
+ export namespace ttl_1 {
528
+ let type_71: string;
529
+ export { type_71 as type };
530
+ let _default_22: number;
531
+ export { _default_22 as default };
532
+ let description_13: string;
533
+ export { description_13 as description };
534
+ }
535
+ export { ttl_1 as ttl };
536
+ export namespace directory {
537
+ let type_72: string;
538
+ export { type_72 as type };
539
+ let description_14: string;
540
+ export { description_14 as description };
541
+ }
542
+ }
543
+ export { properties_16 as properties };
544
+ let additionalProperties_13: boolean;
545
+ export { additionalProperties_13 as additionalProperties };
546
+ }
547
+ export namespace auth {
548
+ let type_73: string;
549
+ export { type_73 as type };
550
+ export namespace properties_17 {
551
+ namespace token {
552
+ let type_74: string;
553
+ export { type_74 as type };
554
+ let description_15: string;
555
+ export { description_15 as description };
556
+ }
557
+ namespace username {
558
+ let type_75: string;
559
+ export { type_75 as type };
560
+ let description_16: string;
561
+ export { description_16 as description };
562
+ }
563
+ namespace password {
564
+ let type_76: string;
565
+ export { type_76 as type };
566
+ let description_17: string;
567
+ export { description_17 as description };
568
+ }
569
+ }
570
+ export { properties_17 as properties };
571
+ let additionalProperties_14: boolean;
572
+ export { additionalProperties_14 as additionalProperties };
573
+ }
574
+ export namespace timeout_1 {
575
+ let type_77: string;
576
+ export { type_77 as type };
577
+ let _default_23: number;
578
+ export { _default_23 as default };
579
+ let description_18: string;
580
+ export { description_18 as description };
581
+ }
582
+ export { timeout_1 as timeout };
583
+ export namespace retries_1 {
584
+ let type_78: string;
585
+ export { type_78 as type };
586
+ let _default_24: number;
587
+ export { _default_24 as default };
588
+ let description_19: string;
589
+ export { description_19 as description };
590
+ }
591
+ export { retries_1 as retries };
592
+ }
593
+ export { properties_15 as properties };
594
+ let additionalProperties_15: boolean;
595
+ export { additionalProperties_15 as additionalProperties };
596
+ }
597
+ declare namespace pluginSpecSchema {
598
+ let oneOf: ({
599
+ type: string;
600
+ required?: undefined;
601
+ properties?: undefined;
602
+ additionalProperties?: undefined;
603
+ } | {
604
+ type: string;
605
+ required: string[];
606
+ properties: {
607
+ name: {
608
+ type: string;
609
+ pattern: string;
610
+ description: string;
611
+ };
612
+ version: {
613
+ type: string;
614
+ description: string;
615
+ };
616
+ source: {
617
+ type: string;
618
+ enum: string[];
619
+ default: string;
620
+ description: string;
621
+ };
622
+ url: {
623
+ type: string;
624
+ format: string;
625
+ description: string;
626
+ };
627
+ path: {
628
+ type: string;
629
+ description: string;
630
+ };
631
+ config: {
632
+ type: string;
633
+ description: string;
634
+ };
635
+ enabled: {
636
+ type: string;
637
+ default: boolean;
638
+ description: string;
639
+ };
640
+ fallback: {
641
+ type: string;
642
+ description: string;
643
+ };
644
+ };
645
+ additionalProperties: boolean;
646
+ })[];
647
+ }
648
+ export { normalizeConfig };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Load and validate a RAG configuration file.
3
+ * @param {string} [cwd=process.cwd()] - Directory to resolve the config from
4
+ * @returns {object} Validated configuration object
5
+ */
6
+ /**
7
+ * Load and validate .ragrc.json.
8
+ *
9
+ * @param {string} [location=process.cwd()] - A directory containing
10
+ * .ragrc.json, or the path of a config file (any name ending in .json)
11
+ * @returns {object} Normalized configuration
12
+ */
13
+ export function loadRagConfig(location?: string): object;
14
+ /**
15
+ * @param {string} [location=process.cwd()] - Directory or config file path
16
+ * @returns {string} Absolute path of the config file
17
+ */
18
+ export function resolveConfigPath(location?: string): string;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Configuration Normalization - Unifies config shape and validation
3
+ * Handles pipeline object/array conversion and default namespace assignment
4
+ */
5
+ export function normalizeConfig(cfg: any): {
6
+ namespace: any;
7
+ metadata: any;
8
+ pipeline: any;
9
+ };