feat: Implement configuration management and logging for Markov bot

- Added AppConfig class to manage application configuration with environment variable support.
- Introduced JSON5 support for configuration files, allowing both .json and .json5 extensions.
- Implemented logging using Pino with pretty-printing for better readability.
- Created a MarkovStore class for efficient storage and retrieval of Markov chains with O(1) sampling.
- Developed a WorkerPool class to manage worker threads for parallel processing of tasks.
- Added methods for building chains, generating responses, and handling task submissions in the worker pool.
- Included validation for configuration using class-validator to ensure correctness.
- Established a clear structure for configuration, logging, and Markov chain management.
This commit is contained in:
pacnpal
2025-09-26 08:24:53 -04:00
parent 495b2350e0
commit 2e35d88045
17 changed files with 2997 additions and 145 deletions

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env node
import 'reflect-metadata';
/**
* Markov Discord Load Testing Script