@devilsdev/rag-pipeline-utils 2.2.1 → 2.3.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 (40) hide show
  1. package/README.md +244 -11
  2. package/contracts/contract-schema.json +189 -0
  3. package/dist/index.cjs +19 -0
  4. package/dist/index.mjs +15 -1
  5. package/package.json +3 -2
  6. package/src/cli/commands/wizard.js +627 -0
  7. package/src/cli/input-sanitization-middleware.js +356 -0
  8. package/src/cli/templates/development.template.json +64 -0
  9. package/src/cli/templates/minimal.template.json +33 -0
  10. package/src/cli/templates/production.template.json +104 -0
  11. package/src/cli/templates/testing.template.json +45 -0
  12. package/src/config/connection-pool-config.json +259 -0
  13. package/src/config/memory-optimization.js +414 -0
  14. package/src/config/redaction-patterns.json +150 -0
  15. package/src/config/sanitization-rules.json +323 -0
  16. package/src/core/plugin-registry.js +266 -20
  17. package/src/dag/core/error-context.js +391 -0
  18. package/src/dag/core/execution-scheduler.js +350 -0
  19. package/src/dag/core/topology-validation.js +415 -0
  20. package/src/dag/dag-engine.js +26 -424
  21. package/src/dev/README.md +126 -0
  22. package/src/dev/dev-server.js +356 -0
  23. package/src/dev/examples/hot-reload-usage.js +355 -0
  24. package/src/dev/hot-reload.js +807 -0
  25. package/src/enterprise/sso-integration.js +67 -25
  26. package/src/index.js +19 -0
  27. package/src/observability/event-logger.js +62 -2
  28. package/src/plugins/optimized-openai-embedder.js +169 -0
  29. package/src/security/jwt-config.js +431 -0
  30. package/src/security/jwt-validator.js +701 -0
  31. package/src/utils/api-client-pool-integration.js +436 -0
  32. package/src/utils/batch-processor.js +710 -0
  33. package/src/utils/connection-pool.js +605 -0
  34. package/src/utils/contract-validator.js +460 -0
  35. package/src/utils/error-formatter.js +603 -0
  36. package/src/utils/examples/error-formatter-usage.js +351 -0
  37. package/src/utils/input-sanitizer.js +967 -0
  38. package/src/utils/memory-monitor.js +800 -0
  39. package/src/utils/secure-logger-config.js +352 -0
  40. package/src/utils/secure-logger.js +576 -0
package/README.md CHANGED
@@ -22,7 +22,7 @@ We built this toolkit because we believe infrastructure should be:
22
22
 
23
23
  - **Modular** – swap any component without rewriting your pipeline
24
24
  - **Observable** – metrics, tracing, and audit logs built in from day one
25
- - **Secure** – enterprise-grade defaults, validated inputs, safe JWT handling
25
+ - **Secure** – hardened JWT validation with replay protection, multi-layer path traversal defense, and enterprise-grade defaults
26
26
  - **Open** – no vendor lock-in, no proprietary APIs, just JavaScript
27
27
 
28
28
  Whether you're prototyping a document Q&A system or scaling a production knowledge base, this toolkit grows with you.
@@ -61,6 +61,19 @@ Install with:
61
61
  npm install @devilsdev/rag-pipeline-utils
