@iworkforces/tracelattice 2.0.3
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.
- package/LICENSE +24 -0
- package/README.md +260 -0
- package/dist/CliLifecycle.d.ts +31 -0
- package/dist/CliLifecycle.d.ts.map +1 -0
- package/dist/CliLifecycle.js +90 -0
- package/dist/CliLifecycle.js.map +1 -0
- package/dist/ServerConfig.d.ts +290 -0
- package/dist/ServerConfig.d.ts.map +1 -0
- package/dist/ServerConfig.js +175 -0
- package/dist/ServerConfig.js.map +1 -0
- package/dist/cache/DiscoveryCache.d.ts +269 -0
- package/dist/cache/DiscoveryCache.d.ts.map +1 -0
- package/dist/cache/DiscoveryCache.js +104 -0
- package/dist/cache/DiscoveryCache.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +5177 -0
- package/dist/cli.js.map +1 -0
- package/dist/config/ConfigLoader.d.ts +270 -0
- package/dist/config/ConfigLoader.d.ts.map +1 -0
- package/dist/config/ConfigLoader.js +186 -0
- package/dist/config/ConfigLoader.js.map +1 -0
- package/dist/context/RequestContext.d.ts +43 -0
- package/dist/context/RequestContext.d.ts.map +1 -0
- package/dist/context/RequestContext.js +14 -0
- package/dist/context/RequestContext.js.map +1 -0
- package/dist/contracts/PersistenceBackend.d.ts +134 -0
- package/dist/contracts/PersistenceBackend.d.ts.map +1 -0
- package/dist/contracts/PersistenceBackend.js +6 -0
- package/dist/contracts/PersistenceBackend.js.map +1 -0
- package/dist/contracts/calibrator.d.ts +97 -0
- package/dist/contracts/calibrator.d.ts.map +1 -0
- package/dist/contracts/calibrator.js +1 -0
- package/dist/contracts/features.d.ts +35 -0
- package/dist/contracts/features.d.ts.map +1 -0
- package/dist/contracts/features.js +12 -0
- package/dist/contracts/features.js.map +1 -0
- package/dist/contracts/ids.d.ts +68 -0
- package/dist/contracts/ids.d.ts.map +1 -0
- package/dist/contracts/ids.js +40 -0
- package/dist/contracts/ids.js.map +1 -0
- package/dist/contracts/interfaces.d.ts +254 -0
- package/dist/contracts/interfaces.d.ts.map +1 -0
- package/dist/contracts/interfaces.js +1 -0
- package/dist/contracts/persistence-work.d.ts +96 -0
- package/dist/contracts/persistence-work.d.ts.map +1 -0
- package/dist/contracts/persistence-work.js +1 -0
- package/dist/contracts/reasoning-types.d.ts +21 -0
- package/dist/contracts/reasoning-types.d.ts.map +1 -0
- package/dist/contracts/reasoning-types.js +1 -0
- package/dist/contracts/strategy.d.ts +107 -0
- package/dist/contracts/strategy.d.ts.map +1 -0
- package/dist/contracts/strategy.js +1 -0
- package/dist/contracts/summary.d.ts +110 -0
- package/dist/contracts/summary.d.ts.map +1 -0
- package/dist/contracts/summary.js +1 -0
- package/dist/contracts/suspension.d.ts +215 -0
- package/dist/contracts/suspension.d.ts.map +1 -0
- package/dist/contracts/suspension.js +1 -0
- package/dist/contracts/transport.d.ts +26 -0
- package/dist/contracts/transport.d.ts.map +1 -0
- package/dist/contracts/transport.js +1 -0
- package/dist/core/CrossReferenceValidator.d.ts +18 -0
- package/dist/core/CrossReferenceValidator.d.ts.map +1 -0
- package/dist/core/CrossReferenceValidator.js +125 -0
- package/dist/core/CrossReferenceValidator.js.map +1 -0
- package/dist/core/HistoryManager.d.ts +215 -0
- package/dist/core/HistoryManager.d.ts.map +1 -0
- package/dist/core/HistoryManager.js +594 -0
- package/dist/core/HistoryManager.js.map +1 -0
- package/dist/core/IHistoryManager.d.ts +163 -0
- package/dist/core/IHistoryManager.d.ts.map +1 -0
- package/dist/core/IHistoryManager.js +1 -0
- package/dist/core/IThoughtFormatter.d.ts +51 -0
- package/dist/core/IThoughtFormatter.d.ts.map +1 -0
- package/dist/core/IThoughtFormatter.js +1 -0
- package/dist/core/InputNormalizer.d.ts +140 -0
- package/dist/core/InputNormalizer.d.ts.map +1 -0
- package/dist/core/InputNormalizer.js +95 -0
- package/dist/core/InputNormalizer.js.map +1 -0
- package/dist/core/PersistenceBuffer.d.ts +204 -0
- package/dist/core/PersistenceBuffer.d.ts.map +1 -0
- package/dist/core/PersistenceBuffer.js +382 -0
- package/dist/core/PersistenceBuffer.js.map +1 -0
- package/dist/core/PersistenceBufferErrors.d.ts +22 -0
- package/dist/core/PersistenceBufferErrors.d.ts.map +1 -0
- package/dist/core/PersistenceBufferErrors.js +30 -0
- package/dist/core/PersistenceBufferErrors.js.map +1 -0
- package/dist/core/PersistenceRestore.d.ts +21 -0
- package/dist/core/PersistenceRestore.d.ts.map +1 -0
- package/dist/core/PersistenceRestore.js +87 -0
- package/dist/core/PersistenceRestore.js.map +1 -0
- package/dist/core/PersistenceWorkQueue.d.ts +155 -0
- package/dist/core/PersistenceWorkQueue.d.ts.map +1 -0
- package/dist/core/PersistenceWorkQueue.js +298 -0
- package/dist/core/PersistenceWorkQueue.js.map +1 -0
- package/dist/core/PersistenceWriter.d.ts +55 -0
- package/dist/core/PersistenceWriter.d.ts.map +1 -0
- package/dist/core/PersistenceWriter.js +112 -0
- package/dist/core/PersistenceWriter.js.map +1 -0
- package/dist/core/SessionErrors.d.ts +37 -0
- package/dist/core/SessionErrors.d.ts.map +1 -0
- package/dist/core/SessionErrors.js +50 -0
- package/dist/core/SessionErrors.js.map +1 -0
- package/dist/core/SessionLifecycleCoordinator.d.ts +74 -0
- package/dist/core/SessionLifecycleCoordinator.d.ts.map +1 -0
- package/dist/core/SessionLifecycleCoordinator.js +222 -0
- package/dist/core/SessionLifecycleCoordinator.js.map +1 -0
- package/dist/core/SessionLock.d.ts +59 -0
- package/dist/core/SessionLock.d.ts.map +1 -0
- package/dist/core/SessionLock.js +39 -0
- package/dist/core/SessionLock.js.map +1 -0
- package/dist/core/SessionManager.d.ts +62 -0
- package/dist/core/SessionManager.d.ts.map +1 -0
- package/dist/core/SessionManager.js +75 -0
- package/dist/core/SessionManager.js.map +1 -0
- package/dist/core/SessionResetCoordinator.d.ts +37 -0
- package/dist/core/SessionResetCoordinator.d.ts.map +1 -0
- package/dist/core/SessionResetCoordinator.js +80 -0
- package/dist/core/SessionResetCoordinator.js.map +1 -0
- package/dist/core/ThoughtEvaluator.d.ts +48 -0
- package/dist/core/ThoughtEvaluator.d.ts.map +1 -0
- package/dist/core/ThoughtEvaluator.js +85 -0
- package/dist/core/ThoughtEvaluator.js.map +1 -0
- package/dist/core/ThoughtFormatter.d.ts +134 -0
- package/dist/core/ThoughtFormatter.d.ts.map +1 -0
- package/dist/core/ThoughtFormatter.js +118 -0
- package/dist/core/ThoughtFormatter.js.map +1 -0
- package/dist/core/ThoughtProcessor.d.ts +259 -0
- package/dist/core/ThoughtProcessor.d.ts.map +1 -0
- package/dist/core/ThoughtProcessor.js +451 -0
- package/dist/core/ThoughtProcessor.js.map +1 -0
- package/dist/core/ThoughtReferenceIndex.d.ts +23 -0
- package/dist/core/ThoughtReferenceIndex.d.ts.map +1 -0
- package/dist/core/ThoughtReferenceIndex.js +66 -0
- package/dist/core/ThoughtReferenceIndex.js.map +1 -0
- package/dist/core/VerificationOutcomeAdmission.d.ts +15 -0
- package/dist/core/VerificationOutcomeAdmission.d.ts.map +1 -0
- package/dist/core/VerificationOutcomeAdmission.js +28 -0
- package/dist/core/VerificationOutcomeAdmission.js.map +1 -0
- package/dist/core/compression/CompressionService.d.ts +76 -0
- package/dist/core/compression/CompressionService.d.ts.map +1 -0
- package/dist/core/compression/CompressionService.js +160 -0
- package/dist/core/compression/CompressionService.js.map +1 -0
- package/dist/core/compression/DehydrationPolicy.d.ts +75 -0
- package/dist/core/compression/DehydrationPolicy.d.ts.map +1 -0
- package/dist/core/compression/DehydrationPolicy.js +45 -0
- package/dist/core/compression/DehydrationPolicy.js.map +1 -0
- package/dist/core/compression/InMemorySummaryStore.d.ts +132 -0
- package/dist/core/compression/InMemorySummaryStore.d.ts.map +1 -0
- package/dist/core/compression/InMemorySummaryStore.js +69 -0
- package/dist/core/compression/InMemorySummaryStore.js.map +1 -0
- package/dist/core/compression/Summary.d.ts +74 -0
- package/dist/core/compression/Summary.d.ts.map +1 -0
- package/dist/core/compression/Summary.js +16 -0
- package/dist/core/compression/Summary.js.map +1 -0
- package/dist/core/evaluator/Aggregator.d.ts +40 -0
- package/dist/core/evaluator/Aggregator.d.ts.map +1 -0
- package/dist/core/evaluator/Aggregator.js +36 -0
- package/dist/core/evaluator/Aggregator.js.map +1 -0
- package/dist/core/evaluator/Calibrator.d.ts +52 -0
- package/dist/core/evaluator/Calibrator.d.ts.map +1 -0
- package/dist/core/evaluator/Calibrator.js +135 -0
- package/dist/core/evaluator/Calibrator.js.map +1 -0
- package/dist/core/evaluator/PatternDetector.d.ts +69 -0
- package/dist/core/evaluator/PatternDetector.d.ts.map +1 -0
- package/dist/core/evaluator/PatternDetector.js +192 -0
- package/dist/core/evaluator/PatternDetector.js.map +1 -0
- package/dist/core/evaluator/SignalComputer.d.ts +116 -0
- package/dist/core/evaluator/SignalComputer.d.ts.map +1 -0
- package/dist/core/evaluator/SignalComputer.js +110 -0
- package/dist/core/evaluator/SignalComputer.js.map +1 -0
- package/dist/core/evaluator/calibration-math.d.ts +39 -0
- package/dist/core/evaluator/calibration-math.d.ts.map +1 -0
- package/dist/core/evaluator/calibration-math.js +42 -0
- package/dist/core/evaluator/calibration-math.js.map +1 -0
- package/dist/core/evaluator/internals.d.ts +36 -0
- package/dist/core/evaluator/internals.d.ts.map +1 -0
- package/dist/core/evaluator/internals.js +43 -0
- package/dist/core/evaluator/internals.js.map +1 -0
- package/dist/core/graph/Edge.d.ts +58 -0
- package/dist/core/graph/Edge.d.ts.map +1 -0
- package/dist/core/graph/Edge.js +1 -0
- package/dist/core/graph/EdgeEmitter.d.ts +68 -0
- package/dist/core/graph/EdgeEmitter.d.ts.map +1 -0
- package/dist/core/graph/EdgeEmitter.js +118 -0
- package/dist/core/graph/EdgeEmitter.js.map +1 -0
- package/dist/core/graph/EdgeStore.d.ts +116 -0
- package/dist/core/graph/EdgeStore.d.ts.map +1 -0
- package/dist/core/graph/EdgeStore.js +107 -0
- package/dist/core/graph/EdgeStore.js.map +1 -0
- package/dist/core/graph/GraphView.d.ts +157 -0
- package/dist/core/graph/GraphView.d.ts.map +1 -0
- package/dist/core/graph/GraphView.js +149 -0
- package/dist/core/graph/GraphView.js.map +1 -0
- package/dist/core/ids.d.ts +33 -0
- package/dist/core/ids.d.ts.map +1 -0
- package/dist/core/ids.js +11 -0
- package/dist/core/ids.js.map +1 -0
- package/dist/core/reasoning/OutcomeRecorder.d.ts +88 -0
- package/dist/core/reasoning/OutcomeRecorder.d.ts.map +1 -0
- package/dist/core/reasoning/OutcomeRecorder.js +51 -0
- package/dist/core/reasoning/OutcomeRecorder.js.map +1 -0
- package/dist/core/reasoning/strategies/SequentialStrategy.d.ts +54 -0
- package/dist/core/reasoning/strategies/SequentialStrategy.d.ts.map +1 -0
- package/dist/core/reasoning/strategies/SequentialStrategy.js +22 -0
- package/dist/core/reasoning/strategies/SequentialStrategy.js.map +1 -0
- package/dist/core/reasoning/strategies/StrategyFactory.d.ts +25 -0
- package/dist/core/reasoning/strategies/StrategyFactory.d.ts.map +1 -0
- package/dist/core/reasoning/strategies/StrategyFactory.js +16 -0
- package/dist/core/reasoning/strategies/StrategyFactory.js.map +1 -0
- package/dist/core/reasoning/strategies/TreeOfThoughtStrategy.d.ts +58 -0
- package/dist/core/reasoning/strategies/TreeOfThoughtStrategy.d.ts.map +1 -0
- package/dist/core/reasoning/strategies/TreeOfThoughtStrategy.js +103 -0
- package/dist/core/reasoning/strategies/TreeOfThoughtStrategy.js.map +1 -0
- package/dist/core/reasoning/strategies/plateau.d.ts +18 -0
- package/dist/core/reasoning/strategies/plateau.d.ts.map +1 -0
- package/dist/core/reasoning/strategies/plateau.js +12 -0
- package/dist/core/reasoning/strategies/plateau.js.map +1 -0
- package/dist/core/reasoning/strategies/totScoring.d.ts +91 -0
- package/dist/core/reasoning/strategies/totScoring.d.ts.map +1 -0
- package/dist/core/reasoning/strategies/totScoring.js +88 -0
- package/dist/core/reasoning/strategies/totScoring.js.map +1 -0
- package/dist/core/reasoning.d.ts +179 -0
- package/dist/core/reasoning.d.ts.map +1 -0
- package/dist/core/reasoning.js +1 -0
- package/dist/core/step.d.ts +50 -0
- package/dist/core/step.d.ts.map +1 -0
- package/dist/core/step.js +1 -0
- package/dist/core/thought.d.ts +113 -0
- package/dist/core/thought.d.ts.map +1 -0
- package/dist/core/thought.js +1 -0
- package/dist/core/tools/InMemorySuspensionStore.d.ts +66 -0
- package/dist/core/tools/InMemorySuspensionStore.d.ts.map +1 -0
- package/dist/core/tools/InMemorySuspensionStore.js +121 -0
- package/dist/core/tools/InMemorySuspensionStore.js.map +1 -0
- package/dist/di/Container.d.ts +253 -0
- package/dist/di/Container.d.ts.map +1 -0
- package/dist/di/Container.js +111 -0
- package/dist/di/Container.js.map +1 -0
- package/dist/di/ServiceRegistry.d.ts +50 -0
- package/dist/di/ServiceRegistry.d.ts.map +1 -0
- package/dist/di/ServiceRegistry.js +1 -0
- package/dist/errors.d.ts +663 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +282 -0
- package/dist/errors.js.map +1 -0
- package/dist/health/HealthChecker.d.ts +73 -0
- package/dist/health/HealthChecker.d.ts.map +1 -0
- package/dist/health/HealthChecker.js +70 -0
- package/dist/health/HealthChecker.js.map +1 -0
- package/dist/lib.d.ts +273 -0
- package/dist/lib.d.ts.map +1 -0
- package/dist/lib.js +409 -0
- package/dist/lib.js.map +1 -0
- package/dist/logger/NullLogger.d.ts +154 -0
- package/dist/logger/NullLogger.d.ts.map +1 -0
- package/dist/logger/NullLogger.js +24 -0
- package/dist/logger/NullLogger.js.map +1 -0
- package/dist/logger/StructuredLogger.d.ts +327 -0
- package/dist/logger/StructuredLogger.d.ts.map +1 -0
- package/dist/logger/StructuredLogger.js +72 -0
- package/dist/logger/StructuredLogger.js.map +1 -0
- package/dist/metrics/metrics.impl.d.ts +252 -0
- package/dist/metrics/metrics.impl.d.ts.map +1 -0
- package/dist/metrics/metrics.impl.js +197 -0
- package/dist/metrics/metrics.impl.js.map +1 -0
- package/dist/persistence/FileLegacyImport.d.ts +2 -0
- package/dist/persistence/FileLegacyImport.d.ts.map +1 -0
- package/dist/persistence/FileLegacyImport.js +183 -0
- package/dist/persistence/FileLegacyImport.js.map +1 -0
- package/dist/persistence/FilePersistence.d.ts +53 -0
- package/dist/persistence/FilePersistence.d.ts.map +1 -0
- package/dist/persistence/FilePersistence.js +312 -0
- package/dist/persistence/FilePersistence.js.map +1 -0
- package/dist/persistence/FileSnapshotTypes.d.ts +29 -0
- package/dist/persistence/FileSnapshotTypes.d.ts.map +1 -0
- package/dist/persistence/FileSnapshotTypes.js +1 -0
- package/dist/persistence/FileSnapshotV2.d.ts +377 -0
- package/dist/persistence/FileSnapshotV2.d.ts.map +1 -0
- package/dist/persistence/FileSnapshotV2.js +124 -0
- package/dist/persistence/FileSnapshotV2.js.map +1 -0
- package/dist/persistence/FileSnapshotValidation.d.ts +15 -0
- package/dist/persistence/FileSnapshotValidation.d.ts.map +1 -0
- package/dist/persistence/FileSnapshotValidation.js +64 -0
- package/dist/persistence/FileSnapshotValidation.js.map +1 -0
- package/dist/persistence/FileWriter.d.ts +30 -0
- package/dist/persistence/FileWriter.d.ts.map +1 -0
- package/dist/persistence/FileWriter.js +155 -0
- package/dist/persistence/FileWriter.js.map +1 -0
- package/dist/persistence/MemoryPersistence.d.ts +45 -0
- package/dist/persistence/MemoryPersistence.d.ts.map +1 -0
- package/dist/persistence/MemoryPersistence.js +180 -0
- package/dist/persistence/MemoryPersistence.js.map +1 -0
- package/dist/persistence/PersistenceCodec.d.ts +7 -0
- package/dist/persistence/PersistenceCodec.d.ts.map +1 -0
- package/dist/persistence/PersistenceCodec.js +97 -0
- package/dist/persistence/PersistenceCodec.js.map +1 -0
- package/dist/persistence/PersistenceErrors.d.ts +23 -0
- package/dist/persistence/PersistenceErrors.d.ts.map +1 -0
- package/dist/persistence/PersistenceErrors.js +26 -0
- package/dist/persistence/PersistenceErrors.js.map +1 -0
- package/dist/persistence/PersistenceFactory.d.ts +21 -0
- package/dist/persistence/PersistenceFactory.d.ts.map +1 -0
- package/dist/persistence/PersistenceFactory.js +28 -0
- package/dist/persistence/PersistenceFactory.js.map +1 -0
- package/dist/persistence/PersistenceScope.d.ts +42 -0
- package/dist/persistence/PersistenceScope.d.ts.map +1 -0
- package/dist/persistence/PersistenceScope.js +93 -0
- package/dist/persistence/PersistenceScope.js.map +1 -0
- package/dist/persistence/SessionScopedPersistence.d.ts +4 -0
- package/dist/persistence/SessionScopedPersistence.d.ts.map +1 -0
- package/dist/persistence/SessionScopedPersistence.js +9 -0
- package/dist/persistence/SessionScopedPersistence.js.map +1 -0
- package/dist/persistence/SqliteDriver.d.ts +22 -0
- package/dist/persistence/SqliteDriver.d.ts.map +1 -0
- package/dist/persistence/SqliteDriver.js +29 -0
- package/dist/persistence/SqliteDriver.js.map +1 -0
- package/dist/persistence/SqliteLegacyImport.d.ts +14 -0
- package/dist/persistence/SqliteLegacyImport.d.ts.map +1 -0
- package/dist/persistence/SqliteLegacyImport.js +136 -0
- package/dist/persistence/SqliteLegacyImport.js.map +1 -0
- package/dist/persistence/SqliteLegacySchema.d.ts +15 -0
- package/dist/persistence/SqliteLegacySchema.d.ts.map +1 -0
- package/dist/persistence/SqliteLegacySchema.js +72 -0
- package/dist/persistence/SqliteLegacySchema.js.map +1 -0
- package/dist/persistence/SqlitePayload.d.ts +11 -0
- package/dist/persistence/SqlitePayload.d.ts.map +1 -0
- package/dist/persistence/SqlitePayload.js +86 -0
- package/dist/persistence/SqlitePayload.js.map +1 -0
- package/dist/persistence/SqlitePersistence.d.ts +49 -0
- package/dist/persistence/SqlitePersistence.d.ts.map +1 -0
- package/dist/persistence/SqlitePersistence.js +248 -0
- package/dist/persistence/SqlitePersistence.js.map +1 -0
- package/dist/persistence/SqliteSchemaV2.d.ts +14 -0
- package/dist/persistence/SqliteSchemaV2.d.ts.map +1 -0
- package/dist/persistence/SqliteSchemaV2.js +129 -0
- package/dist/persistence/SqliteSchemaV2.js.map +1 -0
- package/dist/persistence/SqliteSnapshotWriter.d.ts +17 -0
- package/dist/persistence/SqliteSnapshotWriter.d.ts.map +1 -0
- package/dist/persistence/SqliteSnapshotWriter.js +30 -0
- package/dist/persistence/SqliteSnapshotWriter.js.map +1 -0
- package/dist/pool/ConnectionPool.d.ts +203 -0
- package/dist/pool/ConnectionPool.d.ts.map +1 -0
- package/dist/pool/ConnectionPool.js +303 -0
- package/dist/pool/ConnectionPool.js.map +1 -0
- package/dist/pool/IConnectionPool.d.ts +143 -0
- package/dist/pool/IConnectionPool.d.ts.map +1 -0
- package/dist/pool/IConnectionPool.js +1 -0
- package/dist/pool/PoolErrors.d.ts +11 -0
- package/dist/pool/PoolErrors.d.ts.map +1 -0
- package/dist/pool/PoolErrors.js +16 -0
- package/dist/pool/PoolErrors.js.map +1 -0
- package/dist/registry/BaseRegistry.d.ts +219 -0
- package/dist/registry/BaseRegistry.d.ts.map +1 -0
- package/dist/registry/BaseRegistry.js +215 -0
- package/dist/registry/BaseRegistry.js.map +1 -0
- package/dist/registry/SkillRegistry.d.ts +67 -0
- package/dist/registry/SkillRegistry.d.ts.map +1 -0
- package/dist/registry/SkillRegistry.js +87 -0
- package/dist/registry/SkillRegistry.js.map +1 -0
- package/dist/registry/ToolRegistry.d.ts +70 -0
- package/dist/registry/ToolRegistry.d.ts.map +1 -0
- package/dist/registry/ToolRegistry.js +96 -0
- package/dist/registry/ToolRegistry.js.map +1 -0
- package/dist/sanitize.d.ts +164 -0
- package/dist/sanitize.d.ts.map +1 -0
- package/dist/sanitize.js +100 -0
- package/dist/sanitize.js.map +1 -0
- package/dist/schema.d.ts +562 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +251 -0
- package/dist/schema.js.map +1 -0
- package/dist/transport/BaseTransport.d.ts +166 -0
- package/dist/transport/BaseTransport.d.ts.map +1 -0
- package/dist/transport/BaseTransport.js +199 -0
- package/dist/transport/BaseTransport.js.map +1 -0
- package/dist/transport/HttpHelpers.d.ts +53 -0
- package/dist/transport/HttpHelpers.d.ts.map +1 -0
- package/dist/transport/HttpHelpers.js +44 -0
- package/dist/transport/HttpHelpers.js.map +1 -0
- package/dist/transport/HttpRequestLifecycle.d.ts +37 -0
- package/dist/transport/HttpRequestLifecycle.d.ts.map +1 -0
- package/dist/transport/HttpRequestLifecycle.js +87 -0
- package/dist/transport/HttpRequestLifecycle.js.map +1 -0
- package/dist/transport/HttpTransport.d.ts +140 -0
- package/dist/transport/HttpTransport.d.ts.map +1 -0
- package/dist/transport/HttpTransport.js +245 -0
- package/dist/transport/HttpTransport.js.map +1 -0
- package/dist/transport/SseTransport.d.ts +149 -0
- package/dist/transport/SseTransport.d.ts.map +1 -0
- package/dist/transport/SseTransport.js +470 -0
- package/dist/transport/SseTransport.js.map +1 -0
- package/dist/transport/StreamableHttpTransport.d.ts +225 -0
- package/dist/transport/StreamableHttpTransport.d.ts.map +1 -0
- package/dist/transport/StreamableHttpTransport.js +449 -0
- package/dist/transport/StreamableHttpTransport.js.map +1 -0
- package/dist/types/disposable.d.ts +22 -0
- package/dist/types/disposable.d.ts.map +1 -0
- package/dist/types/disposable.js +1 -0
- package/dist/types/server-config.d.ts +32 -0
- package/dist/types/server-config.d.ts.map +1 -0
- package/dist/types/server-config.js +1 -0
- package/dist/types/skill.d.ts +74 -0
- package/dist/types/skill.d.ts.map +1 -0
- package/dist/types/skill.js +1 -0
- package/dist/types/tool.d.ts +78 -0
- package/dist/types/tool.d.ts.map +1 -0
- package/dist/types/tool.js +1 -0
- package/dist/utils.d.ts +27 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +6 -0
- package/dist/utils.js.map +1 -0
- package/dist/watchers/SkillWatcher.d.ts +25 -0
- package/dist/watchers/SkillWatcher.d.ts.map +1 -0
- package/dist/watchers/SkillWatcher.js +96 -0
- package/dist/watchers/SkillWatcher.js.map +1 -0
- package/dist/watchers/ToolWatcher.d.ts +24 -0
- package/dist/watchers/ToolWatcher.d.ts.map +1 -0
- package/dist/watchers/ToolWatcher.js +92 -0
- package/dist/watchers/ToolWatcher.js.map +1 -0
- package/package.json +106 -0
package/dist/lib.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.js","sources":["../src/lib.ts"],"sourcesContent":["// Library exports for tracelattice\n// This module contains all public API exports with NO CLI side effects.\n// For the CLI entry point, see cli.ts.\n\nimport { EventEmitter } from 'node:events';\nimport type * as v from 'valibot';\nimport type { ThoughtData } from './core/thought.js';\nimport type { BranchId } from './contracts/ids.js';\nimport type { SequentialThinkingSchema } from './schema.js';\nimport { SEQUENTIAL_THINKING_TOOL } from './schema.js';\nimport type { IDisposable } from './types/disposable.js';\nimport { getErrorMessage } from './errors.js';\nimport { assertNever } from './utils.js';\n\n// New component imports\nimport { DiscoveryCache } from './cache/DiscoveryCache.js';\nimport type { ConfigFileOptions } from './config/ConfigLoader.js';\nimport { ConfigLoader } from './config/ConfigLoader.js';\nimport { HistoryManager } from './core/HistoryManager.js';\nimport { EdgeStore } from './core/graph/EdgeStore.js';\nimport { InMemorySummaryStore } from './core/compression/InMemorySummaryStore.js';\nimport { CompressionService } from './core/compression/CompressionService.js';\nimport { InMemorySuspensionStore } from './core/tools/InMemorySuspensionStore.js';\nimport { ThoughtEvaluator } from './core/ThoughtEvaluator.js';\nimport { Calibrator } from './core/evaluator/Calibrator.js';\nimport { OutcomeRecorder } from './core/reasoning/OutcomeRecorder.js';\nimport { createReasoningStrategy } from './core/reasoning/strategies/StrategyFactory.js';\nimport { ThoughtFormatter } from './core/ThoughtFormatter.js';\nimport { ThoughtProcessor, type CallToolResult } from './core/ThoughtProcessor.js';\nimport { SessionLock } from './core/SessionLock.js';\nimport { SessionLifecycleCoordinator } from './core/SessionLifecycleCoordinator.js';\nimport { Container } from './di/Container.js';\nimport { StructuredLogger } from './logger/StructuredLogger.js';\nimport { Metrics } from './metrics/metrics.impl.js';\nimport type { PersistenceBackend } from './contracts/PersistenceBackend.js';\nimport { createPersistenceBackend } from './persistence/PersistenceFactory.js';\nimport { SkillRegistry } from './registry/SkillRegistry.js';\nimport { ToolRegistry } from './registry/ToolRegistry.js';\nimport { ServerConfig } from './ServerConfig.js';\nimport type { SseTransportOptions } from './transport/SseTransport.js';\nimport { SkillWatcher } from './watchers/SkillWatcher.js';\nimport { ToolWatcher } from './watchers/ToolWatcher.js';\n\nexport interface ServerOptions {\n\tmaxHistorySize?: number;\n\tmaxBranches?: number;\n\tmaxBranchSize?: number;\n\tlogger?: StructuredLogger;\n\tenableWatcher?: boolean;\n\tconfig?: ServerConfig;\n\tfileConfig?: ConfigFileOptions;\n\tcontainer?: Container;\n\t/**\n\t * Enable automatic tool and skill discovery on server startup.\n\t * @default true\n\t */\n\tautoDiscover?: boolean;\n\t/**\n\t * Suppress startup discovery so callers can discover through registry APIs explicitly.\n\t * @default false\n\t */\n\tlazyDiscovery?: boolean;\n\t/**\n\t * Load history from persistence on initialization\n\t * @default true\n\t */\n\tloadFromPersistence?: boolean;\n\t/**\n\t * Transport type to use\n\t * @default 'stdio'\n\t */\n\ttransport?: 'stdio' | 'sse';\n\t/**\n\t * SSE transport options (used when transport: 'sse')\n\t */\n\tsseTransportOptions?: SseTransportOptions;\n}\n\n/**\n * Server error events for event-driven error handling\n */\ninterface ServerEvents {\n\tpersistenceError: { operation: string; error: Error };\n\tdiscoveryError: { directory: string; error: Error };\n\ttransportError: { transport: string; error: Error };\n\tthoughtProcessed: { thoughtNumber: number; duration: number };\n}\n\ntype CleanupOperation = () => void | Promise<void>;\n\nfunction appendCleanupFailure(failures: unknown[], failure: unknown): void {\n\tif (failure instanceof AggregateError) {\n\t\tfailures.push(...failure.errors);\n\t\treturn;\n\t}\n\tfailures.push(failure);\n}\n\nasync function collectCleanupFailures(operations: readonly CleanupOperation[]): Promise<unknown[]> {\n\tconst failures: unknown[] = [];\n\tfor (const operation of operations) {\n\t\ttry {\n\t\t\tawait operation();\n\t\t} catch (error) {\n\t\t\tappendCleanupFailure(failures, error);\n\t\t}\n\t}\n\treturn failures;\n}\n\n/**\n * Public API contract for the tool-aware sequential thinking server.\n *\n * Extends {@link IDisposable} for resource cleanup. Concrete implementations\n * are expected to also extend Node's `EventEmitter` to support the typed\n * `emit`/`on` overloads.\n */\nexport interface IToolAwareSequentialThinkingServer extends IDisposable {\n\t/** Direct access to the history manager. */\n\treadonly history: HistoryManager;\n\n\t/** Direct access to the tool registry. */\n\treadonly tools: ToolRegistry;\n\n\t/** Direct access to the skill registry. */\n\treadonly skills: SkillRegistry;\n\n\t/** Server configuration. */\n\treadonly config: ServerConfig;\n\n\t/**\n\t * Discover skills asynchronously without blocking server startup.\n\t *\n\t * @returns The number of skills discovered\n\t */\n\tdiscoverSkillsAsync(): Promise<number>;\n\n\t/**\n\t * Get all branches from the history manager.\n\t *\n\t * @returns Map of branch IDs to thought arrays\n\t */\n\tgetBranches(): Record<string, ThoughtData[]>;\n\n\t/**\n\t * Process a thought through the configured pipeline.\n\t *\n\t * @param input - Validated thought input matching the schema\n\t * @returns The processing result\n\t */\n\tprocessThought(input: v.InferInput<typeof SequentialThinkingSchema>): Promise<CallToolResult>;\n\n\t/**\n\t * Export the current Prometheus metrics snapshot.\n\t */\n\tgetMetricsSnapshot(): string;\n\n\t/**\n\t * Get the DI container used by this server.\n\t * Useful for testing and advanced customizations.\n\t */\n\tgetContainer(): Container;\n\n\t/**\n\t * Stop the server and clean up watchers, suspension stores, and persistence.\n\t */\n\tstop(): Promise<void>;\n\n\t/**\n\t * Clear all server state (history, tools, skills).\n\t */\n\tclear(): void;\n\n\t/** Awaitably reset one session and all matching auxiliary state. */\n\tresetSession(sessionId: string): Promise<void>;\n\n\t/** Awaitably reset all state from a trusted ownerless context. */\n\tresetAll(): Promise<void>;\n\n\t/**\n\t * Dispose of the server and all container services.\n\t */\n\tdispose(): Promise<void>;\n}\n\nexport class ToolAwareSequentialThinkingServer\n\textends EventEmitter\n\timplements IToolAwareSequentialThinkingServer\n{\n\t/**\n\t * Factory method to create a new server instance with async initialization.\n\t * This is the recommended way to create server instances.\n\t *\n\t * @param options - Server configuration options\n\t * @returns A Promise that resolves to a configured server instance\n\t */\n\tstatic async create(options: ServerOptions = {}): Promise<ToolAwareSequentialThinkingServer> {\n\t\tconst container = await ToolAwareSequentialThinkingServer._createContainerAsyncStatic(options);\n\t\tlet server: ToolAwareSequentialThinkingServer | undefined;\n\t\ttry {\n\t\t\tserver = new ToolAwareSequentialThinkingServer({\n\t\t\t\t...options,\n\t\t\t\tcontainer,\n\t\t\t});\n\t\t\tawait Promise.all([\n\t\t\t\tserver._skillWatcher?.ready() ?? Promise.resolve(),\n\t\t\t\tserver._toolWatcher?.ready() ?? Promise.resolve(),\n\t\t\t]);\n\n\t\t\tif (options.loadFromPersistence !== false) {\n\t\t\t\tawait server.history.loadFromPersistence();\n\t\t\t}\n\n\t\t\tif (options.autoDiscover !== false && options.lazyDiscovery !== true) {\n\t\t\t\tawait Promise.all([server.tools.discoverAsync(), server.discoverSkillsAsync()]);\n\t\t\t}\n\n\t\t\treturn server;\n\t\t} catch (error) {\n\t\t\tconst startedServer = server;\n\t\t\tconst cleanupFailures = await collectCleanupFailures(\n\t\t\t\tstartedServer\n\t\t\t\t\t? [() => startedServer.dispose()]\n\t\t\t\t\t: [\n\t\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\t\tif (container.has('suspensionStore')) {\n\t\t\t\t\t\t\t\t\tcontainer.resolve('suspensionStore').stop();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t() => container.resolve('Persistence')?.close(),\n\t\t\t\t\t\t\t() => container.dispose(),\n\t\t\t\t\t\t]\n\t\t\t);\n\t\t\tif (cleanupFailures.length > 0) {\n\t\t\t\tthrow new AggregateError(\n\t\t\t\t\t[error, ...cleanupFailures],\n\t\t\t\t\t'Server startup failed and cleanup also failed',\n\t\t\t\t\t{ cause: error }\n\t\t\t\t);\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\t// Type-safe event emission\n\toverride emit<K extends keyof ServerEvents>(event: K, payload: ServerEvents[K]): boolean {\n\t\treturn super.emit(event, payload);\n\t}\n\n\toverride on<K extends keyof ServerEvents>(\n\t\tevent: K,\n\t\tlistener: (payload: ServerEvents[K]) => void\n\t): this {\n\t\treturn super.on(event, listener);\n\t}\n\n\t// DI Container for managing dependencies\n\tprivate _container: Container;\n\n\t// Component instances (private)\n\tprivate _logger: StructuredLogger;\n\tprivate _historyManager: HistoryManager;\n\tprivate _thoughtProcessor: ThoughtProcessor;\n\tprivate _metrics: Metrics;\n\tprivate _skillWatcher: SkillWatcher | null = null;\n\tprivate _toolWatcher: ToolWatcher | null = null;\n\tprivate _config: ServerConfig;\n\tprivate _stopPromise: Promise<void> | null = null;\n\tprivate _disposePromise: Promise<void> | null = null;\n\n\t// Public manager properties (recommended API)\n\t/**\n\t * Direct access to the history manager\n\t * @example\n\t * ```typescript\n\t * server.history.getHistory();\n\t * server.history.clear();\n\t * ```\n\t */\n\tpublic readonly history: HistoryManager;\n\n\t/**\n\t * Direct access to the tool registry\n\t * @example\n\t * ```typescript\n\t * server.tools.addTool(tool);\n\t * server.tools.getTool('my-tool');\n\t * ```\n\t */\n\tpublic readonly tools: ToolRegistry;\n\n\t/**\n\t * Direct access to the skill registry\n\t * @example\n\t * ```typescript\n\t * server.skills.addSkill(skill);\n\t * server.skills.getSkill('my-skill');\n\t * ```\n\t */\n\tpublic readonly skills: SkillRegistry;\n\n\t/**\n\t * Server configuration\n\t * @example\n\t * ```typescript\n\t * console.log(server.config.maxHistorySize);\n\t * ```\n\t */\n\tpublic readonly config: ServerConfig;\n\n\tconstructor(options: ServerOptions = {}) {\n\t\t// Use provided container or create a new one\n\t\tsuper();\n\t\tif (!options.container) {\n\t\t\tthrow new Error('Container is required. Use createServer() or provide a container.');\n\t\t}\n\t\tthis._container = options.container;\n\n\t\t// Resolve dependencies from container\n\t\tthis._logger = this._container.resolve('Logger');\n\t\tthis._historyManager = this._container.resolve('HistoryManager');\n\t\tthis._historyManager.bindShutdownOwner(() => this.stop());\n\t\tthis._thoughtProcessor = this._container.resolve('ThoughtProcessor');\n\t\tthis._metrics = this._container.resolve('Metrics');\n\t\tthis._config = this._container.resolve('Config');\n\n\t\t// Expose managers as public properties (recommended API)\n\t\tthis.history = this._historyManager;\n\n\t\t// Wire up persistence error event emitter\n\t\tthis._historyManager.setEventEmitter(this);\n\t\tthis.tools = this._container.resolve('ToolRegistry');\n\t\tthis.skills = this._container.resolve('SkillRegistry');\n\t\tthis.config = this._config;\n\n\t\t// Always include the sequential thinking tool\n\t\tthis.tools.addTool(SEQUENTIAL_THINKING_TOOL);\n\n\t\t// Initialize watchers if enabled\n\t\tif (options.enableWatcher) {\n\t\t\tthis._skillWatcher = new SkillWatcher(this.skills, this._logger, this.config.skillDirs);\n\t\t\tthis._toolWatcher = new ToolWatcher(this.tools, this._logger, this.config.toolDirs);\n\t\t}\n\t}\n\n\t/**\n\t * Shared core logic for container creation.\n\t * This method contains all common initialization logic between sync and async paths.\n\t */\n\tprivate static _createContainerCore(\n\t\toptions: ServerOptions,\n\t\tfileConfig: ConfigFileOptions | null,\n\t\tpersistence: PersistenceBackend | null\n\t): Container {\n\t\tconst container = new Container();\n\t\tconst metrics = new Metrics({\n\t\t\tprefix: 'sequentialthinking',\n\t\t});\n\n\t\tconst config = ToolAwareSequentialThinkingServer._resolveEffectiveConfig(options, fileConfig);\n\n\t\t// Initialize logger\n\t\tconst logger =\n\t\t\toptions.logger ??\n\t\t\tnew StructuredLogger({\n\t\t\t\tlevel: fileConfig?.logLevel ?? 'info',\n\t\t\t\tcontext: 'SequentialThinking',\n\t\t\t\tpretty: fileConfig?.prettyLog ?? true,\n\t\t\t});\n\n\t\t// Register all services in the container\n\t\tcontainer.registerInstance('Logger', logger);\n\t\tcontainer.registerInstance('Config', config);\n\t\tcontainer.registerInstance('FileConfig', fileConfig || {});\n\t\tcontainer.registerInstance('Persistence', persistence);\n\t\tcontainer.registerInstance('Metrics', metrics);\n\t\tToolAwareSequentialThinkingServer._registerDiscoveryRegistries(\n\t\t\tcontainer,\n\t\t\toptions.lazyDiscovery\n\t\t);\n\n\t\t// Register EdgeStore as a lazy singleton (always registered; flag gates writes)\n\t\tcontainer.register('EdgeStore', () => new EdgeStore());\n\n\t\t// Register SummaryStore as a lazy singleton (always registered; flag gates writes)\n\t\tcontainer.register('summaryStore', () => new InMemorySummaryStore());\n\n\t\t// Register SuspensionStore as a lazy singleton (only when toolInterleave flag is on)\n\t\tif (config.features.toolInterleave) {\n\t\t\tcontainer.register('suspensionStore', () => {\n\t\t\t\tconst store = new InMemorySuspensionStore({\n\t\t\t\t\tttlMs: config.toolInterleaveTtlMs,\n\t\t\t\t\tsweepIntervalMs: config.toolInterleaveSweepMs,\n\t\t\t\t\tlogger,\n\t\t\t\t});\n\t\t\t\tstore.start();\n\t\t\t\treturn store;\n\t\t\t});\n\t\t}\n\n\t\t// Register CompressionService as a lazy singleton (always registered; flag gates invocation)\n\t\tcontainer.register('compressionService', () => {\n\t\t\tconst historyManager = container.resolve('HistoryManager');\n\t\t\tconst edgeStore = container.resolve('EdgeStore');\n\t\t\tconst summaryStore = container.resolve('summaryStore');\n\t\t\tconst log = container.resolve('Logger');\n\t\t\treturn new CompressionService({\n\t\t\t\thistoryManager,\n\t\t\t\tedgeStore,\n\t\t\t\tsummaryStore,\n\t\t\t\tonSummaryCreated: (summary) => {\n\t\t\t\t\thistoryManager.bufferSummaries(\n\t\t\t\t\t\tsummary.sessionId,\n\t\t\t\t\t\tsummaryStore.forSession(summary.sessionId)\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tlogger: log,\n\t\t\t});\n\t\t});\n\n\t\t// Register ReasoningStrategy as a lazy singleton (selected via feature flag)\n\t\tcontainer.register('reasoningStrategy', () =>\n\t\t\tcreateReasoningStrategy(config.features.reasoningStrategy)\n\t\t);\n\n\t\t// Register SessionLock as a lazy singleton (always registered;\n\t\t// serializes ThoughtProcessor.process() per-session).\n\t\tcontainer.register('sessionLock', () => new SessionLock());\n\t\tcontainer.register('sessionLifecycle', () => new SessionLifecycleCoordinator());\n\n\t\tToolAwareSequentialThinkingServer._registerHistoryManager(container);\n\t\tToolAwareSequentialThinkingServer._registerThoughtPipeline(container, config);\n\n\t\treturn container;\n\t}\n\n\tprivate static _resolveEffectiveConfig(\n\t\toptions: ServerOptions,\n\t\tfileConfig: ConfigFileOptions | null\n\t): ServerConfig {\n\t\tif (options.config) return options.config;\n\t\tconst loadedOptions = new ConfigLoader().toServerConfigOptions(fileConfig ?? {});\n\t\treturn new ServerConfig({\n\t\t\t...loadedOptions,\n\t\t\tmaxHistorySize: options.maxHistorySize ?? loadedOptions.maxHistorySize,\n\t\t\tmaxBranches: options.maxBranches ?? loadedOptions.maxBranches,\n\t\t\tmaxBranchSize: options.maxBranchSize ?? loadedOptions.maxBranchSize,\n\t\t});\n\t}\n\n\tprivate static _registerDiscoveryRegistries(\n\t\tcontainer: Container,\n\t\tlazyDiscovery: ServerOptions['lazyDiscovery']\n\t): void {\n\t\tconst logger = container.resolve('Logger');\n\t\tconst config = container.resolve('Config');\n\t\tconst metrics = container.resolve('Metrics');\n\n\t\tcontainer.register(\n\t\t\t'ToolRegistry',\n\t\t\t() =>\n\t\t\t\tnew ToolRegistry({\n\t\t\t\t\tlogger,\n\t\t\t\t\tcache: config.discoveryCache\n\t\t\t\t\t\t? new DiscoveryCache({ ...config.discoveryCache, metrics })\n\t\t\t\t\t\t: undefined,\n\t\t\t\t\ttoolDirs: config.toolDirs,\n\t\t\t\t\tlazyDiscovery,\n\t\t\t\t})\n\t\t);\n\t\tcontainer.register(\n\t\t\t'SkillRegistry',\n\t\t\t() =>\n\t\t\t\tnew SkillRegistry({\n\t\t\t\t\tlogger,\n\t\t\t\t\tcache: config.discoveryCache\n\t\t\t\t\t\t? new DiscoveryCache({ ...config.discoveryCache, metrics })\n\t\t\t\t\t\t: undefined,\n\t\t\t\t\tskillDirs: config.skillDirs,\n\t\t\t\t\tlazyDiscovery,\n\t\t\t\t})\n\t\t);\n\t}\n\n\tprivate static _registerHistoryManager(container: Container): void {\n\t\t// Register HistoryManager with lazy initialization\n\t\tcontainer.register('HistoryManager', () => {\n\t\t\tconst cfg = container.resolve('Config');\n\t\t\tconst log = container.resolve('Logger');\n\t\t\tconst pers = container.resolve('Persistence');\n\t\t\tconst componentMetrics = container.resolve('Metrics');\n\t\t\tconst edgeStore = container.resolve('EdgeStore');\n\t\t\tconst summaryStore = container.resolve('summaryStore');\n\t\t\treturn new HistoryManager({\n\t\t\t\tmaxHistorySize: cfg.maxHistorySize,\n\t\t\t\tmaxBranches: cfg.maxBranches,\n\t\t\t\tmaxBranchSize: cfg.maxBranchSize,\n\t\t\t\tlogger: log,\n\t\t\t\tpersistence: pers,\n\t\t\t\tmetrics: componentMetrics,\n\t\t\t\tpersistenceBufferSize: cfg.persistenceBufferSize,\n\t\t\t\tpersistenceFlushInterval: cfg.persistenceFlushInterval,\n\t\t\t\tpersistenceMaxRetries: cfg.persistenceMaxRetries,\n\t\t\t\tedgeStore,\n\t\t\t\tsummaryStore,\n\t\t\t\tdagEdges: cfg.features.dagEdges,\n\t\t\t\tmaxSessionsPerOwner: cfg.maxSessionsPerOwner,\n\t\t\t\tsessionLock: container.resolve('sessionLock'),\n\t\t\t\tlifecycleCoordinator: container.resolve('sessionLifecycle'),\n\t\t\t\tclearSessionAuxiliaryState: (sessionId) =>\n\t\t\t\t\tcontainer.resolve('ThoughtProcessor').clearSessionAuxiliaryState(sessionId),\n\t\t\t\tclearAllAuxiliaryState: () =>\n\t\t\t\t\tcontainer.resolve('ThoughtProcessor').clearAllAuxiliaryState(),\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate static _registerThoughtPipeline(container: Container, config: ServerConfig): void {\n\t\t// Register ThoughtFormatter (can be transient)\n\t\tcontainer.registerFactory('ThoughtFormatter', () => new ThoughtFormatter());\n\n\t\t// Register OutcomeRecorder as a lazy singleton (gated by feature flag)\n\t\tcontainer.register(\n\t\t\t'outcomeRecorder',\n\t\t\t() => new OutcomeRecorder({ enabled: config.features.outcomeRecording ?? false })\n\t\t);\n\n\t\t// Register Calibrator as a lazy singleton (gated by feature flag)\n\t\tcontainer.register(\n\t\t\t'calibrator',\n\t\t\t() =>\n\t\t\t\tnew Calibrator(container.resolve('outcomeRecorder'), config.features.calibration ?? false)\n\t\t);\n\n\t\t// Register ThoughtEvaluator (stateless, transient) with injected calibrator\n\t\tcontainer.registerFactory(\n\t\t\t'ThoughtEvaluator',\n\t\t\t() => new ThoughtEvaluator(container.resolve('calibrator'))\n\t\t);\n\n\t\t// Register ThoughtProcessor\n\t\tcontainer.register('ThoughtProcessor', () => {\n\t\t\tconst history = container.resolve('HistoryManager');\n\t\t\tconst formatter = container.resolve('ThoughtFormatter');\n\t\t\tconst evaluator = container.resolve('ThoughtEvaluator');\n\t\t\tconst log = container.resolve('Logger');\n\t\t\tconst strategy = container.resolve('reasoningStrategy');\n\t\t\tconst compressionService = config.features.compression\n\t\t\t\t? container.resolve('compressionService')\n\t\t\t\t: undefined;\n\t\t\tconst suspensionStore = config.features.toolInterleave\n\t\t\t\t? container.resolve('suspensionStore')\n\t\t\t\t: undefined;\n\t\t\tconst toolRegistry = container.resolve('ToolRegistry');\n\t\t\tconst sessionLock = container.resolve('sessionLock');\n\t\t\treturn new ThoughtProcessor(\n\t\t\t\thistory,\n\t\t\t\tformatter,\n\t\t\t\tevaluator,\n\t\t\t\tlog,\n\t\t\t\tstrategy,\n\t\t\t\tcompressionService,\n\t\t\t\tsuspensionStore,\n\t\t\t\ttoolRegistry,\n\t\t\t\tconfig.features,\n\t\t\t\tsessionLock,\n\t\t\t\tcontainer.resolve('outcomeRecorder'),\n\t\t\t\tcontainer.resolve('sessionLifecycle'),\n\t\t\t\tcontainer.resolve('calibrator')\n\t\t\t);\n\t\t});\n\t}\n\n\t/**\n\t * Create and configure the DI container with async persistence initialization.\n\t * This is used internally by the static create() factory.\n\t */\n\tprivate static async _createContainerAsyncStatic(options: ServerOptions): Promise<Container> {\n\t\tlet fileConfig: ConfigFileOptions | null;\n\t\tlet config: ServerConfig;\n\t\tif (options.config) {\n\t\t\tfileConfig = options.fileConfig ?? null;\n\t\t\tconfig = options.config;\n\t\t} else {\n\t\t\tconst configLoader = new ConfigLoader();\n\t\t\tfileConfig =\n\t\t\t\toptions.fileConfig === undefined\n\t\t\t\t\t? configLoader.load()\n\t\t\t\t\t: configLoader.applyEnvironmentOverrides(options.fileConfig);\n\t\t\tconfig = ToolAwareSequentialThinkingServer._resolveEffectiveConfig(options, fileConfig);\n\t\t}\n\n\t\tlet persistence: PersistenceBackend | null = null;\n\t\ttry {\n\t\t\tpersistence = await createPersistenceBackend(config.persistence);\n\t\t\treturn ToolAwareSequentialThinkingServer._createContainerCore(\n\t\t\t\t{ ...options, config },\n\t\t\t\tfileConfig,\n\t\t\t\tpersistence\n\t\t\t);\n\t\t} catch (error) {\n\t\t\tconst acquiredPersistence = persistence;\n\t\t\tconst cleanupFailures =\n\t\t\t\tacquiredPersistence === null\n\t\t\t\t\t? []\n\t\t\t\t\t: await collectCleanupFailures([() => acquiredPersistence.close()]);\n\t\t\tif (cleanupFailures.length > 0) {\n\t\t\t\tthrow new AggregateError(\n\t\t\t\t\t[error, ...cleanupFailures],\n\t\t\t\t\t'Container construction failed and cleanup also failed',\n\t\t\t\t\t{ cause: error }\n\t\t\t\t);\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\t/**\n\t * Get the DI container used by this server\n\t * Useful for testing and advanced customizations\n\t */\n\tpublic getContainer(): Container {\n\t\treturn this._container;\n\t}\n\n\t/**\n\t * Discover skills asynchronously without blocking server startup.\n\t * This is the recommended method for skill discovery.\n\t * @returns Promise<number> - The number of skills discovered\n\t */\n\tpublic async discoverSkillsAsync(): Promise<number> {\n\t\tconst discovered = await this.skills.discoverAsync();\n\t\treturn discovered;\n\t}\n\n\t/**\n\t * Get all branches from the history manager\n\t * @returns Record<string, ThoughtData[]> - Map of branch IDs to thought arrays\n\t */\n\tpublic getBranches(): Record<BranchId, ThoughtData[]> {\n\t\treturn this._historyManager.getBranches();\n\t}\n\n\t// Main processing method - delegate to ThoughtProcessor\n\tpublic async processThought(input: v.InferInput<typeof SequentialThinkingSchema>) {\n\t\tconst startTime = Date.now();\n\t\tconst result = await this._thoughtProcessor.process(input as ThoughtData);\n\t\tconst durationSeconds = (Date.now() - startTime) / 1000;\n\t\tthis._metrics.histogram('thought_processing_duration_seconds', durationSeconds, {});\n\t\treturn result;\n\t}\n\n\tpublic getMetricsSnapshot(): string {\n\t\treturn this._metrics.export();\n\t}\n\n\t/**\n\t * Stop the server and clean up watchers.\n\t * Closes persistence backend gracefully to ensure data is flushed.\n\t */\n\tpublic stop(): Promise<void> {\n\t\tif (this._stopPromise) return this._stopPromise;\n\t\tthis._stopPromise = this._container.resolve('sessionLifecycle').shutdown(async () => {\n\t\t\tconst failures: unknown[] = [];\n\t\t\tconst watcherResults = await Promise.allSettled([\n\t\t\t\tthis._skillWatcher?.stop() ?? Promise.resolve(),\n\t\t\t\tthis._toolWatcher?.stop() ?? Promise.resolve(),\n\t\t\t]);\n\t\t\tfor (const result of watcherResults) {\n\t\t\t\tswitch (result.status) {\n\t\t\t\t\tcase 'fulfilled':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'rejected':\n\t\t\t\t\t\tappendCleanupFailure(failures, result.reason);\n\t\t\t\t\t\tthis._logger.error('Error stopping watcher', {\n\t\t\t\t\t\t\terror: getErrorMessage(result.reason),\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tassertNever(result);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Stop suspension store sweeper if registered\n\t\t\tif (this._config.features.toolInterleave && this._container.has('suspensionStore')) {\n\t\t\t\ttry {\n\t\t\t\t\tconst suspensionStore = this._container.resolve('suspensionStore');\n\t\t\t\t\tsuspensionStore.stop();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tappendCleanupFailure(failures, error);\n\t\t\t\t\tthis._logger.error('Error stopping suspension store', {\n\t\t\t\t\t\terror: getErrorMessage(error),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Flush any buffered writes before closing persistence\n\t\t\ttry {\n\t\t\t\tawait this._historyManager.shutdownWithinLifecycle();\n\t\t\t} catch (error) {\n\t\t\t\tappendCleanupFailure(failures, error);\n\t\t\t\tthis._logger.error('Error flushing write buffer during shutdown', {\n\t\t\t\t\terror: getErrorMessage(error),\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Close persistence backend if available\n\t\t\tconst persistence = this._container.resolve('Persistence');\n\t\t\tif (persistence) {\n\t\t\t\ttry {\n\t\t\t\t\tawait persistence.close();\n\t\t\t\t\tthis._logger.info('Persistence backend closed');\n\t\t\t\t} catch (error) {\n\t\t\t\t\tappendCleanupFailure(failures, error);\n\t\t\t\t\tthis._logger.error('Error closing persistence backend', {\n\t\t\t\t\t\terror: getErrorMessage(error),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (failures.length > 0) {\n\t\t\t\tthrow new AggregateError(failures, 'Failed to stop server cleanly');\n\t\t\t}\n\t\t\tthis._historyManager.clearLiveStateAfterShutdown();\n\t\t\tthis._logger.info('Server stopped, watchers cleaned up');\n\t\t});\n\t\treturn this._stopPromise;\n\t}\n\n\t/**\n\t * Clear all server state (history, tools, skills)\n\t * Useful for testing to reset state between tests\n\t */\n\tpublic clear(): void {\n\t\tthis._historyManager.clear();\n\t\tthis._logger.info('Server state cleared');\n\t}\n\n\t/** Awaitably resets one session and matching processor-owned state. */\n\tpublic async resetSession(sessionId: string): Promise<void> {\n\t\tawait this._thoughtProcessor.resetSession(sessionId);\n\t\tthis._logger.info('Server session reset', { sessionId });\n\t}\n\n\t/** Awaitably resets all server state from a trusted ownerless context. */\n\tpublic async resetAll(): Promise<void> {\n\t\tawait this._thoughtProcessor.resetAll();\n\t\tthis._logger.info('All server sessions reset');\n\t}\n\n\t/**\n\t * Dispose of the server and all container services.\n\t * Implements the IDisposable interface.\n\t * Calls stop() for existing cleanup, then disposes the DI container.\n\t */\n\tpublic dispose(): Promise<void> {\n\t\tif (this._disposePromise) return this._disposePromise;\n\t\tthis._disposePromise = (async () => {\n\t\t\tconst failures = await collectCleanupFailures([\n\t\t\t\t() => this.stop(),\n\t\t\t\t() => this._container.dispose(),\n\t\t\t]);\n\t\t\tif (failures.length > 0) {\n\t\t\t\tthrow new AggregateError(failures, 'Failed to dispose server cleanly');\n\t\t\t}\n\t\t\tthis._logger.info('Server disposed, all resources released');\n\t\t})();\n\t\treturn this._disposePromise;\n\t}\n}\n\n/**\n * Factory function to create a new server instance with async initialization.\n *\n * This is the recommended way to create server instances, especially for testing,\n * as it allows for proper async initialization, dependency injection, and persistence.\n *\n * @param options - Server configuration options\n * @returns A Promise that resolves to a configured server instance\n *\n * @example\n * ```typescript\n * // Basic usage (with async discovery and persistence)\n * const server = await createServer();\n *\n * // With custom options\n * const server = await createServer({\n * autoDiscover: false,\n * lazyDiscovery: true,\n * maxHistorySize: 500,\n * loadFromPersistence: true\n * });\n *\n * // With custom container for testing\n * const mockContainer = new Container();\n * mockContainer.registerInstance('Logger', mockLogger);\n * const server = await createServer({ container: mockContainer });\n * ```\n */\nexport async function createServer(\n\toptions: ServerOptions = {}\n): Promise<ToolAwareSequentialThinkingServer> {\n\treturn ToolAwareSequentialThinkingServer.create(options);\n}\n\n// Initialize server\nexport async function initializeServer(): Promise<ToolAwareSequentialThinkingServer> {\n\t// Create logger for initialization\n\tconst configLoader = new ConfigLoader();\n\tconst fileConfig = configLoader.load() ?? {};\n\tconst config = new ServerConfig(configLoader.toServerConfigOptions(fileConfig));\n\n\tconst logger = new StructuredLogger({\n\t\tlevel: fileConfig.logLevel ?? 'info',\n\t\tcontext: 'SequentialThinking',\n\t\tpretty: fileConfig.prettyLog ?? true,\n\t});\n\n\t// Create server instance\n\tconst thinkingServer = await createServer({\n\t\tlogger,\n\t\tenableWatcher: true,\n\t\tconfig,\n\t\tfileConfig,\n\t});\n\n\tlogger.info('Server initialized successfully');\n\treturn thinkingServer;\n}\n"],"names":["appendCleanupFailure","failures","failure","AggregateError","collectCleanupFailures","operations","operation","error","ToolAwareSequentialThinkingServer","EventEmitter","options","container","server","Promise","startedServer","cleanupFailures","event","payload","listener","Error","SEQUENTIAL_THINKING_TOOL","SkillWatcher","ToolWatcher","fileConfig","persistence","Container","metrics","Metrics","config","logger","StructuredLogger","EdgeStore","InMemorySummaryStore","store","InMemorySuspensionStore","historyManager","edgeStore","summaryStore","log","CompressionService","summary","createReasoningStrategy","SessionLock","SessionLifecycleCoordinator","loadedOptions","ConfigLoader","ServerConfig","lazyDiscovery","ToolRegistry","DiscoveryCache","undefined","SkillRegistry","cfg","pers","componentMetrics","HistoryManager","sessionId","ThoughtFormatter","OutcomeRecorder","Calibrator","ThoughtEvaluator","history","formatter","evaluator","strategy","compressionService","suspensionStore","toolRegistry","sessionLock","ThoughtProcessor","configLoader","createPersistenceBackend","acquiredPersistence","discovered","input","startTime","Date","result","durationSeconds","watcherResults","getErrorMessage","assertNever","createServer","initializeServer","thinkingServer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FA,SAASA,qBAAqBC,QAAmB,EAAEC,OAAgB;IAClE,IAAIA,mBAAmBC,gBAAgB,YACtCF,SAAS,IAAI,IAAIC,QAAQ,MAAM;IAGhCD,SAAS,IAAI,CAACC;AACf;AAEA,eAAeE,uBAAuBC,UAAuC;IAC5E,MAAMJ,WAAsB,EAAE;IAC9B,KAAK,MAAMK,aAAaD,WACvB,IAAI;QACH,MAAMC;IACP,EAAE,OAAOC,OAAO;QACfP,qBAAqBC,UAAUM;IAChC;IAED,OAAON;AACR;AA6EO,MAAMO,0CACJC;IAUR,aAAa,OAAOC,UAAyB,CAAC,CAAC,EAA8C;QAC5F,MAAMC,YAAY,MAAMH,kCAAkC,2BAA2B,CAACE;QACtF,IAAIE;QACJ,IAAI;YACHA,SAAS,IAAIJ,kCAAkC;gB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OAAOuD;AACR"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Null logger that discards all log messages.
|
|
3
|
+
*
|
|
4
|
+
* This logger implements the same interface as `StructuredLogger` but
|
|
5
|
+
* silently discards all log messages. It's useful as a default/fallback
|
|
6
|
+
* logger when logging is disabled or when no logger is provided.
|
|
7
|
+
*
|
|
8
|
+
* @module logger
|
|
9
|
+
*/
|
|
10
|
+
import type { LogLevel, Logger, LoggerOptions } from './StructuredLogger.js';
|
|
11
|
+
/**
|
|
12
|
+
* Null logger that discards all log messages.
|
|
13
|
+
*
|
|
14
|
+
* This class provides a no-op implementation of the logger interface.
|
|
15
|
+
* All method calls are silent and have no effect, making it suitable
|
|
16
|
+
* for use as a default logger when logging is disabled or not needed.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* The `NullLogger` implements the same interface as `StructuredLogger`,
|
|
20
|
+
* making them interchangeable. Use `NullLogger` when:
|
|
21
|
+
* - You want to disable logging completely
|
|
22
|
+
* - You need a logger placeholder that can be swapped later
|
|
23
|
+
* - Testing components that don't need output
|
|
24
|
+
* - Reducing overhead in performance-critical sections
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* import { NullLogger } from './logger/index.js';
|
|
29
|
+
*
|
|
30
|
+
* // Create a null logger
|
|
31
|
+
* const logger = new NullLogger();
|
|
32
|
+
*
|
|
33
|
+
* // All log calls are silently discarded
|
|
34
|
+
* logger.debug('This will not appear');
|
|
35
|
+
* logger.info('Nor will this');
|
|
36
|
+
* logger.warn('Or this warning');
|
|
37
|
+
* logger.error('Or even this error');
|
|
38
|
+
*
|
|
39
|
+
* // Methods exist for compatibility but have no effect
|
|
40
|
+
* logger.setLevel('debug');
|
|
41
|
+
* const level = logger.getLevel(); // Returns 'error' (default)
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare class NullLogger implements Logger {
|
|
45
|
+
/**
|
|
46
|
+
* Current minimum log level.
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* Since all messages are discarded, the level setting has no practical
|
|
50
|
+
* effect. This property exists only for interface compatibility.
|
|
51
|
+
* @private
|
|
52
|
+
*/
|
|
53
|
+
private _level;
|
|
54
|
+
/**
|
|
55
|
+
* Creates a new NullLogger instance.
|
|
56
|
+
*
|
|
57
|
+
* @param options - Configuration options (ignored, but accepted for interface compatibility)
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```typescript
|
|
61
|
+
* // Create a null logger
|
|
62
|
+
* const logger1 = new NullLogger();
|
|
63
|
+
*
|
|
64
|
+
* // With options (ignored)
|
|
65
|
+
* const logger2 = new NullLogger({
|
|
66
|
+
* level: 'debug',
|
|
67
|
+
* context: 'MyApp',
|
|
68
|
+
* pretty: true
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
constructor(options?: LoggerOptions);
|
|
73
|
+
/**
|
|
74
|
+
* Log a debug message (no-op).
|
|
75
|
+
*
|
|
76
|
+
* This method exists for interface compatibility but does nothing.
|
|
77
|
+
*
|
|
78
|
+
* @param _message - Ignored
|
|
79
|
+
* @param _meta - Ignored
|
|
80
|
+
*/
|
|
81
|
+
debug(_message: string, _meta?: Record<string, unknown>): void;
|
|
82
|
+
/**
|
|
83
|
+
* Log an info message (no-op).
|
|
84
|
+
*
|
|
85
|
+
* This method exists for interface compatibility but does nothing.
|
|
86
|
+
*
|
|
87
|
+
* @param _message - Ignored
|
|
88
|
+
* @param _meta - Ignored
|
|
89
|
+
*/
|
|
90
|
+
info(_message: string, _meta?: Record<string, unknown>): void;
|
|
91
|
+
/**
|
|
92
|
+
* Log a warning message (no-op).
|
|
93
|
+
*
|
|
94
|
+
* This method exists for interface compatibility but does nothing.
|
|
95
|
+
*
|
|
96
|
+
* @param _message - Ignored
|
|
97
|
+
* @param _meta - Ignored
|
|
98
|
+
*/
|
|
99
|
+
warn(_message: string, _meta?: Record<string, unknown>): void;
|
|
100
|
+
/**
|
|
101
|
+
* Log an error message (no-op).
|
|
102
|
+
*
|
|
103
|
+
* This method exists for interface compatibility but does nothing.
|
|
104
|
+
*
|
|
105
|
+
* @param _message - Ignored
|
|
106
|
+
* @param _meta - Ignored
|
|
107
|
+
*/
|
|
108
|
+
error(_message: string, _meta?: Record<string, unknown>): void;
|
|
109
|
+
/**
|
|
110
|
+
* Sets the minimum log level (no-op).
|
|
111
|
+
*
|
|
112
|
+
* This method exists for interface compatibility but has no effect
|
|
113
|
+
* since all messages are discarded anyway.
|
|
114
|
+
*
|
|
115
|
+
* @param level - The new minimum log level (ignored)
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```typescript
|
|
119
|
+
* logger.setLevel('debug'); // No effect
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
setLevel(level: LogLevel): void;
|
|
123
|
+
/**
|
|
124
|
+
* Gets the current minimum log level.
|
|
125
|
+
*
|
|
126
|
+
* @returns The current log level (stored value, unused)
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```typescript
|
|
130
|
+
* const currentLevel = logger.getLevel();
|
|
131
|
+
* console.log(`Current level: ${currentLevel}`); // 'error' by default
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
getLevel(): LogLevel;
|
|
135
|
+
/**
|
|
136
|
+
* Creates a child null logger (returns a new NullLogger).
|
|
137
|
+
*
|
|
138
|
+
* This method exists for interface compatibility. It returns a new
|
|
139
|
+
* `NullLogger` instance (not a child with extended context) since
|
|
140
|
+
* context tracking is not applicable for a no-op logger.
|
|
141
|
+
*
|
|
142
|
+
* @param _context - Additional context (ignored)
|
|
143
|
+
* @returns A new NullLogger instance
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```typescript
|
|
147
|
+
* const nullLogger = new NullLogger();
|
|
148
|
+
* const childLogger = nullLogger.createChild('ChildModule');
|
|
149
|
+
* // childLogger is also a NullLogger
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
createChild(_context: string): NullLogger;
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=NullLogger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NullLogger.d.ts","sourceRoot":"","sources":["../../src/logger/NullLogger.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAAa,UAAW,YAAW,MAAM;IACxC;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAW;IAEzB;;;;;;;;;;;;;;;;;OAiBG;gBACS,OAAO,GAAE,aAAkB;IAIvC;;;;;;;OAOG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAE9D;;;;;;;OAOG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAE7D;;;;;;;OAOG;IACH,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAE7D;;;;;;;OAOG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAE9D;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAI/B;;;;;;;;;;OAUG;IACH,QAAQ,IAAI,QAAQ;IAIpB;;;;;;;;;;;;;;;;OAgBG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU;CAGzC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
class NullLogger {
|
|
2
|
+
_level;
|
|
3
|
+
constructor(options = {}){
|
|
4
|
+
this._level = options.level ?? 'error';
|
|
5
|
+
}
|
|
6
|
+
debug(_message, _meta) {}
|
|
7
|
+
info(_message, _meta) {}
|
|
8
|
+
warn(_message, _meta) {}
|
|
9
|
+
error(_message, _meta) {}
|
|
10
|
+
setLevel(level) {
|
|
11
|
+
this._level = level;
|
|
12
|
+
}
|
|
13
|
+
getLevel() {
|
|
14
|
+
return this._level;
|
|
15
|
+
}
|
|
16
|
+
createChild(_context) {
|
|
17
|
+
return new NullLogger({
|
|
18
|
+
level: this._level
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export { NullLogger };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=NullLogger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger/NullLogger.js","sources":["../../src/logger/NullLogger.ts"],"sourcesContent":["/**\n * Null logger that discards all log messages.\n *\n * This logger implements the same interface as `StructuredLogger` but\n * silently discards all log messages. It's useful as a default/fallback\n * logger when logging is disabled or when no logger is provided.\n *\n * @module logger\n */\n\nimport type { LogLevel, Logger, LoggerOptions } from './StructuredLogger.js';\n\n/**\n * Null logger that discards all log messages.\n *\n * This class provides a no-op implementation of the logger interface.\n * All method calls are silent and have no effect, making it suitable\n * for use as a default logger when logging is disabled or not needed.\n *\n * @remarks\n * The `NullLogger` implements the same interface as `StructuredLogger`,\n * making them interchangeable. Use `NullLogger` when:\n * - You want to disable logging completely\n * - You need a logger placeholder that can be swapped later\n * - Testing components that don't need output\n * - Reducing overhead in performance-critical sections\n *\n * @example\n * ```typescript\n * import { NullLogger } from './logger/index.js';\n *\n * // Create a null logger\n * const logger = new NullLogger();\n *\n * // All log calls are silently discarded\n * logger.debug('This will not appear');\n * logger.info('Nor will this');\n * logger.warn('Or this warning');\n * logger.error('Or even this error');\n *\n * // Methods exist for compatibility but have no effect\n * logger.setLevel('debug');\n * const level = logger.getLevel(); // Returns 'error' (default)\n * ```\n */\nexport class NullLogger implements Logger {\n\t/**\n\t * Current minimum log level.\n\t *\n\t * @remarks\n\t * Since all messages are discarded, the level setting has no practical\n\t * effect. This property exists only for interface compatibility.\n\t * @private\n\t */\n\tprivate _level: LogLevel;\n\n\t/**\n\t * Creates a new NullLogger instance.\n\t *\n\t * @param options - Configuration options (ignored, but accepted for interface compatibility)\n\t *\n\t * @example\n\t * ```typescript\n\t * // Create a null logger\n\t * const logger1 = new NullLogger();\n\t *\n\t * // With options (ignored)\n\t * const logger2 = new NullLogger({\n\t * level: 'debug',\n\t * context: 'MyApp',\n\t * pretty: true\n\t * });\n\t * ```\n\t */\n\tconstructor(options: LoggerOptions = {}) {\n\t\tthis._level = options.level ?? 'error';\n\t}\n\n\t/**\n\t * Log a debug message (no-op).\n\t *\n\t * This method exists for interface compatibility but does nothing.\n\t *\n\t * @param _message - Ignored\n\t * @param _meta - Ignored\n\t */\n\tdebug(_message: string, _meta?: Record<string, unknown>): void {}\n\n\t/**\n\t * Log an info message (no-op).\n\t *\n\t * This method exists for interface compatibility but does nothing.\n\t *\n\t * @param _message - Ignored\n\t * @param _meta - Ignored\n\t */\n\tinfo(_message: string, _meta?: Record<string, unknown>): void {}\n\n\t/**\n\t * Log a warning message (no-op).\n\t *\n\t * This method exists for interface compatibility but does nothing.\n\t *\n\t * @param _message - Ignored\n\t * @param _meta - Ignored\n\t */\n\twarn(_message: string, _meta?: Record<string, unknown>): void {}\n\n\t/**\n\t * Log an error message (no-op).\n\t *\n\t * This method exists for interface compatibility but does nothing.\n\t *\n\t * @param _message - Ignored\n\t * @param _meta - Ignored\n\t */\n\terror(_message: string, _meta?: Record<string, unknown>): void {}\n\n\t/**\n\t * Sets the minimum log level (no-op).\n\t *\n\t * This method exists for interface compatibility but has no effect\n\t * since all messages are discarded anyway.\n\t *\n\t * @param level - The new minimum log level (ignored)\n\t *\n\t * @example\n\t * ```typescript\n\t * logger.setLevel('debug'); // No effect\n\t * ```\n\t */\n\tsetLevel(level: LogLevel): void {\n\t\tthis._level = level;\n\t}\n\n\t/**\n\t * Gets the current minimum log level.\n\t *\n\t * @returns The current log level (stored value, unused)\n\t *\n\t * @example\n\t * ```typescript\n\t * const currentLevel = logger.getLevel();\n\t * console.log(`Current level: ${currentLevel}`); // 'error' by default\n\t * ```\n\t */\n\tgetLevel(): LogLevel {\n\t\treturn this._level;\n\t}\n\n\t/**\n\t * Creates a child null logger (returns a new NullLogger).\n\t *\n\t * This method exists for interface compatibility. It returns a new\n\t * `NullLogger` instance (not a child with extended context) since\n\t * context tracking is not applicable for a no-op logger.\n\t *\n\t * @param _context - Additional context (ignored)\n\t * @returns A new NullLogger instance\n\t *\n\t * @example\n\t * ```typescript\n\t * const nullLogger = new NullLogger();\n\t * const childLogger = nullLogger.createChild('ChildModule');\n\t * // childLogger is also a NullLogger\n\t * ```\n\t */\n\tcreateChild(_context: string): NullLogger {\n\t\treturn new NullLogger({ level: this._level });\n\t}\n}\n"],"names":["NullLogger","options","_message","_meta","level","_context"],"mappings":"AA6CO,MAAMA;IASJ,OAAiB;IAoBzB,YAAYC,UAAyB,CAAC,CAAC,CAAE;QACxC,IAAI,CAAC,MAAM,GAAGA,QAAQ,KAAK,IAAI;IAChC;IAUA,MAAMC,QAAgB,EAAEC,KAA+B,EAAQ,CAAC;IAUhE,KAAKD,QAAgB,EAAEC,KAA+B,EAAQ,CAAC;IAU/D,KAAKD,QAAgB,EAAEC,KAA+B,EAAQ,CAAC;IAU/D,MAAMD,QAAgB,EAAEC,KAA+B,EAAQ,CAAC;IAehE,SAASC,KAAe,EAAQ;QAC/B,IAAI,CAAC,MAAM,GAAGA;IACf;IAaA,WAAqB;QACpB,OAAO,IAAI,CAAC,MAAM;IACnB;IAmBA,YAAYC,QAAgB,EAAc;QACzC,OAAO,IAAIL,WAAW;YAAE,OAAO,IAAI,CAAC,MAAM;QAAC;IAC5C;AACD"}
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight structured logging without external dependencies.
|
|
3
|
+
*
|
|
4
|
+
* This module provides a structured logging implementation that writes to stderr
|
|
5
|
+
* for MCP server compatibility. It supports multiple log levels, pretty printing,
|
|
6
|
+
* and hierarchical child loggers with inherited context.
|
|
7
|
+
*
|
|
8
|
+
* @module logger
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Log level severity ordering.
|
|
12
|
+
*
|
|
13
|
+
* Levels are ordered from least severe (debug) to most severe (error).
|
|
14
|
+
* Only messages at or above the configured level will be logged.
|
|
15
|
+
*/
|
|
16
|
+
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
17
|
+
/**
|
|
18
|
+
* Common logger interface for all logger implementations.
|
|
19
|
+
*
|
|
20
|
+
* This interface defines the contract that all loggers must implement,
|
|
21
|
+
* allowing them to be used interchangeably throughout the application.
|
|
22
|
+
*/
|
|
23
|
+
export interface Logger {
|
|
24
|
+
/**
|
|
25
|
+
* Log a debug message.
|
|
26
|
+
* @param message - The message to log
|
|
27
|
+
* @param meta - Optional structured metadata
|
|
28
|
+
*/
|
|
29
|
+
debug(message: string, meta?: Record<string, unknown>): void;
|
|
30
|
+
/**
|
|
31
|
+
* Log an info message.
|
|
32
|
+
* @param message - The message to log
|
|
33
|
+
* @param meta - Optional structured metadata
|
|
34
|
+
*/
|
|
35
|
+
info(message: string, meta?: Record<string, unknown>): void;
|
|
36
|
+
/**
|
|
37
|
+
* Log a warning message.
|
|
38
|
+
* @param message - The message to log
|
|
39
|
+
* @param meta - Optional structured metadata
|
|
40
|
+
*/
|
|
41
|
+
warn(message: string, meta?: Record<string, unknown>): void;
|
|
42
|
+
/**
|
|
43
|
+
* Log an error message.
|
|
44
|
+
* @param message - The message to log
|
|
45
|
+
* @param meta - Optional structured metadata
|
|
46
|
+
*/
|
|
47
|
+
error(message: string, meta?: Record<string, unknown>): void;
|
|
48
|
+
/**
|
|
49
|
+
* Sets the minimum log level.
|
|
50
|
+
* @param level - The new minimum log level
|
|
51
|
+
*/
|
|
52
|
+
setLevel(level: LogLevel): void;
|
|
53
|
+
/**
|
|
54
|
+
* Gets the current minimum log level.
|
|
55
|
+
* @returns The current log level
|
|
56
|
+
*/
|
|
57
|
+
getLevel(): LogLevel;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A single log entry with all relevant metadata.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* const entry: LogEntry = {
|
|
65
|
+
* level: 'info',
|
|
66
|
+
* message: 'Server started',
|
|
67
|
+
* timestamp: '2026-01-18T10:30:00.000Z',
|
|
68
|
+
* context: 'SequentialThinking',
|
|
69
|
+
* meta: { port: 3000 }
|
|
70
|
+
* };
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export interface LogEntry {
|
|
74
|
+
/** Severity level of the log entry. */
|
|
75
|
+
readonly level: LogLevel;
|
|
76
|
+
/** The primary log message. */
|
|
77
|
+
readonly message: string;
|
|
78
|
+
/** ISO 8601 timestamp of when the log was created. */
|
|
79
|
+
readonly timestamp: string;
|
|
80
|
+
/** Optional context/module name for categorization. */
|
|
81
|
+
readonly context?: string;
|
|
82
|
+
/** Optional request correlation ID for tracing. */
|
|
83
|
+
readonly requestId?: string;
|
|
84
|
+
/** Additional structured metadata to include with the log. */
|
|
85
|
+
readonly meta?: Record<string, unknown>;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Configuration options for creating a `StructuredLogger` instance.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```typescript
|
|
92
|
+
* const options: LoggerOptions = {
|
|
93
|
+
* level: 'debug',
|
|
94
|
+
* context: 'MyModule',
|
|
95
|
+
* pretty: true
|
|
96
|
+
* };
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
export interface LoggerOptions {
|
|
100
|
+
/**
|
|
101
|
+
* Minimum log level to output.
|
|
102
|
+
* Messages below this level will be suppressed.
|
|
103
|
+
* @default 'info'
|
|
104
|
+
*/
|
|
105
|
+
level?: LogLevel;
|
|
106
|
+
/**
|
|
107
|
+
* Default context for log messages.
|
|
108
|
+
* Can be extended with child loggers.
|
|
109
|
+
* @default 'SequentialThinking'
|
|
110
|
+
*/
|
|
111
|
+
context?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Whether to enable pretty (human-readable) output.
|
|
114
|
+
* When false, outputs JSON-formatted logs.
|
|
115
|
+
* @default true
|
|
116
|
+
*/
|
|
117
|
+
pretty?: boolean;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Structured logger with level filtering and context support.
|
|
121
|
+
*
|
|
122
|
+
* This logger provides structured logging capabilities with configurable
|
|
123
|
+
* output formats, log levels, and hierarchical context. All output is
|
|
124
|
+
* written to stderr for compatibility with MCP servers.
|
|
125
|
+
*
|
|
126
|
+
* @remarks
|
|
127
|
+
* **Log Level Priority** (lowest to highest):
|
|
128
|
+
* - `debug` (0) - Detailed debugging information
|
|
129
|
+
* - `info` (1) - General informational messages
|
|
130
|
+
* - `warn` (2) - Warning messages for potential issues
|
|
131
|
+
* - `error` (3) - Error messages for failures
|
|
132
|
+
*
|
|
133
|
+
* Only messages at or above the configured level will be output.
|
|
134
|
+
*
|
|
135
|
+
* **Output Formats:**
|
|
136
|
+
* - Pretty (default): `[timestamp] [LEVEL] [context] message {meta}`
|
|
137
|
+
* - JSON: `{"level":"info","message":"...","timestamp":"...","context":"...","meta":{...}}`
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```typescript
|
|
141
|
+
* // Create a logger
|
|
142
|
+
* const logger = new StructuredLogger({
|
|
143
|
+
* level: 'info',
|
|
144
|
+
* context: 'SequentialThinking',
|
|
145
|
+
* pretty: true
|
|
146
|
+
* });
|
|
147
|
+
*
|
|
148
|
+
* // Log messages
|
|
149
|
+
* logger.debug('Detailed debug info', { userId: '123' });
|
|
150
|
+
* logger.info('Server started', { port: 3000 });
|
|
151
|
+
* logger.warn('High memory usage', { usage: '85%' });
|
|
152
|
+
* logger.error('Connection failed', { error: 'ECONNREFUSED' });
|
|
153
|
+
*
|
|
154
|
+
* // Create a child logger with extended context
|
|
155
|
+
* const childLogger = logger.createChild('Database');
|
|
156
|
+
* childLogger.info('Query executed', { rows: 42 });
|
|
157
|
+
* // Output: [timestamp] [INFO] [SequentialThinking:Database] Query executed {"rows":42}
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
export declare class StructuredLogger {
|
|
161
|
+
/** Current minimum log level. */
|
|
162
|
+
private _level;
|
|
163
|
+
/** Default context for log messages. */
|
|
164
|
+
private _context;
|
|
165
|
+
/** Whether pretty printing is enabled. */
|
|
166
|
+
private _pretty;
|
|
167
|
+
/**
|
|
168
|
+
* Log level priority ordering for filtering.
|
|
169
|
+
* Higher numbers = higher severity.
|
|
170
|
+
* @private
|
|
171
|
+
*/
|
|
172
|
+
private static readonly LEVEL_PRIORITY;
|
|
173
|
+
/**
|
|
174
|
+
* Creates a new StructuredLogger instance.
|
|
175
|
+
*
|
|
176
|
+
* @param options - Configuration options for the logger
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```typescript
|
|
180
|
+
* // Default configuration
|
|
181
|
+
* const logger1 = new StructuredLogger();
|
|
182
|
+
*
|
|
183
|
+
* // Custom configuration
|
|
184
|
+
* const logger2 = new StructuredLogger({
|
|
185
|
+
* level: 'debug',
|
|
186
|
+
* context: 'MyApp',
|
|
187
|
+
* pretty: false // JSON output
|
|
188
|
+
* });
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
constructor(options?: LoggerOptions);
|
|
192
|
+
/**
|
|
193
|
+
* Determines whether a message at the given level should be logged.
|
|
194
|
+
* @param level - The log level to check
|
|
195
|
+
* @returns true if the level meets the threshold, false otherwise
|
|
196
|
+
* @private
|
|
197
|
+
*/
|
|
198
|
+
private shouldLog;
|
|
199
|
+
/**
|
|
200
|
+
* Formats a log entry for output.
|
|
201
|
+
* @param entry - The log entry to format
|
|
202
|
+
* @returns Formatted string representation
|
|
203
|
+
* @private
|
|
204
|
+
*/
|
|
205
|
+
private format;
|
|
206
|
+
/**
|
|
207
|
+
* Internal logging method that handles level filtering and output.
|
|
208
|
+
* @param level - The log level for this message
|
|
209
|
+
* @param message - The message to log
|
|
210
|
+
* @param meta - Optional structured metadata
|
|
211
|
+
* @private
|
|
212
|
+
*/
|
|
213
|
+
private log;
|
|
214
|
+
/**
|
|
215
|
+
* Log a debug message.
|
|
216
|
+
*
|
|
217
|
+
* Debug messages contain detailed information typically used for
|
|
218
|
+
* troubleshooting and development. Only output when log level is 'debug'.
|
|
219
|
+
*
|
|
220
|
+
* @param message - The message to log
|
|
221
|
+
* @param meta - Optional structured metadata
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* ```typescript
|
|
225
|
+
* logger.debug('Processing request', { path: '/api/users', method: 'GET' });
|
|
226
|
+
* ```
|
|
227
|
+
*/
|
|
228
|
+
debug(message: string, meta?: Record<string, unknown>): void;
|
|
229
|
+
/**
|
|
230
|
+
* Log an info message.
|
|
231
|
+
*
|
|
232
|
+
* Info messages contain general informational messages about normal operation.
|
|
233
|
+
* Output when log level is 'info' or lower.
|
|
234
|
+
*
|
|
235
|
+
* @param message - The message to log
|
|
236
|
+
* @param meta - Optional structured metadata
|
|
237
|
+
*
|
|
238
|
+
* @example
|
|
239
|
+
* ```typescript
|
|
240
|
+
* logger.info('Server started', { port: 3000, env: 'production' });
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
info(message: string, meta?: Record<string, unknown>): void;
|
|
244
|
+
/**
|
|
245
|
+
* Log a warning message.
|
|
246
|
+
*
|
|
247
|
+
* Warning messages indicate potential issues that don't prevent operation
|
|
248
|
+
* but may require attention. Output when log level is 'warn' or lower.
|
|
249
|
+
*
|
|
250
|
+
* @param message - The message to log
|
|
251
|
+
* @param meta - Optional structured metadata
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* ```typescript
|
|
255
|
+
* logger.warn('High memory usage detected', { usage: '85%', threshold: '80%' });
|
|
256
|
+
* ```
|
|
257
|
+
*/
|
|
258
|
+
warn(message: string, meta?: Record<string, unknown>): void;
|
|
259
|
+
/**
|
|
260
|
+
* Log an error message.
|
|
261
|
+
*
|
|
262
|
+
* Error messages indicate failures or error conditions. Always output
|
|
263
|
+
* regardless of log level setting.
|
|
264
|
+
*
|
|
265
|
+
* @param message - The message to log
|
|
266
|
+
* @param meta - Optional structured metadata
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* ```typescript
|
|
270
|
+
* logger.error('Database connection failed', { error: err.message, code: err.code });
|
|
271
|
+
* ```
|
|
272
|
+
*/
|
|
273
|
+
error(message: string, meta?: Record<string, unknown>): void;
|
|
274
|
+
/**
|
|
275
|
+
* Creates a child logger with inherited settings and extended context.
|
|
276
|
+
*
|
|
277
|
+
* Child loggers inherit the parent's log level and pretty print setting,
|
|
278
|
+
* but have their context appended to the parent's context for hierarchical logging.
|
|
279
|
+
*
|
|
280
|
+
* @param context - Additional context to append to the parent's context
|
|
281
|
+
* @returns A new logger instance with extended context
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* ```typescript
|
|
285
|
+
* const parentLogger = new StructuredLogger({ context: 'App' });
|
|
286
|
+
* const dbLogger = parentLogger.createChild('Database');
|
|
287
|
+
* const queryLogger = dbLogger.createChild('Query');
|
|
288
|
+
*
|
|
289
|
+
* parentLogger.info('Starting up');
|
|
290
|
+
* // Output: [timestamp] [INFO] [App] Starting up
|
|
291
|
+
*
|
|
292
|
+
* dbLogger.info('Connected');
|
|
293
|
+
* // Output: [timestamp] [INFO] [App:Database] Connected
|
|
294
|
+
*
|
|
295
|
+
* queryLogger.info('Executed in 5ms');
|
|
296
|
+
* // Output: [timestamp] [INFO] [App:Database:Query] Executed in 5ms
|
|
297
|
+
* ```
|
|
298
|
+
*/
|
|
299
|
+
createChild(context: string): StructuredLogger;
|
|
300
|
+
/**
|
|
301
|
+
* Sets the minimum log level.
|
|
302
|
+
*
|
|
303
|
+
* Only messages at or above this level will be output.
|
|
304
|
+
*
|
|
305
|
+
* @param level - The new minimum log level
|
|
306
|
+
*
|
|
307
|
+
* @example
|
|
308
|
+
* ```typescript
|
|
309
|
+
* logger.setLevel('debug'); // Enable all logging
|
|
310
|
+
* logger.setLevel('error'); // Only show errors
|
|
311
|
+
* ```
|
|
312
|
+
*/
|
|
313
|
+
setLevel(level: LogLevel): void;
|
|
314
|
+
/**
|
|
315
|
+
* Gets the current minimum log level.
|
|
316
|
+
*
|
|
317
|
+
* @returns The current log level
|
|
318
|
+
*
|
|
319
|
+
* @example
|
|
320
|
+
* ```typescript
|
|
321
|
+
* const currentLevel = logger.getLevel();
|
|
322
|
+
* console.log(`Current level: ${currentLevel}`);
|
|
323
|
+
* ```
|
|
324
|
+
*/
|
|
325
|
+
getLevel(): LogLevel;
|
|
326
|
+
}
|
|
327
|
+
//# sourceMappingURL=StructuredLogger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StructuredLogger.d.ts","sourceRoot":"","sources":["../../src/logger/StructuredLogger.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D;;;;;GAKG;AACH,MAAM,WAAW,MAAM;IACtB;;;;OAIG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAE7D;;;;OAIG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAE5D;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