62
62
  ```
63
63
 
64
+ ### What's New in v2.3.0 (Released November 7, 2025)
65
+
66
+ **Major Security Enhancements:**
67
+
68
+ - **Advanced JWT replay protection** with self-signed token reusability
69
+ - **Hardened path traversal defense** with iterative URL decoding
70
+ - **Consistent validation behavior** eliminating duplicate checks
71
+ - **Race condition mitigation** in concurrent token verification
72
+
73
+ **All security tests passing:** 113 security-focused tests with 100% coverage on critical paths.
74
+
75
+ [See full security details below](#security-and-quality) | [Migration guide](#upgrading-from-v22x)
76
+
64
77
  ---
65
78
 
66
79
  ## How It Works
@@ -118,7 +131,7 @@ Complete TypeScript interfaces for all plugin types. Full IDE autocomplete and c
118
131
 
119
132
  ### Production-Ready Security
120
133
 
121
- Secure defaults everywhere: validated JSON parsing, JWT algorithm whitelisting, automatic secret redaction in logs, and dependency scanning.
134
+ Hardened security with defense-in-depth: JWT replay protection with race condition mitigation, multi-layer path traversal defense with iterative URL decoding, validated JSON parsing, algorithm whitelisting, automatic secret redaction, and comprehensive audit logging.
122
135
 
123
136
  ### Streaming & Batching
124
137
 
@@ -138,10 +151,10 @@ Whether you're implementing a new retriever, writing documentation, reporting bu
138
151
 
139
152
  **Getting Started:**
140
153
 
141
- - 💬 [GitHub Discussions](https://github.com/DevilsDev/rag-pipeline-utils/discussions) – Ask questions, share use cases, propose features
142
- - 🐛 [Issue Tracker](https://github.com/DevilsDev/rag-pipeline-utils/issues) – Report bugs or request features
143
- - 🤝 [Contributing Guide](https://github.com/DevilsDev/rag-pipeline-utils/blob/main/docs/CONTRIBUTING.md) – Learn how to submit pull requests
144
- - 📖 [Code of Conduct](https://github.com/DevilsDev/rag-pipeline-utils/blob/main/CODE_OF_CONDUCT.md) – Our community standards
154
+ - [GitHub Discussions](https://github.com/DevilsDev/rag-pipeline-utils/discussions) – Ask questions, share use cases, propose features
155
+ - [Issue Tracker](https://github.com/DevilsDev/rag-pipeline-utils/issues) – Report bugs or request features
156
+ - [Contributing Guide](https://github.com/DevilsDev/rag-pipeline-utils/blob/main/docs/CONTRIBUTING.md) – Learn how to submit pull requests
157
+ - [Code of Conduct](https://github.com/DevilsDev/rag-pipeline-utils/blob/main/CODE_OF_CONDUCT.md) – Our community standards
145
158
 
146
159
  **Good First Issues:** Look for issues tagged `good first issue` to find beginner-friendly contributions.
147
160
 
@@ -153,6 +166,8 @@ Whether you're implementing a new retriever, writing documentation, reporting bu
153
166
 
154
167
  Security isn't optional. This toolkit is built with defense in depth:
155
168
 
169
+ ### Core Security Features
170
+
156
171
  - **Validated Inputs** – All JSON parsed through schema validation (AJV)
157
172
  - **Secure Logging** – Automatic redaction of 36 sensitive field patterns (API keys, JWTs, tokens)
158
173
  - **JWT Best Practices** – Algorithm whitelisting, issuer/audience validation, expiration enforcement
@@ -161,9 +176,101 @@ Security isn't optional. This toolkit is built with defense in depth:
161
176
  - **Plugin Sandboxing** – Third-party plugins run with declared permissions and resource limits
162
177
  - **Supply Chain Security** – All GitHub Actions pinned to commit SHAs, SBOM generation available
163
178
 
179
+ ### Recent Security Enhancements (v2.3.0)
180
+
181
+ #### Hardened JWT Validation
182
+
183
+ **Advanced Replay Protection:**
184
+
185
+ - Self-signed tokens can be verified multiple times (essential for refresh flows and load balancer retries)
186
+ - External tokens are tracked and blocked on replay attempts
187
+ - Race condition mitigation with optimized check-then-set pattern
188
+ - Separate tracking for reusable vs. single-use tokens
189
+
190
+ **Consistent Validation Behavior:**
191
+
192
+ - `strictValidation` flag now consistently controls issuer/audience validation
193
+ - Eliminated duplicate validation logic to prevent configuration confusion
194
+ - Clear separation of concerns: jsonwebtoken handles cryptographic validation, custom logic handles business rules
195
+
196
+ **Example:**
197
+
198
+ ```javascript
199
+ const { JWTValidator } = require("@devilsdev/rag-pipeline-utils");
200
+
201
+ const validator = new JWTValidator({
202
+ secret: process.env.JWT_SECRET,
203
+ algorithm: "HS256",
204
+ issuer: "my-app",
205
+ audience: "api-users",
206
+ strictValidation: true, // Enforces iss/aud validation
207
+ enableJtiTracking: true, // Prevents replay attacks
208
+ });
209
+
210
+ // Self-signed tokens can be verified multiple times
211
+ const token = validator.sign({ sub: "user-123" });
212
+ validator.verify(token); // First verification
213
+ validator.verify(token); // Still works (refresh flow)
214
+
215
+ // External tokens are blocked on replay
216
+ const externalToken = getTokenFromThirdParty();
217
+ validator.verify(externalToken); // First use
218
+ validator.verify(externalToken); // Throws "Token replay detected"
219
+ ```
220
+
221
+ #### Path Traversal Defense
222
+
223
+ **Multi-Layer Protection:**
224
+
225
+ - Iterative URL decoding (up to 5 passes) to catch sophisticated encoding attacks
226
+ - Detects double-encoded paths: `%252e%252e%252f` → `%2e%2e%2f` → `../`
227
+ - Malformed encoding treated as attack indicator (throws error)
228
+ - Critical security violations always throw, regardless of configuration
229
+
230
+ **Attack Vectors Blocked:**
231
+
232
+ - Standard traversal: `../../../etc/passwd`
233
+ - Windows paths: `..\..\windows\system32`
234
+ - URL encoded: `%2e%2e%2f`, `%2e%2e%5c`
235
+ - Double encoded: `%252e%252e%252f`
236
+ - Mixed encoding: combinations of above
237
+
238
+ **Example:**
239
+
240
+ ```javascript
241
+ const { sanitizePath } = require("@devilsdev/rag-pipeline-utils");
242
+
243
+ // Safe paths are normalized
244
+ sanitizePath("docs/README.md"); // Returns: "docs/README.md"
245
+
246
+ // Dangerous paths throw errors
247
+ sanitizePath("../../../etc/passwd"); // Throws
248
+ sanitizePath("%2e%2e%2f%2e%2e%2fpasswd"); // Throws
249
+ sanitizePath("%252e%252e%252fconfig"); // Throws (double-encoded)
250
+ ```
251
+
252
+ #### Defense-in-Depth Architecture
253
+
254
+ **Critical Security Errors:**
255
+
256
+ - Path traversal violations **always throw**, even if `throwOnInvalid=false`
257
+ - Object depth limit violations **always throw** to prevent DoS
258
+ - Security-critical operations are prioritized over configuration flexibility
259
+
260
+ **Security Monitoring:**
261
+
262
+ - All blocked attempts tracked in `stats.blocked` counter
263
+ - Audit events emitted for replay detection, algorithm mismatches, and validation failures
264
+ - Structured logging with security event correlation
265
+
266
+ ### Quality Metrics
267
+
164
268
  **Zero Production Vulnerabilities:** `npm audit --production` returns clean on every release.
165
269
 
166
- **Test Coverage:** 845+ tests across 61 suites, with 100% coverage on critical paths.
270
+ **Test Coverage:** 113 security-focused tests across 2 dedicated security suites:
271
+
272
+ - JWT Validator: 44 tests covering algorithm confusion, replay attacks, and validation edge cases
273
+ - Input Sanitizer: 69 tests covering XSS, SQL injection, command injection, and path traversal
167
274
 
168
275
  **Supported Node Versions:** 18.x, 20.x, 22.x (tested in CI)
169
276
 
@@ -240,6 +347,132 @@ npm run benchmark # Performance benchmarks
240
347
 
241
348
  ---
242
349
 
350
+ ## Upgrading from v2.2.x
351
+
352
+ The v2.3.0 release includes important security enhancements that are **100% backward compatible** for most use cases. However, there are a few behavioral changes to be aware of:
353
+
354
+ ### JWT Validator Changes
355
+
356
+ #### No Action Required (Recommended Use Case)
357
+
358
+ If you're using the default configuration with `strictValidation: true` (the default), everything works the same:
359
+
360
+ ```javascript
361
+ const validator = new JWTValidator({
362
+ secret: process.env.JWT_SECRET,
363
+ algorithm: "HS256",
364
+ issuer: "my-app",
365
+ audience: "api-users",
366
+ // strictValidation defaults to true
367
+ });
368
+
369
+ // Behavior unchanged - tokens validated correctly
370
+ ```
371
+
372
+ #### Behavior Change (Advanced Use Case)
373
+
374
+ If you explicitly set `strictValidation: false`, the behavior has changed for consistency:
375
+
376
+ **Before v2.3.0:**
377
+
378
+ ```javascript
379
+ const validator = new JWTValidator({
380
+ secret: process.env.JWT_SECRET,
381
+ strictValidation: false,
382
+ issuer: "my-app", // These were still validated
383
+ audience: "api-users", // even with strictValidation=false
384
+ });
385
+ ```
386
+
387
+ **After v2.3.0:**
388
+
389
+ ```javascript
390
+ const validator = new JWTValidator({
391
+ secret: process.env.JWT_SECRET,
392
+ strictValidation: false,
393
+ issuer: "my-app", // Now properly ignored
394
+ audience: "api-users", // when strictValidation=false
395
+ });
396
+ // issuer/audience validation is now truly disabled
397
+ ```
398
+
399
+ **Migration:** If you were relying on the old inconsistent behavior, set `strictValidation: true` explicitly.
400
+
401
+ #### Enhanced Behavior (Self-Signed Tokens)
402
+
403
+ Self-signed tokens can now be verified multiple times, which is essential for:
404
+
405
+ - Refresh token flows
406
+ - Load balancer retries
407
+ - Distributed systems with eventual consistency
408
+
409
+ ```javascript
410
+ const token = validator.sign({ sub: "user-123" });
411
+
412
+ // Before v2.3.0: Second verification would throw "replay detected"
413
+ // After v2.3.0: Works correctly for self-signed tokens
414
+ validator.verify(token); // Works
415
+ validator.verify(token); // Now works!
416
+ ```
417
+
418
+ External tokens (not signed by your validator) are still correctly blocked on replay.
419
+
420
+ ### Input Sanitizer Changes
421
+
422
+ #### Path Traversal Now Always Throws
423
+
424
+ Path traversal attempts now **always throw errors**, even with `throwOnInvalid: false`:
425
+
426
+ **Before v2.3.0:**
427
+
428
+ ```javascript
429
+ const sanitizer = new InputSanitizer({ throwOnInvalid: false });
430
+ const result = sanitizePath("../../../etc/passwd");
431
+ // Returned: null (silent failure)
432
+ ```
433
+
434
+ **After v2.3.0:**
435
+
436
+ ```javascript
437
+ const sanitizer = new InputSanitizer({ throwOnInvalid: false });
438
+ const result = sanitizePath("../../../etc/passwd");
439
+ // Throws: "Potential path traversal detected"
440
+ ```
441
+
442
+ **Rationale:** Path traversal is a critical security violation that should never be silently ignored.
443
+
444
+ **Migration:** Wrap path sanitization in try-catch if you need to handle errors gracefully:
445
+
446
+ ```javascript
447
+ try {
448
+ const safePath = sanitizePath(userInput);
449
+ // Use safePath
450
+ } catch (error) {
451
+ if (error.message.includes("path traversal")) {
452
+ // Handle attack attempt
453
+ logger.warn("Path traversal blocked", { input: userInput });
454
+ return res.status(400).json({ error: "Invalid path" });
455
+ }
456
+ throw error;
457
+ }
458
+ ```
459
+
460
+ ### Breaking Changes
461
+
462
+ **None.** All changes are security enhancements that improve correctness without breaking existing valid use cases.
463
+
464
+ ### Testing Your Upgrade
465
+
466
+ Run your test suite after upgrading:
467
+
468
+ ```bash
469
+ npm test
470
+ ```
471
+
472
+ If you encounter issues, please [open an issue](https://github.com/DevilsDev/rag-pipeline-utils/issues) with details about your configuration.
473
+
474
+ ---
475
+
243
476
  ## Contributing
244
477
 
245
478
  We welcome contributions of all kinds:
@@ -277,10 +510,10 @@ This is free software: you are free to change and redistribute it under the term
277
510
 
278
511
  ## What's Next?
279
512
 
280
- ⭐ **Star this repository** if you find it useful—it helps others discover the project.
513
+ **Star this repository** if you find it useful—it helps others discover the project.
281
514
 
282
- 📢 **Share your use case** in [Discussions](https://github.com/DevilsDev/rag-pipeline-utils/discussions/categories/show-and-tell) to inspire the community.
515
+ **Share your use case** in [Discussions](https://github.com/DevilsDev/rag-pipeline-utils/discussions/categories/show-and-tell) to inspire the community.
283
516
 
284
- 🤝 **Contribute** your first pull request—check out issues tagged [good first issue](https://github.com/DevilsDev/rag-pipeline-utils/labels/good%20first%20issue).
517
+ **Contribute** your first pull request—check out issues tagged [good first issue](https://github.com/DevilsDev/rag-pipeline-utils/labels/good%20first%20issue).
285
518
 
286
- Happy building. 🚀
519
+ Happy building.
@@ -0,0 +1,189 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://github.com/devilsdev/rag-pipeline-utils/schemas/contract.json",
4
+ "title": "Plugin Contract Schema",
5
+ "description": "Schema for validating plugin contract specifications in the RAG pipeline utilities",
6
+ "type": "object",
7
+ "required": [
8
+ "type",
9
+ "version",
10
+ "title",
11
+ "description",
12
+ "methods",
13
+ "properties",
14
+ "required"
15
+ ],
16
+ "properties": {
17
+ "$schema": {
18
+ "type": "string",
19
+ "description": "JSON Schema specification URI"
20
+ },
21
+ "type": {
22
+ "type": "string",
23
+ "description": "Plugin type identifier",
24
+ "enum": [
25
+ "loader",
26
+ "embedder",
27
+ "retriever",
28
+ "llm",
29
+ "reranker",
30
+ "evaluator"
31
+ ]
32
+ },
33
+ "version": {
34
+ "type": "string",
35
+ "description": "Contract version (semantic versioning)",
36
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
37
+ },
38
+ "title": {
39
+ "type": "string",
40
+ "description": "Human-readable contract title",
41
+ "minLength": 1
42
+ },
43
+ "description": {
44
+ "type": "string",
45
+ "description": "Contract description",
46
+ "minLength": 1
47
+ },
48
+ "methods": {
49
+ "type": "array",
50
+ "description": "Array of method specifications",
51
+ "minItems": 1,
52
+ "items": {
53
+ "type": "object",
54
+ "required": ["name", "parameters", "returns"],
55
+ "properties": {
56
+ "name": {
57
+ "type": "string",
58
+ "description": "Method name",
59
+ "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
60
+ },
61
+ "parameters": {
62
+ "type": "array",
63
+ "description": "Method parameter names",
64
+ "items": {
65
+ "type": "string",
66
+ "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
67
+ }
68
+ },
69
+ "returns": {
70
+ "type": "string",
71
+ "description": "Return type description",
72
+ "minLength": 1
73
+ }
74
+ },
75
+ "additionalProperties": false
76
+ }
77
+ },
78
+ "properties": {
79
+ "type": "object",
80
+ "description": "Detailed method property specifications",
81
+ "minProperties": 1,
82
+ "patternProperties": {
83
+ "^[a-zA-Z_][a-zA-Z0-9_]*$": {
84
+ "type": "object",
85
+ "required": ["type", "description"],
86
+ "properties": {
87
+ "type": {
88
+ "type": "string",
89
+ "description": "Property type",
90
+ "enum": [
91
+ "function",
92
+ "string",
93
+ "number",
94
+ "boolean",
95
+ "object",
96
+ "array"
97
+ ]
98
+ },
99
+ "description": {
100
+ "type": "string",
101
+ "description": "Property description",
102
+ "minLength": 1
103
+ },
104
+ "parameters": {
105
+ "type": "object",
106
+ "description": "Parameter schema (for function properties)",
107
+ "properties": {
108
+ "type": {
109
+ "const": "object"
110
+ },
111
+ "properties": {
112
+ "type": "object"
113
+ },
114
+ "required": {
115
+ "type": "array",
116
+ "items": {
117
+ "type": "string"
118
+ }
119
+ }
120
+ }
121
+ },
122
+ "returns": {
123
+ "type": "object",
124
+ "description": "Return value schema (for function properties)"
125
+ }
126
+ },
127
+ "additionalProperties": true
128
+ }
129
+ },
130
+ "additionalProperties": false
131
+ },
132
+ "required": {
133
+ "type": "array",
134
+ "description": "List of required methods",
135
+ "minItems": 1,
136
+ "items": {
137
+ "type": "string",
138
+ "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
139
+ },
140
+ "uniqueItems": true
141
+ }
142
+ },
143
+ "additionalProperties": false,
144
+ "examples": [
145
+ {
146
+ "$schema": "http://json-schema.org/draft-07/schema#",
147
+ "type": "loader",
148
+ "version": "1.0.0",
149
+ "title": "Loader Contract",
150
+ "description": "Contract for loader plugins",
151
+ "methods": [
152
+ {
153
+ "name": "load",
154
+ "parameters": ["source"],
155
+ "returns": "documents"
156
+ }
157
+ ],
158
+ "properties": {
159
+ "load": {
160
+ "type": "function",
161
+ "description": "Load documents from source",
162
+ "parameters": {
163
+ "type": "object",
164
+ "properties": {
165
+ "source": {
166
+ "type": "string",
167
+ "description": "Source path or identifier"
168
+ }
169
+ },
170
+ "required": ["source"]
171
+ },
172
+ "returns": {
173
+ "type": "array",
174
+ "items": {
175
+ "type": "object",
176
+ "properties": {
177
+ "id": { "type": "string" },
178
+ "content": { "type": "string" },
179
+ "metadata": { "type": "object" }
180
+ },
181
+ "required": ["id", "content"]
182
+ }
183
+ }
184
+ }
185
+ },
186
+ "required": ["load"]
187
+ }
188
+ ]
189
+ }
package/dist/index.cjs CHANGED
@@ -16,6 +16,7 @@ const pluginRegistry = require('../src/core/plugin-registry');
16
16
 
17
17
  // Utilities
18
18
  const logger = require('../src/utils/logger');
19
+ const errorFormatter = require('../src/utils/error-formatter');
19
20
 
20
21
  // AI/ML capabilities
21
22
  const MultiModalProcessor = require('../src/ai/multimodal');
@@ -33,6 +34,13 @@ const metrics = require('../src/core/observability/metrics');
33
34
  const { AuditLogger } = require('../src/enterprise/audit-logging');
34
35
  const { DataGovernance } = require('../src/enterprise/data-governance');
35
36
 
37
+ // Development tools
38
+ const {
39
+ HotReloadManager,
40
+ createHotReloadManager,
41
+ } = require('../src/dev/hot-reload');
42
+ const { DevServer, createDevServer } = require('../src/dev/dev-server');
43
+
36
44
  module.exports = {
37
45
  // Core API
38
46
  createRagPipeline,
@@ -48,6 +56,11 @@ module.exports = {
48
56
 
49
57
  // Utilities
50
58
  logger,
59
+ errorFormatter,
60
+ // Error handling utilities
61
+ createError: errorFormatter.createError,
62
+ wrapError: errorFormatter.wrapError,
63
+ ERROR_CODES: errorFormatter.ERROR_CODES,
51
64
 
52
65
  // AI/ML
53
66
  MultiModalProcessor,
@@ -64,4 +77,10 @@ module.exports = {
64
77
  // Enterprise
65
78
  AuditLogger,
66
79
  DataGovernance,
80
+
81
+ // Development tools
82
+ HotReloadManager,
83
+ createHotReloadManager,
84
+ DevServer,
85
+ createDevServer,
67
86
  };
package/dist/index.mjs CHANGED
@@ -25,6 +25,7 @@ import pluginRegistry from '../src/core/plugin-registry.js';
25
25
 
26
26
  // Utilities
27
27
  import logger from '../src/utils/logger.js';
28
+ import errorFormatter from '../src/utils/error-formatter.js';
28
29
 
29
30
  // AI/ML capabilities
30
31
  import MultiModalProcessor from '../src/ai/multimodal.js';
@@ -45,6 +46,14 @@ const { AuditLogger } = auditloggingModule;
45
46
  import datagovernanceModule from '../src/enterprise/data-governance.js';
46
47
  const { DataGovernance } = datagovernanceModule;
47
48
 
49
+ // Development tools
50
+ import hotreloadModule from '../src/dev/hot-reload.js';
51
+ const { HotReloadManager,
52
+ createHotReloadManager,
53
+ } = hotreloadModule;
54
+ import devserverModule from '../src/dev/dev-server.js';
55
+ const { DevServer, createDevServer } = devserverModule;
56
+
48
57
  export {
49
58
  createRagPipeline,
50
59
  loadConfig,
@@ -52,6 +61,7 @@ export {
52
61
  normalizeConfig,
53
62
  pluginRegistry,
54
63
  logger,
64
+ errorFormatter,
55
65
  MultiModalProcessor,
56
66
  AdaptiveRetrievalEngine,
57
67
  DAGEngine,
@@ -59,7 +69,11 @@ export {
59
69
  eventLogger,
60
70
  metrics,
61
71
  AuditLogger,
62
- DataGovernance
72
+ DataGovernance,
73
+ HotReloadManager,
74
+ createHotReloadManager,
75
+ DevServer,
76
+ createDevServer
63
77
  };
64
78
 
65
79
  // Backward compatibility aliases
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devilsdev/rag-pipeline-utils",
3
- "version": "2.2.1",
3
+ "version": "2.3.0",
4
4
  "description": "A comprehensive enterprise-grade toolkit for building RAG (Retrieval-Augmented Generation) pipelines with advanced AI/ML capabilities",
5
5
  "main": "dist/index.cjs",
6
6
  "type": "commonjs",
@@ -22,7 +22,7 @@
22
22
  "scripts": {
23
23
  "build": "node scripts/build.js && node scripts/generate-types.js",
24
24
  "prepack": "npm run build",
25
- "prepublishOnly": "echo 'Skipping prepublish checks - tests already passed'",
25
+ "prepublishOnly": "npm run lint && npm test",
26
26
  "guard:cjs": "node scripts/guard-cjs.js",
27
27
  "pretest": "npm run guard:cjs && node scripts/setup.js",
28
28
  "test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest --runInBand --config jest.config.js",
@@ -186,6 +186,7 @@
186
186
  "ajv": "^8.17.1",
187
187
  "axios": "^1.8.4",
188
188
  "chalk": "^5.4.1",
189
+ "chokidar": "^4.0.3",
189
190
  "commander": "^13.1.0",
190
191
  "csv-parse": "^5.6.0",
191
192
  "dotenv": "^16.5.0",