cogmem 3.6.2
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/BENCHMARKS.md +62 -0
- package/CHANGELOG.md +215 -0
- package/CONCURRENT_ACCESS.md +27 -0
- package/CONTRIBUTING.md +32 -0
- package/LICENSE +21 -0
- package/MEMORY_ATLAS.md +101 -0
- package/MEMORY_MODEL.md +179 -0
- package/README.md +751 -0
- package/RECALL_EXPLAINABILITY.md +152 -0
- package/RELEASE_CHECKLIST.md +92 -0
- package/SECURITY.md +21 -0
- package/dist/adapters/MarkdownSourceLoader.d.ts +5 -0
- package/dist/adapters/MarkdownSourceLoader.js +19 -0
- package/dist/adapters/conversation/ConversationMarkdownAdapter.d.ts +9 -0
- package/dist/adapters/conversation/ConversationMarkdownAdapter.js +233 -0
- package/dist/adapters/hermes/HermesStateDbAdapter.d.ts +10 -0
- package/dist/adapters/hermes/HermesStateDbAdapter.js +268 -0
- package/dist/adapters/hermes/HermesWorkspaceProfile.d.ts +15 -0
- package/dist/adapters/hermes/HermesWorkspaceProfile.js +82 -0
- package/dist/adapters/index.d.ts +15 -0
- package/dist/adapters/index.js +12 -0
- package/dist/adapters/openclaw/OpenClawAdapterSupport.d.ts +14 -0
- package/dist/adapters/openclaw/OpenClawAdapterSupport.js +29 -0
- package/dist/adapters/openclaw/OpenClawDailyMemoryAdapter.d.ts +8 -0
- package/dist/adapters/openclaw/OpenClawDailyMemoryAdapter.js +35 -0
- package/dist/adapters/openclaw/OpenClawMemoryIndexAdapter.d.ts +8 -0
- package/dist/adapters/openclaw/OpenClawMemoryIndexAdapter.js +23 -0
- package/dist/adapters/openclaw/OpenClawPersonaAdapter.d.ts +8 -0
- package/dist/adapters/openclaw/OpenClawPersonaAdapter.js +24 -0
- package/dist/adapters/openclaw/OpenClawSessionAdapter.d.ts +8 -0
- package/dist/adapters/openclaw/OpenClawSessionAdapter.js +15 -0
- package/dist/adapters/openclaw/OpenClawUserProfileAdapter.d.ts +8 -0
- package/dist/adapters/openclaw/OpenClawUserProfileAdapter.js +24 -0
- package/dist/adapters/openclaw/OpenClawWorkspaceProfile.d.ts +38 -0
- package/dist/adapters/openclaw/OpenClawWorkspaceProfile.js +199 -0
- package/dist/adapters/soul/SoulMarkdownAdapter.d.ts +14 -0
- package/dist/adapters/soul/SoulMarkdownAdapter.js +255 -0
- package/dist/adapters/types.d.ts +97 -0
- package/dist/adapters/types.js +185 -0
- package/dist/agent/AgentMemoryBackend.d.ts +291 -0
- package/dist/agent/AgentMemoryBackend.js +1272 -0
- package/dist/agent/AgentRecallQueryCompiler.d.ts +20 -0
- package/dist/agent/AgentRecallQueryCompiler.js +289 -0
- package/dist/agent/ContextHygiene.d.ts +9 -0
- package/dist/agent/ContextHygiene.js +20 -0
- package/dist/agent/MemoryUsageReceipt.d.ts +35 -0
- package/dist/agent/MemoryUsageReceipt.js +136 -0
- package/dist/agent/SessionWorkingState.d.ts +20 -0
- package/dist/agent/SessionWorkingState.js +94 -0
- package/dist/agent/index.d.ts +6 -0
- package/dist/agent/index.js +5 -0
- package/dist/algorithm/AlgorithmReviewBackend.d.ts +84 -0
- package/dist/algorithm/AlgorithmReviewBackend.js +261 -0
- package/dist/algorithm/AlgorithmReviewMetrics.d.ts +23 -0
- package/dist/algorithm/AlgorithmReviewMetrics.js +25 -0
- package/dist/algorithm/Phase2ModelAlgorithmReviewBackend.d.ts +38 -0
- package/dist/algorithm/Phase2ModelAlgorithmReviewBackend.js +372 -0
- package/dist/assets/FileAssetIngestionService.d.ts +32 -0
- package/dist/assets/FileAssetIngestionService.js +133 -0
- package/dist/assets/FileAssetStore.d.ts +36 -0
- package/dist/assets/FileAssetStore.js +152 -0
- package/dist/assets/FileBlockStore.d.ts +12 -0
- package/dist/assets/FileBlockStore.js +110 -0
- package/dist/assets/FileChunkStore.d.ts +23 -0
- package/dist/assets/FileChunkStore.js +179 -0
- package/dist/assets/FileChunker.d.ts +10 -0
- package/dist/assets/FileChunker.js +69 -0
- package/dist/assets/FileLoaderRegistry.d.ts +8 -0
- package/dist/assets/FileLoaderRegistry.js +21 -0
- package/dist/assets/FileLoaders.d.ts +37 -0
- package/dist/assets/FileLoaders.js +268 -0
- package/dist/assets/index.d.ts +10 -0
- package/dist/assets/index.js +7 -0
- package/dist/assets/providers/types.d.ts +47 -0
- package/dist/assets/providers/types.js +1 -0
- package/dist/assets/types.d.ts +159 -0
- package/dist/assets/types.js +1 -0
- package/dist/atlas/ActionFrameExtractor.d.ts +15 -0
- package/dist/atlas/ActionFrameExtractor.js +135 -0
- package/dist/atlas/MemoryAtlasIndexer.d.ts +32 -0
- package/dist/atlas/MemoryAtlasIndexer.js +74 -0
- package/dist/atlas/MemoryAtlasQueryCompiler.d.ts +23 -0
- package/dist/atlas/MemoryAtlasQueryCompiler.js +55 -0
- package/dist/atlas/MemoryAtlasService.d.ts +25 -0
- package/dist/atlas/MemoryAtlasService.js +216 -0
- package/dist/atlas/MemoryAtlasTypes.d.ts +107 -0
- package/dist/atlas/MemoryAtlasTypes.js +1 -0
- package/dist/atlas/index.d.ts +6 -0
- package/dist/atlas/index.js +5 -0
- package/dist/backend/SemanticBackend.d.ts +40 -0
- package/dist/backend/SemanticBackend.js +107 -0
- package/dist/batch/IngestionCursorStore.d.ts +52 -0
- package/dist/batch/IngestionCursorStore.js +153 -0
- package/dist/batch/InstalledBatchProcessor.d.ts +88 -0
- package/dist/batch/InstalledBatchProcessor.js +179 -0
- package/dist/batch/SourceOnboarding.d.ts +56 -0
- package/dist/batch/SourceOnboarding.js +366 -0
- package/dist/belief/BeliefGovernanceService.d.ts +59 -0
- package/dist/belief/BeliefGovernanceService.js +183 -0
- package/dist/belief/BeliefStore.d.ts +78 -0
- package/dist/belief/BeliefStore.js +898 -0
- package/dist/benchmark/BenchmarkRegistry.d.ts +16 -0
- package/dist/benchmark/BenchmarkRegistry.js +97 -0
- package/dist/benchmark/BenchmarkReport.d.ts +23 -0
- package/dist/benchmark/BenchmarkReport.js +62 -0
- package/dist/benchmark/BenchmarkRunner.d.ts +27 -0
- package/dist/benchmark/BenchmarkRunner.js +64 -0
- package/dist/benchmark/BrainEval.d.ts +134 -0
- package/dist/benchmark/BrainEval.js +252 -0
- package/dist/benchmark/ExternalBenchmarkRunner.d.ts +8 -0
- package/dist/benchmark/ExternalBenchmarkRunner.js +12 -0
- package/dist/benchmark/LongMemEvalAdapter.d.ts +46 -0
- package/dist/benchmark/LongMemEvalAdapter.js +88 -0
- package/dist/benchmark/LongMemEvalCli.d.ts +6 -0
- package/dist/benchmark/LongMemEvalCli.js +26 -0
- package/dist/bin/CliJson.d.ts +17 -0
- package/dist/bin/CliJson.js +20 -0
- package/dist/bin/brain-eval.d.ts +3 -0
- package/dist/bin/brain-eval.js +46 -0
- package/dist/bin/cogmem.d.ts +3 -0
- package/dist/bin/cogmem.js +95 -0
- package/dist/bin/compact.d.ts +3 -0
- package/dist/bin/compact.js +96 -0
- package/dist/bin/connect.d.ts +3 -0
- package/dist/bin/connect.js +398 -0
- package/dist/bin/doctor.d.ts +3 -0
- package/dist/bin/doctor.js +171 -0
- package/dist/bin/dream.d.ts +3 -0
- package/dist/bin/dream.js +65 -0
- package/dist/bin/episode.d.ts +3 -0
- package/dist/bin/episode.js +268 -0
- package/dist/bin/explain-recall.d.ts +3 -0
- package/dist/bin/explain-recall.js +139 -0
- package/dist/bin/import-hermes.d.ts +3 -0
- package/dist/bin/import-hermes.js +6 -0
- package/dist/bin/import-openclaw.d.ts +3 -0
- package/dist/bin/import-openclaw.js +6 -0
- package/dist/bin/import-support.d.ts +43 -0
- package/dist/bin/import-support.js +528 -0
- package/dist/bin/init.d.ts +30 -0
- package/dist/bin/init.js +761 -0
- package/dist/bin/mcp.d.ts +3 -0
- package/dist/bin/mcp.js +52 -0
- package/dist/bin/memory.d.ts +3 -0
- package/dist/bin/memory.js +803 -0
- package/dist/bin/migrate-vectors.d.ts +3 -0
- package/dist/bin/migrate-vectors.js +74 -0
- package/dist/bin/migrate.d.ts +3 -0
- package/dist/bin/migrate.js +95 -0
- package/dist/bin/normalize-transcript.d.ts +16 -0
- package/dist/bin/normalize-transcript.js +153 -0
- package/dist/bin/openclaw.d.ts +3 -0
- package/dist/bin/openclaw.js +78 -0
- package/dist/bin/prospective.d.ts +3 -0
- package/dist/bin/prospective.js +115 -0
- package/dist/bin/re-embed.d.ts +3 -0
- package/dist/bin/re-embed.js +46 -0
- package/dist/bin/repair.d.ts +3 -0
- package/dist/bin/repair.js +118 -0
- package/dist/bin/snapshot.d.ts +3 -0
- package/dist/bin/snapshot.js +100 -0
- package/dist/bin/strategy.d.ts +3 -0
- package/dist/bin/strategy.js +66 -0
- package/dist/bin/update-release.d.ts +15 -0
- package/dist/bin/update-release.js +62 -0
- package/dist/bin/update.d.ts +3 -0
- package/dist/bin/update.js +215 -0
- package/dist/binding/BindingClassifier.d.ts +19 -0
- package/dist/binding/BindingClassifier.js +270 -0
- package/dist/binding/BindingDecisionEngine.d.ts +11 -0
- package/dist/binding/BindingDecisionEngine.js +13 -0
- package/dist/binding/ClaimKeyGenerator.d.ts +4 -0
- package/dist/binding/ClaimKeyGenerator.js +21 -0
- package/dist/binding/MemoryBindingService.d.ts +28 -0
- package/dist/binding/MemoryBindingService.js +283 -0
- package/dist/binding/MemoryBindingTypes.d.ts +140 -0
- package/dist/binding/MemoryBindingTypes.js +1 -0
- package/dist/binding/TopicPathRegistry.d.ts +5 -0
- package/dist/binding/TopicPathRegistry.js +33 -0
- package/dist/binding/index.d.ts +12 -0
- package/dist/binding/index.js +6 -0
- package/dist/boards/ApprovalBoard.d.ts +14 -0
- package/dist/boards/ApprovalBoard.js +32 -0
- package/dist/boards/Board.d.ts +23 -0
- package/dist/boards/Board.js +1 -0
- package/dist/boards/BoardEventBuffer.d.ts +10 -0
- package/dist/boards/BoardEventBuffer.js +22 -0
- package/dist/boards/BoardEventBus.d.ts +15 -0
- package/dist/boards/BoardEventBus.js +38 -0
- package/dist/boards/BoardEventFilter.d.ts +5 -0
- package/dist/boards/BoardEventFilter.js +1 -0
- package/dist/boards/BoardRegistry.d.ts +11 -0
- package/dist/boards/BoardRegistry.js +15 -0
- package/dist/boards/ContextBoard.d.ts +15 -0
- package/dist/boards/ContextBoard.js +33 -0
- package/dist/boards/MemoryBoard.d.ts +13 -0
- package/dist/boards/MemoryBoard.js +30 -0
- package/dist/boards/ProcessBoard.d.ts +16 -0
- package/dist/boards/ProcessBoard.js +56 -0
- package/dist/boards/ProposalBoard.d.ts +13 -0
- package/dist/boards/ProposalBoard.js +37 -0
- package/dist/boards/ReasoningTraceBoard.d.ts +11 -0
- package/dist/boards/ReasoningTraceBoard.js +34 -0
- package/dist/boards/TaskBoard.d.ts +14 -0
- package/dist/boards/TaskBoard.js +37 -0
- package/dist/boards/index.d.ts +13 -0
- package/dist/boards/index.js +12 -0
- package/dist/config/CogmemConfig.d.ts +43 -0
- package/dist/config/CogmemConfig.js +247 -0
- package/dist/config/VectorDimension.d.ts +13 -0
- package/dist/config/VectorDimension.js +53 -0
- package/dist/context/ContextCortex.d.ts +71 -0
- package/dist/context/ContextCortex.js +156 -0
- package/dist/context/index.d.ts +2 -0
- package/dist/context/index.js +1 -0
- package/dist/core/ImportanceLevels.d.ts +4 -0
- package/dist/core/ImportanceLevels.js +6 -0
- package/dist/core/IntentParser.d.ts +12 -0
- package/dist/core/IntentParser.js +211 -0
- package/dist/core/MemoryGraph.d.ts +100 -0
- package/dist/core/MemoryGraph.js +860 -0
- package/dist/core/Metabolism.d.ts +43 -0
- package/dist/core/Metabolism.js +196 -0
- package/dist/core/Neuron.d.ts +20 -0
- package/dist/core/Neuron.js +51 -0
- package/dist/core/QueryClassifier.d.ts +36 -0
- package/dist/core/QueryClassifier.js +161 -0
- package/dist/core/Reflection.d.ts +42 -0
- package/dist/core/Reflection.js +183 -0
- package/dist/core/ResonanceCore.d.ts +26 -0
- package/dist/core/ResonanceCore.js +115 -0
- package/dist/core/Synapse.d.ts +10 -0
- package/dist/core/Synapse.js +27 -0
- package/dist/core/TwoStagePulseRanker.d.ts +16 -0
- package/dist/core/TwoStagePulseRanker.js +120 -0
- package/dist/dream/DreamScheduler.d.ts +47 -0
- package/dist/dream/DreamScheduler.js +156 -0
- package/dist/dream/index.d.ts +2 -0
- package/dist/dream/index.js +1 -0
- package/dist/embedding/EmbeddingProvider.d.ts +16 -0
- package/dist/embedding/EmbeddingProvider.js +12 -0
- package/dist/embedding/NeuronEmbeddingStore.d.ts +38 -0
- package/dist/embedding/NeuronEmbeddingStore.js +193 -0
- package/dist/embedding/OllamaEmbeddingProvider.d.ts +21 -0
- package/dist/embedding/OllamaEmbeddingProvider.js +65 -0
- package/dist/embedding/QwenAPIEmbeddingProvider.d.ts +26 -0
- package/dist/embedding/QwenAPIEmbeddingProvider.js +53 -0
- package/dist/embedding/ReEmbeddingPipeline.d.ts +30 -0
- package/dist/embedding/ReEmbeddingPipeline.js +119 -0
- package/dist/embedding/ReEmbeddingStatus.d.ts +10 -0
- package/dist/embedding/ReEmbeddingStatus.js +1 -0
- package/dist/embedding/index.d.ts +11 -0
- package/dist/embedding/index.js +5 -0
- package/dist/encryption/AesGcmEncryptionProvider.d.ts +9 -0
- package/dist/encryption/AesGcmEncryptionProvider.js +42 -0
- package/dist/encryption/EncryptionProvider.d.ts +6 -0
- package/dist/encryption/EncryptionProvider.js +3 -0
- package/dist/encryption/index.d.ts +4 -0
- package/dist/encryption/index.js +2 -0
- package/dist/engine/BeliefExtractor.d.ts +48 -0
- package/dist/engine/BeliefExtractor.js +1189 -0
- package/dist/engine/CognitiveGraphCompiler.d.ts +24 -0
- package/dist/engine/CognitiveGraphCompiler.js +243 -0
- package/dist/engine/ConsolidationPipeline.d.ts +66 -0
- package/dist/engine/ConsolidationPipeline.js +376 -0
- package/dist/engine/ConsolidationTrigger.d.ts +18 -0
- package/dist/engine/ConsolidationTrigger.js +41 -0
- package/dist/engine/CrossTopicSynthesizer.d.ts +28 -0
- package/dist/engine/CrossTopicSynthesizer.js +70 -0
- package/dist/engine/CrossTopicTrigger.d.ts +17 -0
- package/dist/engine/CrossTopicTrigger.js +29 -0
- package/dist/engine/DeepWriteConfig.d.ts +14 -0
- package/dist/engine/DeepWriteConfig.js +37 -0
- package/dist/engine/DeepWriteMemoryCompiler.d.ts +43 -0
- package/dist/engine/DeepWriteMemoryCompiler.js +42 -0
- package/dist/engine/DeepWriteMemoryOrchestrator.d.ts +60 -0
- package/dist/engine/DeepWriteMemoryOrchestrator.js +175 -0
- package/dist/engine/DeepWritePromotionPolicy.d.ts +48 -0
- package/dist/engine/DeepWritePromotionPolicy.js +514 -0
- package/dist/engine/DeepWriteRedactor.d.ts +14 -0
- package/dist/engine/DeepWriteRedactor.js +53 -0
- package/dist/engine/DreamCuratorSchedule.d.ts +18 -0
- package/dist/engine/DreamCuratorSchedule.js +95 -0
- package/dist/engine/DreamCuratorWorker.d.ts +67 -0
- package/dist/engine/DreamCuratorWorker.js +908 -0
- package/dist/engine/EntityResolutionEngine.d.ts +45 -0
- package/dist/engine/EntityResolutionEngine.js +105 -0
- package/dist/engine/EpisodicSemanticDistiller.d.ts +25 -0
- package/dist/engine/EpisodicSemanticDistiller.js +68 -0
- package/dist/engine/EvolutionVerifier.d.ts +39 -0
- package/dist/engine/EvolutionVerifier.js +104 -0
- package/dist/engine/FactCompiler.d.ts +41 -0
- package/dist/engine/FactCompiler.js +820 -0
- package/dist/engine/GraphCommunityEngine.d.ts +20 -0
- package/dist/engine/GraphCommunityEngine.js +91 -0
- package/dist/engine/ImportanceSignalDetector.d.ts +11 -0
- package/dist/engine/ImportanceSignalDetector.js +51 -0
- package/dist/engine/IngestionEngine.d.ts +44 -0
- package/dist/engine/IngestionEngine.js +182 -0
- package/dist/engine/InteractionBinder.d.ts +16 -0
- package/dist/engine/InteractionBinder.js +87 -0
- package/dist/engine/LocalSemanticCompiler.d.ts +40 -0
- package/dist/engine/LocalSemanticCompiler.js +111 -0
- package/dist/engine/MemoryConsolidationEngine.d.ts +11 -0
- package/dist/engine/MemoryConsolidationEngine.js +21 -0
- package/dist/engine/MemoryGate.d.ts +10 -0
- package/dist/engine/MemoryGate.js +34 -0
- package/dist/engine/OfflineConsolidationPipeline.d.ts +148 -0
- package/dist/engine/OfflineConsolidationPipeline.js +670 -0
- package/dist/engine/OrphanCleaner.d.ts +15 -0
- package/dist/engine/OrphanCleaner.js +27 -0
- package/dist/engine/PipelineMetrics.d.ts +32 -0
- package/dist/engine/PipelineMetrics.js +126 -0
- package/dist/engine/PrincipleDecayPolicy.d.ts +17 -0
- package/dist/engine/PrincipleDecayPolicy.js +64 -0
- package/dist/engine/TopologyCompiler.d.ts +25 -0
- package/dist/engine/TopologyCompiler.js +276 -0
- package/dist/engine/WorkingMemoryDelta.d.ts +23 -0
- package/dist/engine/WorkingMemoryDelta.js +63 -0
- package/dist/entity/EntityGovernanceService.d.ts +47 -0
- package/dist/entity/EntityGovernanceService.js +215 -0
- package/dist/entity/index.d.ts +3 -0
- package/dist/entity/index.js +1 -0
- package/dist/episode/CogmemBlockStripper.d.ts +11 -0
- package/dist/episode/CogmemBlockStripper.js +58 -0
- package/dist/episode/CorrectionResolver.d.ts +30 -0
- package/dist/episode/CorrectionResolver.js +17 -0
- package/dist/episode/EpisodeAssembler.d.ts +54 -0
- package/dist/episode/EpisodeAssembler.js +203 -0
- package/dist/episode/EpisodeImportIdentity.d.ts +7 -0
- package/dist/episode/EpisodeImportIdentity.js +17 -0
- package/dist/episode/EpisodeSemanticSummarizer.d.ts +4 -0
- package/dist/episode/EpisodeSemanticSummarizer.js +31 -0
- package/dist/episode/EpisodeStore.d.ts +189 -0
- package/dist/episode/EpisodeStore.js +680 -0
- package/dist/episode/EpisodeTypes.d.ts +96 -0
- package/dist/episode/EpisodeTypes.js +1 -0
- package/dist/episode/TurnRelationClassifier.d.ts +40 -0
- package/dist/episode/TurnRelationClassifier.js +205 -0
- package/dist/episode/index.d.ts +9 -0
- package/dist/episode/index.js +8 -0
- package/dist/eval/datasets/contradiction_injection.d.ts +3 -0
- package/dist/eval/datasets/contradiction_injection.js +56 -0
- package/dist/eval/datasets/noisy_tool_output_corpus.d.ts +16 -0
- package/dist/eval/datasets/noisy_tool_output_corpus.js +59 -0
- package/dist/eval/datasets/synthetic_long_conversation.d.ts +40 -0
- package/dist/eval/datasets/synthetic_long_conversation.js +136 -0
- package/dist/eval/runners/EvalRunner.d.ts +12 -0
- package/dist/eval/runners/EvalRunner.js +66 -0
- package/dist/eval/runners/ReportFormatter.d.ts +13 -0
- package/dist/eval/runners/ReportFormatter.js +59 -0
- package/dist/eval/strategy/ContextOutcomeStore.d.ts +12 -0
- package/dist/eval/strategy/ContextOutcomeStore.js +44 -0
- package/dist/eval/strategy/ContextPolicyScorer.d.ts +25 -0
- package/dist/eval/strategy/ContextPolicyScorer.js +58 -0
- package/dist/eval/strategy/MemoryUseJudge.d.ts +49 -0
- package/dist/eval/strategy/MemoryUseJudge.js +75 -0
- package/dist/eval/strategy/StrategyDiversitySelector.d.ts +8 -0
- package/dist/eval/strategy/StrategyDiversitySelector.js +44 -0
- package/dist/eval/strategy/StrategyRolloutEvaluator.d.ts +15 -0
- package/dist/eval/strategy/StrategyRolloutEvaluator.js +30 -0
- package/dist/eval/strategy/index.d.ts +6 -0
- package/dist/eval/strategy/index.js +5 -0
- package/dist/factory.d.ts +726 -0
- package/dist/factory.js +2118 -0
- package/dist/governance/CandidateReviewService.d.ts +33 -0
- package/dist/governance/CandidateReviewService.js +126 -0
- package/dist/governance/ContradictionResolver.d.ts +22 -0
- package/dist/governance/ContradictionResolver.js +54 -0
- package/dist/governance/CredibilityScorer.d.ts +10 -0
- package/dist/governance/CredibilityScorer.js +29 -0
- package/dist/governance/DecayPolicy.d.ts +18 -0
- package/dist/governance/DecayPolicy.js +28 -0
- package/dist/governance/MemoryExplain.d.ts +46 -0
- package/dist/governance/MemoryExplain.js +62 -0
- package/dist/governance/MemoryGovernanceExecutor.d.ts +18 -0
- package/dist/governance/MemoryGovernanceExecutor.js +37 -0
- package/dist/governance/MemoryGovernancePlan.d.ts +36 -0
- package/dist/governance/MemoryGovernancePlan.js +1 -0
- package/dist/governance/MemoryGovernanceValidator.d.ts +13 -0
- package/dist/governance/MemoryGovernanceValidator.js +53 -0
- package/dist/governance/ObservationHygieneRules.d.ts +17 -0
- package/dist/governance/ObservationHygieneRules.js +28 -0
- package/dist/governance/PiiRedactor.d.ts +20 -0
- package/dist/governance/PiiRedactor.js +37 -0
- package/dist/governance/SupersedeChain.d.ts +21 -0
- package/dist/governance/SupersedeChain.js +107 -0
- package/dist/governance/index.d.ts +14 -0
- package/dist/governance/index.js +6 -0
- package/dist/graph/BrainGraphView.d.ts +20 -0
- package/dist/graph/BrainGraphView.js +45 -0
- package/dist/host/openclaw/AutoMemoryPluginInstaller.d.ts +45 -0
- package/dist/host/openclaw/AutoMemoryPluginInstaller.js +1904 -0
- package/dist/internal.d.ts +148 -0
- package/dist/internal.js +144 -0
- package/dist/lexicon/coreMemoryLexicon.d.ts +96 -0
- package/dist/lexicon/coreMemoryLexicon.js +525 -0
- package/dist/lexicon/language-packs/en.d.ts +42 -0
- package/dist/lexicon/language-packs/en.js +41 -0
- package/dist/lexicon/language-packs/zh.d.ts +42 -0
- package/dist/lexicon/language-packs/zh.js +41 -0
- package/dist/lexicon/zh/entities.d.ts +2 -0
- package/dist/lexicon/zh/entities.js +17 -0
- package/dist/lexicon/zh/index.d.ts +5 -0
- package/dist/lexicon/zh/index.js +3 -0
- package/dist/lexicon/zh/stopwords.d.ts +2 -0
- package/dist/lexicon/zh/stopwords.js +22 -0
- package/dist/lexicon/zh/topics.d.ts +6 -0
- package/dist/lexicon/zh/topics.js +52 -0
- package/dist/mcp/CoreMcpTools.d.ts +33 -0
- package/dist/mcp/CoreMcpTools.js +832 -0
- package/dist/mcp/server.d.ts +5 -0
- package/dist/mcp/server.js +29 -0
- package/dist/meta/MetaObservationCollector.d.ts +37 -0
- package/dist/meta/MetaObservationCollector.js +348 -0
- package/dist/meta/PolicyProposalGenerator.d.ts +11 -0
- package/dist/meta/PolicyProposalGenerator.js +159 -0
- package/dist/meta/ProposalApplier.d.ts +18 -0
- package/dist/meta/ProposalApplier.js +91 -0
- package/dist/meta/ProposalConfigOverlay.d.ts +13 -0
- package/dist/meta/ProposalConfigOverlay.js +27 -0
- package/dist/meta/ProposalEvalRunner.d.ts +31 -0
- package/dist/meta/ProposalEvalRunner.js +62 -0
- package/dist/meta/ProposalLedger.d.ts +34 -0
- package/dist/meta/ProposalLedger.js +242 -0
- package/dist/meta/types.d.ts +63 -0
- package/dist/meta/types.js +1 -0
- package/dist/migrations/0001_init.d.ts +4 -0
- package/dist/migrations/0001_init.js +67 -0
- package/dist/migrations/0002_v06_platform.d.ts +10 -0
- package/dist/migrations/0002_v06_platform.js +103 -0
- package/dist/migrations/0003_v07_dialogues.d.ts +9 -0
- package/dist/migrations/0003_v07_dialogues.js +53 -0
- package/dist/migrations/0004_v09_self_improvement.d.ts +9 -0
- package/dist/migrations/0004_v09_self_improvement.js +100 -0
- package/dist/migrations/0005_dialogue_buffer.d.ts +8 -0
- package/dist/migrations/0005_dialogue_buffer.js +44 -0
- package/dist/migrations/0006_deep_write_memory.d.ts +3 -0
- package/dist/migrations/0006_deep_write_memory.js +54 -0
- package/dist/migrations/0007_deep_write_summaries.d.ts +3 -0
- package/dist/migrations/0007_deep_write_summaries.js +24 -0
- package/dist/migrations/0009_memory_importance.d.ts +3 -0
- package/dist/migrations/0009_memory_importance.js +18 -0
- package/dist/migrations/0010_skill_neurons.d.ts +3 -0
- package/dist/migrations/0010_skill_neurons.js +19 -0
- package/dist/migrations/0011_topic_path.d.ts +3 -0
- package/dist/migrations/0011_topic_path.js +19 -0
- package/dist/migrations/0012_governance_security.d.ts +3 -0
- package/dist/migrations/0012_governance_security.js +23 -0
- package/dist/migrations/0015_memory_governance.d.ts +3 -0
- package/dist/migrations/0015_memory_governance.js +74 -0
- package/dist/migrations/0016_entity_governance.d.ts +3 -0
- package/dist/migrations/0016_entity_governance.js +40 -0
- package/dist/migrations/0017_belief_graph.d.ts +3 -0
- package/dist/migrations/0017_belief_graph.js +41 -0
- package/dist/migrations/0018_temporal_memory.d.ts +3 -0
- package/dist/migrations/0018_temporal_memory.js +25 -0
- package/dist/migrations/0019_context_cortex.d.ts +3 -0
- package/dist/migrations/0019_context_cortex.js +19 -0
- package/dist/migrations/0020_prospective_memory.d.ts +3 -0
- package/dist/migrations/0020_prospective_memory.js +42 -0
- package/dist/migrations/0021_strategy_cortex.d.ts +3 -0
- package/dist/migrations/0021_strategy_cortex.js +23 -0
- package/dist/migrations/0022_episode_dream_engine.d.ts +3 -0
- package/dist/migrations/0022_episode_dream_engine.js +74 -0
- package/dist/migrations/0023_episode_dream_hardening.d.ts +3 -0
- package/dist/migrations/0023_episode_dream_hardening.js +65 -0
- package/dist/migrations/0024_episode_ontology_reliability.d.ts +3 -0
- package/dist/migrations/0024_episode_ontology_reliability.js +70 -0
- package/dist/migrations/0025_memory_atlas.d.ts +6 -0
- package/dist/migrations/0025_memory_atlas.js +268 -0
- package/dist/migrations/0026_runtime_governance_atlas_reliability.d.ts +3 -0
- package/dist/migrations/0026_runtime_governance_atlas_reliability.js +72 -0
- package/dist/migrations/0027_openclaw_upgrade_hotfix.d.ts +3 -0
- package/dist/migrations/0027_openclaw_upgrade_hotfix.js +21 -0
- package/dist/migrations/SchemaMigrationRunner.d.ts +21 -0
- package/dist/migrations/SchemaMigrationRunner.js +67 -0
- package/dist/migrations/index.d.ts +36 -0
- package/dist/migrations/index.js +57 -0
- package/dist/models/ModelCapabilityRouter.d.ts +17 -0
- package/dist/models/ModelCapabilityRouter.js +75 -0
- package/dist/models/ModelRegistry.d.ts +15 -0
- package/dist/models/ModelRegistry.js +132 -0
- package/dist/models/ModelRole.d.ts +19 -0
- package/dist/models/ModelRole.js +1 -0
- package/dist/models/UserInsight.d.ts +16 -0
- package/dist/models/UserInsight.js +9 -0
- package/dist/models/UserInsightExtractor.d.ts +19 -0
- package/dist/models/UserInsightExtractor.js +99 -0
- package/dist/models/UserModelManager.d.ts +21 -0
- package/dist/models/UserModelManager.js +41 -0
- package/dist/models/UserModelStore.d.ts +20 -0
- package/dist/models/UserModelStore.js +136 -0
- package/dist/models/WorkingMemoryReporter.d.ts +16 -0
- package/dist/models/WorkingMemoryReporter.js +38 -0
- package/dist/models/adapters/MemoryReviewAdapter.d.ts +12 -0
- package/dist/models/adapters/MemoryReviewAdapter.js +77 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +5 -0
- package/dist/models/providers/AnthropicClient.d.ts +17 -0
- package/dist/models/providers/AnthropicClient.js +40 -0
- package/dist/models/providers/OpenAICompatibleClient.d.ts +24 -0
- package/dist/models/providers/OpenAICompatibleClient.js +76 -0
- package/dist/observability/DecisionExplainer.d.ts +5 -0
- package/dist/observability/DecisionExplainer.js +62 -0
- package/dist/observability/TraceEvent.d.ts +11 -0
- package/dist/observability/TraceEvent.js +1 -0
- package/dist/observability/TraceQuery.d.ts +15 -0
- package/dist/observability/TraceQuery.js +28 -0
- package/dist/observability/TraceStore.d.ts +15 -0
- package/dist/observability/TraceStore.js +110 -0
- package/dist/observability/TraceWriter.d.ts +8 -0
- package/dist/observability/TraceWriter.js +14 -0
- package/dist/ontology/MemoryOntology.d.ts +4 -0
- package/dist/ontology/MemoryOntology.js +7 -0
- package/dist/prospective/ProspectiveMemoryService.d.ts +79 -0
- package/dist/prospective/ProspectiveMemoryService.js +258 -0
- package/dist/prospective/index.d.ts +2 -0
- package/dist/prospective/index.js +1 -0
- package/dist/public.d.ts +160 -0
- package/dist/public.js +115 -0
- package/dist/recall/BrainRecall.d.ts +96 -0
- package/dist/recall/BrainRecall.js +574 -0
- package/dist/recall/HierarchicalRecallRouter.d.ts +24 -0
- package/dist/recall/HierarchicalRecallRouter.js +62 -0
- package/dist/recall/RecallExplanation.d.ts +59 -0
- package/dist/recall/RecallExplanation.js +244 -0
- package/dist/recall/RecallGovernance.d.ts +10 -0
- package/dist/recall/RecallGovernance.js +83 -0
- package/dist/recall/RecallSufficiencyGate.d.ts +40 -0
- package/dist/recall/RecallSufficiencyGate.js +208 -0
- package/dist/recall/SourceContextMetadata.d.ts +49 -0
- package/dist/recall/SourceContextMetadata.js +134 -0
- package/dist/recall/TopicClassifier.d.ts +33 -0
- package/dist/recall/TopicClassifier.js +138 -0
- package/dist/recall/TopicDecayPolicy.d.ts +15 -0
- package/dist/recall/TopicDecayPolicy.js +46 -0
- package/dist/recall/TopicRegistry.d.ts +12 -0
- package/dist/recall/TopicRegistry.js +26 -0
- package/dist/recall/TopicSummaryBoard.d.ts +27 -0
- package/dist/recall/TopicSummaryBoard.js +139 -0
- package/dist/recall/VectorCandidateFilter.d.ts +50 -0
- package/dist/recall/VectorCandidateFilter.js +78 -0
- package/dist/retrieval/ConditionDslEvaluator.d.ts +33 -0
- package/dist/retrieval/ConditionDslEvaluator.js +160 -0
- package/dist/retrieval/EntityActivationIndex.d.ts +14 -0
- package/dist/retrieval/EntityActivationIndex.js +19 -0
- package/dist/retrieval/EvidenceFusionPolicy.d.ts +30 -0
- package/dist/retrieval/EvidenceFusionPolicy.js +112 -0
- package/dist/retrieval/EvidenceFusionRanker.d.ts +13 -0
- package/dist/retrieval/EvidenceFusionRanker.js +17 -0
- package/dist/retrieval/NarrativeRecallAssembler.d.ts +32 -0
- package/dist/retrieval/NarrativeRecallAssembler.js +27 -0
- package/dist/retrieval/NativeQueryParser.d.ts +23 -0
- package/dist/retrieval/NativeQueryParser.js +135 -0
- package/dist/retrieval/PlanDslExecutor.d.ts +67 -0
- package/dist/retrieval/PlanDslExecutor.js +194 -0
- package/dist/retrieval/PolicyRuntimeEvaluator.d.ts +48 -0
- package/dist/retrieval/PolicyRuntimeEvaluator.js +96 -0
- package/dist/retrieval/PolicySideEffectExecutor.d.ts +50 -0
- package/dist/retrieval/PolicySideEffectExecutor.js +202 -0
- package/dist/retrieval/PulseRetrievalEngine.d.ts +37 -0
- package/dist/retrieval/PulseRetrievalEngine.js +51 -0
- package/dist/retrieval/QueryCompiler.d.ts +18 -0
- package/dist/retrieval/QueryCompiler.js +97 -0
- package/dist/retrieval/QueryTimePendingEntityResolver.d.ts +67 -0
- package/dist/retrieval/QueryTimePendingEntityResolver.js +260 -0
- package/dist/retrieval/RetrievalPlanner.d.ts +42 -0
- package/dist/retrieval/RetrievalPlanner.js +209 -0
- package/dist/retrieval/TemporalBranchSearch.d.ts +38 -0
- package/dist/retrieval/TemporalBranchSearch.js +109 -0
- package/dist/retrieval/UniverseNavigator.d.ts +43 -0
- package/dist/retrieval/UniverseNavigator.js +75 -0
- package/dist/retrieval/UniverseTraversalExecutor.d.ts +21 -0
- package/dist/retrieval/UniverseTraversalExecutor.js +77 -0
- package/dist/routing/AnswerEvidenceTrace.d.ts +18 -0
- package/dist/routing/AnswerEvidenceTrace.js +1 -0
- package/dist/routing/BrainToolDispatcher.d.ts +37 -0
- package/dist/routing/BrainToolDispatcher.js +163 -0
- package/dist/routing/ConfidenceGate.d.ts +26 -0
- package/dist/routing/ConfidenceGate.js +40 -0
- package/dist/routing/ConfirmationPhraseMatcher.d.ts +9 -0
- package/dist/routing/ConfirmationPhraseMatcher.js +43 -0
- package/dist/routing/DirectReplyFormatter.d.ts +5 -0
- package/dist/routing/DirectReplyFormatter.js +55 -0
- package/dist/routing/EvidenceBudgetManager.d.ts +30 -0
- package/dist/routing/EvidenceBudgetManager.js +55 -0
- package/dist/routing/ExecutionLoop.d.ts +79 -0
- package/dist/routing/ExecutionLoop.js +234 -0
- package/dist/routing/IntentClassifier.d.ts +15 -0
- package/dist/routing/IntentClassifier.js +97 -0
- package/dist/routing/IntentPatternMatcher.d.ts +12 -0
- package/dist/routing/IntentPatternMatcher.js +206 -0
- package/dist/routing/IterativeLLMClarifier.d.ts +80 -0
- package/dist/routing/IterativeLLMClarifier.js +408 -0
- package/dist/routing/LLMToolSchema.d.ts +60 -0
- package/dist/routing/LLMToolSchema.js +143 -0
- package/dist/routing/MessageRouter.d.ts +20 -0
- package/dist/routing/MessageRouter.js +58 -0
- package/dist/routing/SessionContextSelector.d.ts +12 -0
- package/dist/routing/SessionContextSelector.js +86 -0
- package/dist/routing/SystemIntentClassifier.d.ts +15 -0
- package/dist/routing/SystemIntentClassifier.js +50 -0
- package/dist/routing/TaskPlan.d.ts +31 -0
- package/dist/routing/TaskPlan.js +1 -0
- package/dist/routing/TaskRouter.d.ts +13 -0
- package/dist/routing/TaskRouter.js +111 -0
- package/dist/routing/ToolCallParser.d.ts +16 -0
- package/dist/routing/ToolCallParser.js +123 -0
- package/dist/routing/ToolEvidenceNormalizer.d.ts +13 -0
- package/dist/routing/ToolEvidenceNormalizer.js +96 -0
- package/dist/routing/ToolEvidencePack.d.ts +36 -0
- package/dist/routing/ToolEvidencePack.js +84 -0
- package/dist/routing/ToolResultSanitizer.d.ts +19 -0
- package/dist/routing/ToolResultSanitizer.js +58 -0
- package/dist/routing/ToolUsePolicy.d.ts +78 -0
- package/dist/routing/ToolUsePolicy.js +163 -0
- package/dist/routing/index.d.ts +32 -0
- package/dist/routing/index.js +19 -0
- package/dist/routing/templates/ability_template.d.ts +2 -0
- package/dist/routing/templates/ability_template.js +34 -0
- package/dist/routing/templates/approvals_template.d.ts +2 -0
- package/dist/routing/templates/approvals_template.js +43 -0
- package/dist/routing/templates/context_template.d.ts +2 -0
- package/dist/routing/templates/context_template.js +25 -0
- package/dist/routing/templates/contradictions_template.d.ts +2 -0
- package/dist/routing/templates/contradictions_template.js +36 -0
- package/dist/routing/templates/importance_template.d.ts +2 -0
- package/dist/routing/templates/importance_template.js +23 -0
- package/dist/routing/templates/memory_template.d.ts +2 -0
- package/dist/routing/templates/memory_template.js +37 -0
- package/dist/routing/templates/self_manifest_template.d.ts +5 -0
- package/dist/routing/templates/self_manifest_template.js +64 -0
- package/dist/routing/templates/tasks_template.d.ts +2 -0
- package/dist/routing/templates/tasks_template.js +41 -0
- package/dist/routing/templates/trace_template.d.ts +2 -0
- package/dist/routing/templates/trace_template.js +37 -0
- package/dist/routing/tools/EntityExpandTool.d.ts +25 -0
- package/dist/routing/tools/EntityExpandTool.js +59 -0
- package/dist/routing/tools/NeuronContextTool.d.ts +32 -0
- package/dist/routing/tools/NeuronContextTool.js +66 -0
- package/dist/routing/tools/SecondaryRecallTool.d.ts +27 -0
- package/dist/routing/tools/SecondaryRecallTool.js +30 -0
- package/dist/routing/tools/SkillDiscoveryTool.d.ts +13 -0
- package/dist/routing/tools/SkillDiscoveryTool.js +11 -0
- package/dist/snapshot/SnapshotExporter.d.ts +13 -0
- package/dist/snapshot/SnapshotExporter.js +70 -0
- package/dist/snapshot/SnapshotHeader.d.ts +15 -0
- package/dist/snapshot/SnapshotHeader.js +1 -0
- package/dist/snapshot/SnapshotImporter.d.ts +20 -0
- package/dist/snapshot/SnapshotImporter.js +40 -0
- package/dist/snapshot/errors.d.ts +18 -0
- package/dist/snapshot/errors.js +34 -0
- package/dist/snapshot/index.d.ts +5 -0
- package/dist/snapshot/index.js +3 -0
- package/dist/storage/StorageCompactor.d.ts +30 -0
- package/dist/storage/StorageCompactor.js +95 -0
- package/dist/store/ActivationStore.d.ts +45 -0
- package/dist/store/ActivationStore.js +135 -0
- package/dist/store/BackgroundJobStore.d.ts +49 -0
- package/dist/store/BackgroundJobStore.js +156 -0
- package/dist/store/CandidateReviewStore.d.ts +33 -0
- package/dist/store/CandidateReviewStore.js +67 -0
- package/dist/store/CognitiveGraphStore.d.ts +42 -0
- package/dist/store/CognitiveGraphStore.js +193 -0
- package/dist/store/CompilerConfidenceStore.d.ts +20 -0
- package/dist/store/CompilerConfidenceStore.js +76 -0
- package/dist/store/DeepWriteCandidateStore.d.ts +94 -0
- package/dist/store/DeepWriteCandidateStore.js +290 -0
- package/dist/store/DeterministicEmbedder.d.ts +10 -0
- package/dist/store/DeterministicEmbedder.js +24 -0
- package/dist/store/DreamLedgerStore.d.ts +22 -0
- package/dist/store/DreamLedgerStore.js +84 -0
- package/dist/store/Embedder.d.ts +14 -0
- package/dist/store/Embedder.js +52 -0
- package/dist/store/EmbedderFactory.d.ts +12 -0
- package/dist/store/EmbedderFactory.js +51 -0
- package/dist/store/EntityStore.d.ts +195 -0
- package/dist/store/EntityStore.js +941 -0
- package/dist/store/EventStore.d.ts +118 -0
- package/dist/store/EventStore.js +699 -0
- package/dist/store/FactStore.d.ts +76 -0
- package/dist/store/FactStore.js +356 -0
- package/dist/store/HnswlibVectorStore.d.ts +2 -0
- package/dist/store/HnswlibVectorStore.js +1 -0
- package/dist/store/IVectorStore.d.ts +32 -0
- package/dist/store/IVectorStore.js +1 -0
- package/dist/store/InteractionUnitStore.d.ts +52 -0
- package/dist/store/InteractionUnitStore.js +167 -0
- package/dist/store/MemoryAtlasStore.d.ts +60 -0
- package/dist/store/MemoryAtlasStore.js +500 -0
- package/dist/store/MemoryBindingStore.d.ts +77 -0
- package/dist/store/MemoryBindingStore.js +608 -0
- package/dist/store/MemoryGovernanceStore.d.ts +23 -0
- package/dist/store/MemoryGovernanceStore.js +103 -0
- package/dist/store/MemoryInspectionStore.d.ts +61 -0
- package/dist/store/MemoryInspectionStore.js +215 -0
- package/dist/store/PlanRuntimeStore.d.ts +83 -0
- package/dist/store/PlanRuntimeStore.js +257 -0
- package/dist/store/PolicyExecutionProjector.d.ts +17 -0
- package/dist/store/PolicyExecutionProjector.js +115 -0
- package/dist/store/PolicyExecutionStore.d.ts +62 -0
- package/dist/store/PolicyExecutionStore.js +290 -0
- package/dist/store/PolicyProjectionStore.d.ts +18 -0
- package/dist/store/PolicyProjectionStore.js +61 -0
- package/dist/store/ProjectionObservabilityStore.d.ts +38 -0
- package/dist/store/ProjectionObservabilityStore.js +310 -0
- package/dist/store/ReasoningChainStore.d.ts +13 -0
- package/dist/store/ReasoningChainStore.js +74 -0
- package/dist/store/RuntimeProjectionStore.d.ts +18 -0
- package/dist/store/RuntimeProjectionStore.js +61 -0
- package/dist/store/RuntimeProjector.d.ts +17 -0
- package/dist/store/RuntimeProjector.js +119 -0
- package/dist/store/SqliteVecStore.d.ts +25 -0
- package/dist/store/SqliteVecStore.js +126 -0
- package/dist/store/SummaryStore.d.ts +56 -0
- package/dist/store/SummaryStore.js +225 -0
- package/dist/store/TemporalAdjacencyStore.d.ts +49 -0
- package/dist/store/TemporalAdjacencyStore.js +300 -0
- package/dist/store/TopologyStore.d.ts +89 -0
- package/dist/store/TopologyStore.js +657 -0
- package/dist/store/VectorProjector.d.ts +22 -0
- package/dist/store/VectorProjector.js +125 -0
- package/dist/store/VectorStore.d.ts +35 -0
- package/dist/store/VectorStore.js +201 -0
- package/dist/strategy/StrategyCapsule.d.ts +44 -0
- package/dist/strategy/StrategyCapsule.js +1 -0
- package/dist/strategy/StrategyConditionedCandidateBuilder.d.ts +9 -0
- package/dist/strategy/StrategyConditionedCandidateBuilder.js +11 -0
- package/dist/strategy/StrategyContextFormatter.d.ts +3 -0
- package/dist/strategy/StrategyContextFormatter.js +25 -0
- package/dist/strategy/StrategyCortex.d.ts +28 -0
- package/dist/strategy/StrategyCortex.js +78 -0
- package/dist/strategy/StrategyTemplateRegistry.d.ts +9 -0
- package/dist/strategy/StrategyTemplateRegistry.js +78 -0
- package/dist/strategy/index.d.ts +6 -0
- package/dist/strategy/index.js +5 -0
- package/dist/temporal/TemporalMemoryService.d.ts +62 -0
- package/dist/temporal/TemporalMemoryService.js +128 -0
- package/dist/temporal/index.d.ts +2 -0
- package/dist/temporal/index.js +1 -0
- package/dist/topic/TopicAliasRegistry.d.ts +21 -0
- package/dist/topic/TopicAliasRegistry.js +67 -0
- package/dist/topic/TopicGovernance.d.ts +21 -0
- package/dist/topic/TopicGovernance.js +173 -0
- package/dist/topic/TopicPathRegistry.d.ts +36 -0
- package/dist/topic/TopicPathRegistry.js +105 -0
- package/dist/topic/TopicRelationGraph.d.ts +23 -0
- package/dist/topic/TopicRelationGraph.js +55 -0
- package/dist/topic/TopicTypes.d.ts +73 -0
- package/dist/topic/TopicTypes.js +1 -0
- package/dist/topic/index.d.ts +6 -0
- package/dist/topic/index.js +5 -0
- package/dist/types/AsyncEnrichment.d.ts +62 -0
- package/dist/types/AsyncEnrichment.js +7 -0
- package/dist/types/BrainRecallResult.d.ts +66 -0
- package/dist/types/BrainRecallResult.js +1 -0
- package/dist/types/ExtensionPoints.d.ts +116 -0
- package/dist/types/ExtensionPoints.js +1 -0
- package/dist/types/Migration.d.ts +22 -0
- package/dist/types/Migration.js +1 -0
- package/dist/types/QueryTimePendingEntityResolution.d.ts +11 -0
- package/dist/types/QueryTimePendingEntityResolution.js +23 -0
- package/dist/types/index.d.ts +855 -0
- package/dist/types/index.js +24 -0
- package/dist/types/query-ir.d.ts +71 -0
- package/dist/types/query-ir.js +4 -0
- package/dist/types/reasoning.d.ts +16 -0
- package/dist/types/reasoning.js +4 -0
- package/dist/utils/AAAKGenerator.d.ts +57 -0
- package/dist/utils/AAAKGenerator.js +212 -0
- package/dist/utils/Config.d.ts +78 -0
- package/dist/utils/Config.js +91 -0
- package/dist/utils/ConversationMarkdownNormalization.d.ts +88 -0
- package/dist/utils/ConversationMarkdownNormalization.js +567 -0
- package/dist/utils/Logger.d.ts +22 -0
- package/dist/utils/Logger.js +77 -0
- package/dist/utils/hash.d.ts +33 -0
- package/dist/utils/hash.js +53 -0
- package/dist/utils/text.d.ts +2 -0
- package/dist/utils/text.js +19 -0
- package/dist/utils/vector.d.ts +26 -0
- package/dist/utils/vector.js +38 -0
- package/examples/hermes-backend/AGENTS.md +218 -0
- package/examples/hermes-backend/README.md +153 -0
- package/examples/hermes-backend/SKILL.md +365 -0
- package/examples/hermes-backend/references/operations.md +202 -0
- package/examples/openclaw-backend/AGENTS.md +195 -0
- package/examples/openclaw-backend/README.md +228 -0
- package/examples/openclaw-backend/SKILL.md +464 -0
- package/examples/openclaw-backend/references/operations.md +269 -0
- package/install.sh +84 -0
- package/package.json +90 -0
|
@@ -0,0 +1,855 @@
|
|
|
1
|
+
export type NeuronType = 'code' | 'chat' | 'doc' | 'command' | 'file' | 'agent_finding' | 'agent_observation' | 'skill' | 'semantic_consolidation' | 'cross_domain_principle';
|
|
2
|
+
export type NeuronStatus = 'active' | 'cold' | 'suspect' | 'archived';
|
|
3
|
+
export type SourceType = 'user_input' | 'llm_inference' | 'verified_fact' | 'external_tool';
|
|
4
|
+
export type MemoryImportanceLevel = 'low' | 'normal' | 'important' | 'permanent';
|
|
5
|
+
export type MemoryEventRole = 'user' | 'assistant' | 'agent' | 'tool' | 'system' | 'narrator';
|
|
6
|
+
export type MemoryEventCausalityType = 'replies_to' | 'tool_result_for' | 'derived_from' | 'summarizes' | 'corrects' | 'supersedes' | 'triggered_by';
|
|
7
|
+
export type OrderingConfidence = 'high' | 'medium' | 'low';
|
|
8
|
+
export type MemoryRawEventType = 'message' | 'tool_call' | 'tool_result' | 'memory_write' | 'correction' | 'summary' | 'action_result' | 'task_event';
|
|
9
|
+
export interface SkillNeuronMetadata {
|
|
10
|
+
skillId: string;
|
|
11
|
+
skillVersion: string;
|
|
12
|
+
description: string;
|
|
13
|
+
intentTags: string[];
|
|
14
|
+
capabilityIds: string[];
|
|
15
|
+
executionCount: number;
|
|
16
|
+
successCount: number;
|
|
17
|
+
lastExecutedAt?: number;
|
|
18
|
+
lastFailureReason?: string;
|
|
19
|
+
evolutionProposalId?: string;
|
|
20
|
+
consecutiveFailureCount?: number;
|
|
21
|
+
declarativeLinks?: string[];
|
|
22
|
+
}
|
|
23
|
+
export interface NeuronMetadata {
|
|
24
|
+
projectId?: string;
|
|
25
|
+
topicPath?: string;
|
|
26
|
+
filePath?: string;
|
|
27
|
+
type: NeuronType;
|
|
28
|
+
createdAt: number;
|
|
29
|
+
updatedAt?: number;
|
|
30
|
+
lastActivated?: number;
|
|
31
|
+
activationCount?: number;
|
|
32
|
+
aaak_summary?: string;
|
|
33
|
+
tags?: string[];
|
|
34
|
+
status?: NeuronStatus;
|
|
35
|
+
stability?: number;
|
|
36
|
+
repetitions?: number;
|
|
37
|
+
confidence?: number;
|
|
38
|
+
sourceType?: SourceType;
|
|
39
|
+
fileSize?: number;
|
|
40
|
+
mimeType?: string;
|
|
41
|
+
originalName?: string;
|
|
42
|
+
blobPath?: string;
|
|
43
|
+
fileId?: string;
|
|
44
|
+
sourceEventId?: string;
|
|
45
|
+
importanceLevel?: MemoryImportanceLevel;
|
|
46
|
+
isPinned?: boolean;
|
|
47
|
+
skillMeta?: SkillNeuronMetadata;
|
|
48
|
+
proceduralLink?: {
|
|
49
|
+
skillId: string;
|
|
50
|
+
linkType: 'origin' | 'refinement_evidence';
|
|
51
|
+
};
|
|
52
|
+
communityId?: string;
|
|
53
|
+
lastReinforcedAt?: number;
|
|
54
|
+
sourceRefs?: MemorySourceRef[];
|
|
55
|
+
}
|
|
56
|
+
export interface TopicNode {
|
|
57
|
+
path: string;
|
|
58
|
+
segments: string[];
|
|
59
|
+
neuronCount: number;
|
|
60
|
+
projectId?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface NeuronCoordinates {
|
|
63
|
+
T: number;
|
|
64
|
+
S: [number, number, number];
|
|
65
|
+
V: number[];
|
|
66
|
+
}
|
|
67
|
+
export interface Neuron {
|
|
68
|
+
id: string;
|
|
69
|
+
content: string;
|
|
70
|
+
prev_hash: string;
|
|
71
|
+
self_hash: string;
|
|
72
|
+
coordinates: NeuronCoordinates;
|
|
73
|
+
synapses: Synapse[];
|
|
74
|
+
metadata: NeuronMetadata;
|
|
75
|
+
}
|
|
76
|
+
export type SynapseType = 'Caused_by' | 'Sequence' | 'Similar' | 'Referenced' | 'Overrides';
|
|
77
|
+
export interface Synapse {
|
|
78
|
+
targetId: string;
|
|
79
|
+
type: SynapseType;
|
|
80
|
+
weight: number;
|
|
81
|
+
}
|
|
82
|
+
export type TemporalOperatorType = 'range' | 'dynamic' | 'llm_guided';
|
|
83
|
+
export interface TemporalOperator {
|
|
84
|
+
type: TemporalOperatorType;
|
|
85
|
+
start?: number;
|
|
86
|
+
end?: number;
|
|
87
|
+
threshold?: number;
|
|
88
|
+
confidence?: number;
|
|
89
|
+
center?: number;
|
|
90
|
+
}
|
|
91
|
+
export type SpatialOperatorType = 'semantic_geo' | 'gravity' | 'point';
|
|
92
|
+
export interface SpatialOperator {
|
|
93
|
+
type: SpatialOperatorType;
|
|
94
|
+
center?: [number, number];
|
|
95
|
+
radius?: number;
|
|
96
|
+
weight?: number;
|
|
97
|
+
primary?: [number, number, number];
|
|
98
|
+
semanticConnections?: string[];
|
|
99
|
+
}
|
|
100
|
+
export interface QueryOptions {
|
|
101
|
+
temporal?: TemporalOperator;
|
|
102
|
+
spatial?: SpatialOperator;
|
|
103
|
+
maxHops?: number;
|
|
104
|
+
topK?: number;
|
|
105
|
+
}
|
|
106
|
+
export interface QueryResult {
|
|
107
|
+
neurons: Neuron[];
|
|
108
|
+
totalEnergy: number;
|
|
109
|
+
resonanceDepth: number;
|
|
110
|
+
queryTime: number;
|
|
111
|
+
contextPack?: ContextPack;
|
|
112
|
+
}
|
|
113
|
+
export declare enum ContextFusionPath {
|
|
114
|
+
COMPILED_ONLY = "compiled_only",
|
|
115
|
+
RAW_ONLY = "raw_only",
|
|
116
|
+
COMPILED_PLUS_RAW = "compiled_plus_raw",
|
|
117
|
+
CONFLICT_RESOLVED = "conflict_resolved"
|
|
118
|
+
}
|
|
119
|
+
export declare enum FusionResolutionReason {
|
|
120
|
+
COMPILED_WINS = "compiled_wins",
|
|
121
|
+
RAW_WINS = "raw_wins",
|
|
122
|
+
TRUST_SCORE_HIGHER = "trust_score_higher",
|
|
123
|
+
RECENCY_WINS = "recency_wins"
|
|
124
|
+
}
|
|
125
|
+
export interface EmbeddingConfig {
|
|
126
|
+
model: string;
|
|
127
|
+
cacheDir: string;
|
|
128
|
+
quantized: boolean;
|
|
129
|
+
maxSequenceLength: number;
|
|
130
|
+
}
|
|
131
|
+
export interface BackupConfig {
|
|
132
|
+
enabled: boolean;
|
|
133
|
+
frequency: 'daily' | 'neuron_count';
|
|
134
|
+
neuronThreshold: number;
|
|
135
|
+
targetRepo: string;
|
|
136
|
+
encryptionKey: string;
|
|
137
|
+
}
|
|
138
|
+
export interface MemoryAnchor {
|
|
139
|
+
id: string;
|
|
140
|
+
neuronCount: number;
|
|
141
|
+
createdAt: number;
|
|
142
|
+
prevAnchorId?: string;
|
|
143
|
+
summaryHash: string;
|
|
144
|
+
metadata: {
|
|
145
|
+
projectId?: string;
|
|
146
|
+
version: string;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
export declare enum BrainMode {
|
|
150
|
+
FULL = "FULL",
|
|
151
|
+
NO_SYNAPSE = "NO_SYNAPSE",
|
|
152
|
+
TEXT_ONLY = "TEXT_ONLY"
|
|
153
|
+
}
|
|
154
|
+
export interface BrainMetrics {
|
|
155
|
+
queryLatency: number;
|
|
156
|
+
queryType: 'HARD' | 'STANDARD' | 'FUZZY';
|
|
157
|
+
neuronCount: number;
|
|
158
|
+
synapseCount: number;
|
|
159
|
+
energyPropagation: number;
|
|
160
|
+
memoryUsage: number;
|
|
161
|
+
modelInferenceHealth: number;
|
|
162
|
+
chainIntegrityScore: number;
|
|
163
|
+
fallbackCount: number;
|
|
164
|
+
}
|
|
165
|
+
export interface DegradationState {
|
|
166
|
+
mode: BrainMode;
|
|
167
|
+
trigger: string;
|
|
168
|
+
timestamp: number;
|
|
169
|
+
}
|
|
170
|
+
export interface EnergyPropagationResult {
|
|
171
|
+
neuronId: string;
|
|
172
|
+
energy: number;
|
|
173
|
+
hops: number;
|
|
174
|
+
}
|
|
175
|
+
export interface IngestInput {
|
|
176
|
+
content: string;
|
|
177
|
+
projectId?: string;
|
|
178
|
+
topicPath?: string;
|
|
179
|
+
filePath?: string;
|
|
180
|
+
type?: NeuronType;
|
|
181
|
+
tags?: string[];
|
|
182
|
+
createdAt?: number;
|
|
183
|
+
updatedAt?: number;
|
|
184
|
+
sourceType?: SourceType;
|
|
185
|
+
source?: string;
|
|
186
|
+
sourceEventId?: string;
|
|
187
|
+
sourceRefs?: MemorySourceRef[];
|
|
188
|
+
importanceLevel?: MemoryImportanceLevel;
|
|
189
|
+
isPinned?: boolean;
|
|
190
|
+
}
|
|
191
|
+
export type StreamType = 'neuron' | 'belief' | 'file' | 'chain' | 'thread' | 'system';
|
|
192
|
+
export type MemoryEventType = 'RAW_EVENT_RECORDED' | 'INGESTED' | 'ACTIVATED' | 'BELIEF_UPSERTED' | 'BELIEF_RECALIBRATED' | 'BELIEF_SUPERSEDED' | 'BELIEF_REVOKED' | 'TOPOLOGY_COMPILED' | 'COGNITIVE_GRAPH_COMPILED' | 'ARCHIVED' | 'RESTORED' | 'INDEX_REBUILT' | 'RUNTIME_STATE_UPDATED' | 'RUNTIME_TRANSITION_RECORDED' | 'POLICY_EXECUTION_UPDATED';
|
|
193
|
+
export type TimeBucketType = 'day' | 'week' | 'month';
|
|
194
|
+
export type ProjectBranchKind = 'project_root' | 'interaction' | 'belief' | 'fact' | 'event' | 'task';
|
|
195
|
+
export type EventClusterType = 'approval' | 'rejection' | 'issue' | 'project' | 'fact' | 'generic';
|
|
196
|
+
export interface TopologyReference {
|
|
197
|
+
neuronId?: string;
|
|
198
|
+
unitId?: string;
|
|
199
|
+
beliefId?: string;
|
|
200
|
+
factId?: string;
|
|
201
|
+
eventId?: string;
|
|
202
|
+
createdAt: number;
|
|
203
|
+
}
|
|
204
|
+
export interface TimeBucketRecord {
|
|
205
|
+
bucketId: string;
|
|
206
|
+
bucketType: TimeBucketType;
|
|
207
|
+
bucketStart: number;
|
|
208
|
+
bucketEnd: number;
|
|
209
|
+
label: string;
|
|
210
|
+
}
|
|
211
|
+
export interface ProjectBranchRecord {
|
|
212
|
+
branchId: string;
|
|
213
|
+
projectId: string;
|
|
214
|
+
branchKey: string;
|
|
215
|
+
branchKind: ProjectBranchKind;
|
|
216
|
+
title: string;
|
|
217
|
+
createdAt: number;
|
|
218
|
+
updatedAt: number;
|
|
219
|
+
}
|
|
220
|
+
export interface TaskBranchRecord {
|
|
221
|
+
taskId: string;
|
|
222
|
+
projectId?: string;
|
|
223
|
+
taskKey: string;
|
|
224
|
+
title: string;
|
|
225
|
+
status: 'active' | 'derived';
|
|
226
|
+
createdAt: number;
|
|
227
|
+
updatedAt: number;
|
|
228
|
+
}
|
|
229
|
+
export interface EventClusterRecord {
|
|
230
|
+
clusterId: string;
|
|
231
|
+
projectId?: string;
|
|
232
|
+
clusterKey: string;
|
|
233
|
+
clusterType: EventClusterType;
|
|
234
|
+
title: string;
|
|
235
|
+
createdAt: number;
|
|
236
|
+
updatedAt: number;
|
|
237
|
+
}
|
|
238
|
+
export type CognitiveNodeType = 'neuron' | 'unit' | 'belief' | 'fact' | 'compiled_event' | 'entity' | 'time_bucket' | 'project_branch' | 'task_branch' | 'event_cluster';
|
|
239
|
+
export type CognitiveEdgeType = 'summarizes' | 'supports_belief' | 'mentions_entity' | 'belongs_to_project_branch' | 'belongs_to_task' | 'belongs_to_event_cluster' | 'occurred_in_time_bucket' | 'references_fact' | 'references_event' | 'extends_branch';
|
|
240
|
+
export interface CognitiveNodeRecord {
|
|
241
|
+
nodeId: string;
|
|
242
|
+
nodeType: CognitiveNodeType;
|
|
243
|
+
nodeKey: string;
|
|
244
|
+
title: string;
|
|
245
|
+
projectId?: string;
|
|
246
|
+
sourceNeuronId?: string;
|
|
247
|
+
metadata?: Record<string, unknown>;
|
|
248
|
+
createdAt: number;
|
|
249
|
+
updatedAt: number;
|
|
250
|
+
}
|
|
251
|
+
export interface CognitiveEdgeRecord {
|
|
252
|
+
edgeId: string;
|
|
253
|
+
sourceNodeId: string;
|
|
254
|
+
targetNodeId: string;
|
|
255
|
+
edgeType: CognitiveEdgeType;
|
|
256
|
+
weight: number;
|
|
257
|
+
projectId?: string;
|
|
258
|
+
metadata?: Record<string, unknown>;
|
|
259
|
+
createdAt: number;
|
|
260
|
+
}
|
|
261
|
+
export interface MemoryEvent<TPayload = Record<string, unknown>> {
|
|
262
|
+
eventId: string;
|
|
263
|
+
globalSeq?: number;
|
|
264
|
+
streamId: string;
|
|
265
|
+
streamType: StreamType;
|
|
266
|
+
eventType: MemoryEventType;
|
|
267
|
+
rawEventType?: MemoryRawEventType;
|
|
268
|
+
eventVersion: number;
|
|
269
|
+
projectId?: string;
|
|
270
|
+
workspaceId?: string;
|
|
271
|
+
actorId?: string;
|
|
272
|
+
causationId?: string;
|
|
273
|
+
correlationId?: string;
|
|
274
|
+
sourceNeuronId?: string;
|
|
275
|
+
sourceId?: string;
|
|
276
|
+
contentHash?: string;
|
|
277
|
+
threadId?: string;
|
|
278
|
+
sessionId?: string;
|
|
279
|
+
localDate?: string;
|
|
280
|
+
threadSeq?: number;
|
|
281
|
+
turnId?: string;
|
|
282
|
+
turnSeq?: number;
|
|
283
|
+
eventOrdinal?: number;
|
|
284
|
+
role?: MemoryEventRole;
|
|
285
|
+
parentEventId?: string;
|
|
286
|
+
prevEventId?: string;
|
|
287
|
+
nextEventId?: string;
|
|
288
|
+
causalityType?: MemoryEventCausalityType;
|
|
289
|
+
sourceOffset?: number;
|
|
290
|
+
lineStart?: number;
|
|
291
|
+
lineEnd?: number;
|
|
292
|
+
charStart?: number;
|
|
293
|
+
charEnd?: number;
|
|
294
|
+
orderingConfidence?: OrderingConfidence;
|
|
295
|
+
occurredAt: number;
|
|
296
|
+
payload: TPayload;
|
|
297
|
+
payloadHash: string;
|
|
298
|
+
createdAt: number;
|
|
299
|
+
ingestedAt?: number;
|
|
300
|
+
}
|
|
301
|
+
export interface MemorySourceRef {
|
|
302
|
+
eventId?: string;
|
|
303
|
+
eventType?: string;
|
|
304
|
+
sourceId?: string;
|
|
305
|
+
sourcePath?: string;
|
|
306
|
+
sourceType?: string;
|
|
307
|
+
recordId?: string;
|
|
308
|
+
contentHash?: string;
|
|
309
|
+
threadId?: string;
|
|
310
|
+
sessionId?: string;
|
|
311
|
+
turnId?: string;
|
|
312
|
+
parentEventId?: string;
|
|
313
|
+
prevEventId?: string;
|
|
314
|
+
nextEventId?: string;
|
|
315
|
+
causalityType?: MemoryEventCausalityType;
|
|
316
|
+
role?: MemoryEventRole;
|
|
317
|
+
threadSeq?: number;
|
|
318
|
+
turnSeq?: number;
|
|
319
|
+
eventOrdinal?: number;
|
|
320
|
+
sourceOffset?: number;
|
|
321
|
+
lineStart?: number;
|
|
322
|
+
lineEnd?: number;
|
|
323
|
+
charStart?: number;
|
|
324
|
+
charEnd?: number;
|
|
325
|
+
orderingConfidence?: OrderingConfidence;
|
|
326
|
+
metadata?: Record<string, unknown>;
|
|
327
|
+
}
|
|
328
|
+
export interface MemoryEventContext {
|
|
329
|
+
event: MemoryEvent;
|
|
330
|
+
before: MemoryEvent[];
|
|
331
|
+
after: MemoryEvent[];
|
|
332
|
+
parent?: MemoryEvent;
|
|
333
|
+
children: MemoryEvent[];
|
|
334
|
+
}
|
|
335
|
+
export type ScopeType = 'global' | 'project' | 'session' | 'agent' | 'file';
|
|
336
|
+
export type BeliefStatus = 'active' | 'superseded' | 'revoked' | 'suspect' | 'expired';
|
|
337
|
+
export type BeliefValidityKind = 'open' | 'time_range' | 'conditional' | 'revoked';
|
|
338
|
+
export interface BeliefValue {
|
|
339
|
+
raw: string;
|
|
340
|
+
normalized?: string;
|
|
341
|
+
json?: unknown;
|
|
342
|
+
type: 'string' | 'number' | 'boolean' | 'json' | 'enum';
|
|
343
|
+
}
|
|
344
|
+
export interface BeliefRecord {
|
|
345
|
+
id: string;
|
|
346
|
+
projectId?: string;
|
|
347
|
+
scope: ScopeType;
|
|
348
|
+
subject: string;
|
|
349
|
+
predicate: string;
|
|
350
|
+
objectValue: BeliefValue;
|
|
351
|
+
canonicalKey: string;
|
|
352
|
+
confidence: number;
|
|
353
|
+
trustScore: number;
|
|
354
|
+
sourceNeuronId?: string;
|
|
355
|
+
sourceEventId?: string;
|
|
356
|
+
sourceType: SourceType;
|
|
357
|
+
validityKind: BeliefValidityKind;
|
|
358
|
+
validFrom: number;
|
|
359
|
+
validTo?: number;
|
|
360
|
+
supersedesBeliefId?: string;
|
|
361
|
+
supersededByBeliefId?: string;
|
|
362
|
+
contradictionGroup?: string;
|
|
363
|
+
status: BeliefStatus;
|
|
364
|
+
explanation?: string;
|
|
365
|
+
metadata?: Record<string, unknown>;
|
|
366
|
+
createdAt: number;
|
|
367
|
+
updatedAt: number;
|
|
368
|
+
}
|
|
369
|
+
export interface BeliefEvidenceRecord {
|
|
370
|
+
beliefId: string;
|
|
371
|
+
neuronId?: string;
|
|
372
|
+
eventId?: string;
|
|
373
|
+
evidenceType: 'source' | 'support' | 'conflict' | 'verification';
|
|
374
|
+
weight: number;
|
|
375
|
+
createdAt: number;
|
|
376
|
+
}
|
|
377
|
+
export interface BeliefCandidate {
|
|
378
|
+
projectId?: string;
|
|
379
|
+
scope: ScopeType;
|
|
380
|
+
subject: string;
|
|
381
|
+
predicate: string;
|
|
382
|
+
objectValue: BeliefValue;
|
|
383
|
+
confidence: number;
|
|
384
|
+
trustScore?: number;
|
|
385
|
+
sourceNeuronId?: string;
|
|
386
|
+
sourceEventId?: string;
|
|
387
|
+
sourceType: SourceType;
|
|
388
|
+
validityKind?: BeliefValidityKind;
|
|
389
|
+
validFrom?: number;
|
|
390
|
+
validTo?: number;
|
|
391
|
+
explanation?: string;
|
|
392
|
+
metadata?: Record<string, unknown>;
|
|
393
|
+
extractionReason: 'explicit_user_statement' | 'decision_statement' | 'tool_verified_fact' | 'preference_signal' | 'workflow_rule';
|
|
394
|
+
}
|
|
395
|
+
export interface BeliefConflictCandidate {
|
|
396
|
+
existing: BeliefRecord;
|
|
397
|
+
incoming: BeliefCandidate;
|
|
398
|
+
reason: 'same_canonical_key' | 'contradictory_value' | 'overlapping_time_range' | 'same_value' | 'scope_conflict';
|
|
399
|
+
}
|
|
400
|
+
export interface BeliefRevisionDecision {
|
|
401
|
+
action: 'insert' | 'supersede_existing' | 'reject_incoming' | 'coexist_conditional' | 'revoke_existing';
|
|
402
|
+
supersedeBeliefIds?: string[];
|
|
403
|
+
rejectReason?: string;
|
|
404
|
+
contradictionGroup?: string;
|
|
405
|
+
normalizedMetadata?: Record<string, unknown>;
|
|
406
|
+
}
|
|
407
|
+
export interface RankedBelief {
|
|
408
|
+
belief: BeliefRecord;
|
|
409
|
+
score: number;
|
|
410
|
+
reasons: string[];
|
|
411
|
+
supportingNeuronIds: string[];
|
|
412
|
+
}
|
|
413
|
+
export interface RankedEpisode {
|
|
414
|
+
neuron: Neuron;
|
|
415
|
+
score: number;
|
|
416
|
+
reasons: string[];
|
|
417
|
+
}
|
|
418
|
+
export interface ContextPack {
|
|
419
|
+
fusionPath: ContextFusionPath;
|
|
420
|
+
compiledEvidence: Array<{
|
|
421
|
+
evidenceType: 'fact' | 'event';
|
|
422
|
+
evidenceId: string;
|
|
423
|
+
neuronId: string;
|
|
424
|
+
summary: string;
|
|
425
|
+
confidence: number;
|
|
426
|
+
}>;
|
|
427
|
+
rawEvidence: Array<{
|
|
428
|
+
neuronId: string;
|
|
429
|
+
content: string;
|
|
430
|
+
createdAt: number;
|
|
431
|
+
score: number;
|
|
432
|
+
}>;
|
|
433
|
+
conflictTrace: Array<{
|
|
434
|
+
conflictingRawContent: string;
|
|
435
|
+
conflictingCompiledFact: {
|
|
436
|
+
factId: string;
|
|
437
|
+
subject: string;
|
|
438
|
+
predicateFamily: string;
|
|
439
|
+
predicateValue?: string;
|
|
440
|
+
object?: string;
|
|
441
|
+
confidence: number;
|
|
442
|
+
};
|
|
443
|
+
resolutionReason: FusionResolutionReason;
|
|
444
|
+
}>;
|
|
445
|
+
coreFacts: RankedBelief[];
|
|
446
|
+
activeConstraints: RankedBelief[];
|
|
447
|
+
compiledFacts: Array<{
|
|
448
|
+
factId: string;
|
|
449
|
+
neuronId: string;
|
|
450
|
+
subject: string;
|
|
451
|
+
predicateFamily: string;
|
|
452
|
+
predicateValue?: string;
|
|
453
|
+
object?: string;
|
|
454
|
+
entityId?: string;
|
|
455
|
+
validFrom: number;
|
|
456
|
+
validTo?: number;
|
|
457
|
+
confidence: number;
|
|
458
|
+
status: 'provisional' | 'verified' | 'superseded' | 'archived' | 'rejected' | 'provisional_enriched' | 'enriched_candidate';
|
|
459
|
+
sourceText: string;
|
|
460
|
+
metadata?: Record<string, unknown>;
|
|
461
|
+
}>;
|
|
462
|
+
compiledEvents: Array<{
|
|
463
|
+
eventId: string;
|
|
464
|
+
neuronId: string;
|
|
465
|
+
unitId?: string;
|
|
466
|
+
eventType: string;
|
|
467
|
+
actor?: string;
|
|
468
|
+
target?: string;
|
|
469
|
+
validFrom: number;
|
|
470
|
+
validTo?: number;
|
|
471
|
+
confidence: number;
|
|
472
|
+
status: 'provisional' | 'verified' | 'archived';
|
|
473
|
+
payload?: Record<string, unknown>;
|
|
474
|
+
}>;
|
|
475
|
+
supportingEpisodes: RankedEpisode[];
|
|
476
|
+
recentEpisodes: RankedEpisode[];
|
|
477
|
+
runtimeDiagnostics: Array<{
|
|
478
|
+
beliefId: string;
|
|
479
|
+
predicate: string;
|
|
480
|
+
runtimeId: string;
|
|
481
|
+
allowed: boolean;
|
|
482
|
+
executionReady: boolean;
|
|
483
|
+
blockedSteps: Array<{
|
|
484
|
+
step: string;
|
|
485
|
+
reasons: string[];
|
|
486
|
+
}>;
|
|
487
|
+
mergeReadiness: Array<{
|
|
488
|
+
into: string;
|
|
489
|
+
ready: boolean;
|
|
490
|
+
missing: string[];
|
|
491
|
+
}>;
|
|
492
|
+
validationReadiness: Array<{
|
|
493
|
+
target: string;
|
|
494
|
+
ready: boolean;
|
|
495
|
+
missingChecks: string[];
|
|
496
|
+
}>;
|
|
497
|
+
policyActions: Array<{
|
|
498
|
+
policy: string;
|
|
499
|
+
action: 'allow' | 'deny' | 'prefer';
|
|
500
|
+
}>;
|
|
501
|
+
executionFeedback?: {
|
|
502
|
+
matchedExecutions: number;
|
|
503
|
+
executed: number;
|
|
504
|
+
failed: number;
|
|
505
|
+
latestStatus?: string;
|
|
506
|
+
};
|
|
507
|
+
}>;
|
|
508
|
+
contradictions: Array<{
|
|
509
|
+
canonicalKey: string;
|
|
510
|
+
active?: BeliefRecord;
|
|
511
|
+
alternatives: BeliefRecord[];
|
|
512
|
+
reason: string;
|
|
513
|
+
}>;
|
|
514
|
+
debug: {
|
|
515
|
+
usedSources: Array<'beliefs' | 'vector' | 'fts' | 'graph' | 'topology' | 'entity'>;
|
|
516
|
+
plannerReasons: string[];
|
|
517
|
+
narrowingTrace?: Array<{
|
|
518
|
+
stage: string;
|
|
519
|
+
action: 'seed' | 'shrink' | 'expand' | 'filter' | 'rank';
|
|
520
|
+
beforeCount?: number;
|
|
521
|
+
afterCount?: number;
|
|
522
|
+
reason: string;
|
|
523
|
+
}>;
|
|
524
|
+
excludedCandidates?: Array<{
|
|
525
|
+
source: 'vector' | 'fts' | 'graph' | 'topology' | 'entity';
|
|
526
|
+
candidateId: string;
|
|
527
|
+
reason: string;
|
|
528
|
+
}>;
|
|
529
|
+
entityContext?: {
|
|
530
|
+
resolvedEntityIds: string[];
|
|
531
|
+
relatedEntityIds: string[];
|
|
532
|
+
candidateNeuronIds: string[];
|
|
533
|
+
entityIsolationApplied?: boolean;
|
|
534
|
+
ambiguous?: boolean;
|
|
535
|
+
scopedNeuronIds?: string[];
|
|
536
|
+
disambiguation?: Array<{
|
|
537
|
+
reference: string;
|
|
538
|
+
candidates: Array<{
|
|
539
|
+
entityId: string;
|
|
540
|
+
score: number;
|
|
541
|
+
reasons: string[];
|
|
542
|
+
}>;
|
|
543
|
+
}>;
|
|
544
|
+
};
|
|
545
|
+
cognitiveGraph?: {
|
|
546
|
+
seedNodeIds: string[];
|
|
547
|
+
traversedNodeIds: string[];
|
|
548
|
+
edgeCount: number;
|
|
549
|
+
};
|
|
550
|
+
temporalWindow?: {
|
|
551
|
+
start?: number;
|
|
552
|
+
end?: number;
|
|
553
|
+
bucketType?: 'day' | 'week' | 'month';
|
|
554
|
+
bucketLabels?: string[];
|
|
555
|
+
};
|
|
556
|
+
queryCompiler?: {
|
|
557
|
+
confidence: number;
|
|
558
|
+
entityHints: string[];
|
|
559
|
+
temporalHints: string[];
|
|
560
|
+
issueHints?: string[];
|
|
561
|
+
relativeReferences?: string[];
|
|
562
|
+
parseMode?: 'grammar';
|
|
563
|
+
residualQuery?: string;
|
|
564
|
+
nativeDirectives?: {
|
|
565
|
+
entity?: string;
|
|
566
|
+
entityType?: string;
|
|
567
|
+
project?: string;
|
|
568
|
+
branch?: string;
|
|
569
|
+
task?: string;
|
|
570
|
+
cluster?: string;
|
|
571
|
+
time?: string;
|
|
572
|
+
from?: string;
|
|
573
|
+
to?: string;
|
|
574
|
+
around?: string;
|
|
575
|
+
mode?: 'continuous' | 'focused';
|
|
576
|
+
};
|
|
577
|
+
clauses?: Array<{
|
|
578
|
+
key: 'entity' | 'entityType' | 'project' | 'branch' | 'task' | 'cluster' | 'time' | 'from' | 'to' | 'around' | 'mode';
|
|
579
|
+
value: string;
|
|
580
|
+
}>;
|
|
581
|
+
};
|
|
582
|
+
queryTimePendingEntityResolution?: {
|
|
583
|
+
hookRan: boolean;
|
|
584
|
+
overallStatus: 'not_applicable' | 'not_needed' | 'narrowed_but_still_ambiguous' | 'resolved_narrowly' | 'unresolved_explicit';
|
|
585
|
+
resolvedCount: number;
|
|
586
|
+
unresolvedCount: number;
|
|
587
|
+
candidateEntityIds: string[];
|
|
588
|
+
results: Array<{
|
|
589
|
+
reference: string;
|
|
590
|
+
resolvedInstanceId?: string;
|
|
591
|
+
queryTimeResolutionStatus: 'not_applicable' | 'not_needed' | 'narrowed_but_still_ambiguous' | 'resolved_narrowly' | 'unresolved_explicit';
|
|
592
|
+
queryTimeResolutionReason: 'no_relative_pending_reference_in_query' | 'no_matching_pending_reference' | 'write_time_resolution_already_sufficient' | 'pending_relative_reference_narrowed' | 'pending_relative_reference_ambiguous_after_narrowing' | 'pending_reference_still_unresolved';
|
|
593
|
+
resolutionConfidence: number;
|
|
594
|
+
candidateEntityIds: string[];
|
|
595
|
+
narrowedCandidates: Array<{
|
|
596
|
+
entityId: string;
|
|
597
|
+
score: number;
|
|
598
|
+
reasons: string[];
|
|
599
|
+
}>;
|
|
600
|
+
matchedPendingIds?: string[];
|
|
601
|
+
}>;
|
|
602
|
+
};
|
|
603
|
+
fusionStrategy?: {
|
|
604
|
+
chosenEvidence: Array<{
|
|
605
|
+
source: 'compiled' | 'raw';
|
|
606
|
+
evidenceId: string;
|
|
607
|
+
}>;
|
|
608
|
+
rejectedEvidence: Array<{
|
|
609
|
+
source: 'compiled' | 'raw';
|
|
610
|
+
evidenceId: string;
|
|
611
|
+
reason: string;
|
|
612
|
+
}>;
|
|
613
|
+
resolutionReason?: FusionResolutionReason;
|
|
614
|
+
};
|
|
615
|
+
boundaryClosure?: {
|
|
616
|
+
selfCorrection?: {
|
|
617
|
+
artifactFactIds: string[];
|
|
618
|
+
stage: 'write_time' | 'enrichment' | 'offline_consolidation';
|
|
619
|
+
};
|
|
620
|
+
previousReference?: {
|
|
621
|
+
boundaryState: 'resolved_entity_focus' | 'mixed_candidates_visible' | 'not_applicable';
|
|
622
|
+
preferredEntityIds: string[];
|
|
623
|
+
suppressedFactIds: string[];
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
pulseTrace?: Array<{
|
|
627
|
+
pulse: 0 | 1 | 2 | 3;
|
|
628
|
+
stage: string;
|
|
629
|
+
candidateCount: number;
|
|
630
|
+
reason: string;
|
|
631
|
+
}>;
|
|
632
|
+
universeTraversal?: {
|
|
633
|
+
narrativeHeadline: string;
|
|
634
|
+
path: string[];
|
|
635
|
+
whyMatched: string[];
|
|
636
|
+
runtimePath?: string[];
|
|
637
|
+
runtimeSegments?: Array<{
|
|
638
|
+
stage: string;
|
|
639
|
+
label: string;
|
|
640
|
+
count?: number;
|
|
641
|
+
}>;
|
|
642
|
+
};
|
|
643
|
+
temporalTraversal?: {
|
|
644
|
+
bucketType?: 'day' | 'week' | 'month';
|
|
645
|
+
bucketIds: string[];
|
|
646
|
+
labels: string[];
|
|
647
|
+
candidateNeuronIds: string[];
|
|
648
|
+
traversalMode?: 'surface' | 'adjacent_fallback' | 'nearest_fallback';
|
|
649
|
+
segments?: Array<{
|
|
650
|
+
bucketId: string;
|
|
651
|
+
label: string;
|
|
652
|
+
source: 'seed' | 'window' | 'adjacent' | 'nearest' | 'band';
|
|
653
|
+
branchIds?: string[];
|
|
654
|
+
taskIds?: string[];
|
|
655
|
+
clusterIds?: string[];
|
|
656
|
+
}>;
|
|
657
|
+
};
|
|
658
|
+
denseSearch?: {
|
|
659
|
+
candidateNeuronIds: string[];
|
|
660
|
+
reason: string;
|
|
661
|
+
};
|
|
662
|
+
retrievalChannels?: {
|
|
663
|
+
rawEpisodeNeuronIds: string[];
|
|
664
|
+
compiledFactIds: string[];
|
|
665
|
+
compiledEventIds: string[];
|
|
666
|
+
suppressedSupersededFactIds?: string[];
|
|
667
|
+
primaryChannel: 'raw' | 'compiled' | 'hybrid';
|
|
668
|
+
};
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
export interface RuntimeDiagnosticsHistoryPage {
|
|
672
|
+
runtimeId: string;
|
|
673
|
+
page: number;
|
|
674
|
+
pageSize: number;
|
|
675
|
+
totalTransitions: number;
|
|
676
|
+
transitions: Array<{
|
|
677
|
+
transitionId: string;
|
|
678
|
+
runtimeId: string;
|
|
679
|
+
entityType: string;
|
|
680
|
+
entityKey: string;
|
|
681
|
+
transitionType: string;
|
|
682
|
+
fromStatus?: string;
|
|
683
|
+
toStatus: string;
|
|
684
|
+
payload?: Record<string, unknown>;
|
|
685
|
+
occurredAt: number;
|
|
686
|
+
}>;
|
|
687
|
+
currentStates: Array<{
|
|
688
|
+
runtimeId: string;
|
|
689
|
+
entityType: string;
|
|
690
|
+
entityKey: string;
|
|
691
|
+
status: string;
|
|
692
|
+
metadata?: Record<string, unknown>;
|
|
693
|
+
updatedAt: number;
|
|
694
|
+
}>;
|
|
695
|
+
appliedFilters?: {
|
|
696
|
+
entityTypes?: string[];
|
|
697
|
+
transitionTypes?: string[];
|
|
698
|
+
status?: string[];
|
|
699
|
+
startTime?: number;
|
|
700
|
+
endTime?: number;
|
|
701
|
+
};
|
|
702
|
+
}
|
|
703
|
+
export interface PolicyExecutionAuditPage {
|
|
704
|
+
page: number;
|
|
705
|
+
pageSize: number;
|
|
706
|
+
total: number;
|
|
707
|
+
records: Array<{
|
|
708
|
+
executionId: string;
|
|
709
|
+
idempotencyKey: string;
|
|
710
|
+
runtimeId?: string;
|
|
711
|
+
policy: string;
|
|
712
|
+
action: string;
|
|
713
|
+
target?: string;
|
|
714
|
+
status: string;
|
|
715
|
+
attemptCount: number;
|
|
716
|
+
nextRetryAt?: number;
|
|
717
|
+
deadLetteredAt?: number;
|
|
718
|
+
replayPolicy?: string;
|
|
719
|
+
actorId?: string;
|
|
720
|
+
causationId?: string;
|
|
721
|
+
correlationId?: string;
|
|
722
|
+
policyGroup?: string;
|
|
723
|
+
streamType?: string;
|
|
724
|
+
eventType?: string;
|
|
725
|
+
detail?: string;
|
|
726
|
+
metadata?: Record<string, unknown>;
|
|
727
|
+
createdAt: number;
|
|
728
|
+
updatedAt: number;
|
|
729
|
+
}>;
|
|
730
|
+
appliedFilters?: {
|
|
731
|
+
runtimeId?: string;
|
|
732
|
+
actorId?: string[];
|
|
733
|
+
causationId?: string[];
|
|
734
|
+
correlationId?: string[];
|
|
735
|
+
policyGroup?: string[];
|
|
736
|
+
streamType?: string[];
|
|
737
|
+
eventType?: string[];
|
|
738
|
+
policy?: string[];
|
|
739
|
+
target?: string[];
|
|
740
|
+
status?: string[];
|
|
741
|
+
replayPolicy?: string[];
|
|
742
|
+
startTime?: number;
|
|
743
|
+
endTime?: number;
|
|
744
|
+
};
|
|
745
|
+
}
|
|
746
|
+
export interface RuntimeAuditTrail {
|
|
747
|
+
runtimeHistory: RuntimeDiagnosticsHistoryPage;
|
|
748
|
+
policyExecutions: PolicyExecutionAuditPage;
|
|
749
|
+
}
|
|
750
|
+
export interface UnifiedAuditBundle {
|
|
751
|
+
runtimeHistory?: RuntimeDiagnosticsHistoryPage;
|
|
752
|
+
policyExecutions?: PolicyExecutionAuditPage;
|
|
753
|
+
events: EventAuditPage;
|
|
754
|
+
}
|
|
755
|
+
export interface ProjectionObservabilityStats {
|
|
756
|
+
vector: {
|
|
757
|
+
projectionName: string;
|
|
758
|
+
checkpointStatus: 'idle' | 'building' | 'ready' | 'degraded' | 'failed';
|
|
759
|
+
lastEventId?: string;
|
|
760
|
+
lastEventTime?: number;
|
|
761
|
+
lastRebuildAt?: number;
|
|
762
|
+
lastFullCount: number;
|
|
763
|
+
pendingEvents: number;
|
|
764
|
+
projectedCount: number;
|
|
765
|
+
};
|
|
766
|
+
runtime: {
|
|
767
|
+
projectionName: string;
|
|
768
|
+
checkpointStatus: 'idle' | 'building' | 'ready' | 'degraded' | 'failed';
|
|
769
|
+
lastEventId?: string;
|
|
770
|
+
lastEventTime?: number;
|
|
771
|
+
lastRebuildAt?: number;
|
|
772
|
+
lastFullCount: number;
|
|
773
|
+
pendingEvents: number;
|
|
774
|
+
projectedStateCount: number;
|
|
775
|
+
};
|
|
776
|
+
policy: {
|
|
777
|
+
projectionName: string;
|
|
778
|
+
checkpointStatus: 'idle' | 'building' | 'ready' | 'degraded' | 'failed';
|
|
779
|
+
lastEventId?: string;
|
|
780
|
+
lastEventTime?: number;
|
|
781
|
+
lastRebuildAt?: number;
|
|
782
|
+
lastFullCount: number;
|
|
783
|
+
pendingEvents: number;
|
|
784
|
+
projectedExecutionCount: number;
|
|
785
|
+
deadLetterCount: number;
|
|
786
|
+
pendingRetryCount: number;
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
export interface RetrievalCacheStats {
|
|
790
|
+
size: number;
|
|
791
|
+
hits: number;
|
|
792
|
+
misses: number;
|
|
793
|
+
}
|
|
794
|
+
export interface ProjectionObservabilityStorageStats {
|
|
795
|
+
rawSampleCount: number;
|
|
796
|
+
rollupCount: number;
|
|
797
|
+
rollupBuckets: number[];
|
|
798
|
+
}
|
|
799
|
+
export interface ProjectionObservabilityHistoryPage {
|
|
800
|
+
page: number;
|
|
801
|
+
pageSize: number;
|
|
802
|
+
total: number;
|
|
803
|
+
samples: Array<{
|
|
804
|
+
projectionType: 'vector' | 'runtime' | 'policy';
|
|
805
|
+
projectionName: string;
|
|
806
|
+
checkpointStatus: 'idle' | 'building' | 'ready' | 'degraded' | 'failed';
|
|
807
|
+
pendingEvents: number;
|
|
808
|
+
materializedCount: number;
|
|
809
|
+
sampledAt: number;
|
|
810
|
+
metadata?: Record<string, unknown>;
|
|
811
|
+
}>;
|
|
812
|
+
appliedFilters?: {
|
|
813
|
+
projectionType?: Array<'vector' | 'runtime' | 'policy'>;
|
|
814
|
+
checkpointStatus?: Array<'idle' | 'building' | 'ready' | 'degraded' | 'failed'>;
|
|
815
|
+
bucketMs?: number;
|
|
816
|
+
aggregateMode?: 'latest' | 'avg';
|
|
817
|
+
startTime?: number;
|
|
818
|
+
endTime?: number;
|
|
819
|
+
includeRollups?: boolean;
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
export interface BackgroundJobStatus {
|
|
823
|
+
jobName: string;
|
|
824
|
+
intervalMs: number;
|
|
825
|
+
nextRunAt: number;
|
|
826
|
+
lastRunAt?: number;
|
|
827
|
+
lastStatus: 'idle' | 'running' | 'succeeded' | 'failed';
|
|
828
|
+
lastError?: string;
|
|
829
|
+
isEnabled: boolean;
|
|
830
|
+
leaseOwner?: string;
|
|
831
|
+
leaseExpiresAt?: number;
|
|
832
|
+
metadata?: Record<string, unknown>;
|
|
833
|
+
updatedAt: number;
|
|
834
|
+
}
|
|
835
|
+
export interface EventAuditPage {
|
|
836
|
+
page: number;
|
|
837
|
+
pageSize: number;
|
|
838
|
+
total: number;
|
|
839
|
+
records: MemoryEvent[];
|
|
840
|
+
appliedFilters?: {
|
|
841
|
+
streamId?: string[];
|
|
842
|
+
streamType?: StreamType[];
|
|
843
|
+
eventType?: MemoryEventType[];
|
|
844
|
+
actorId?: string[];
|
|
845
|
+
causationId?: string[];
|
|
846
|
+
correlationId?: string[];
|
|
847
|
+
projectId?: string[];
|
|
848
|
+
workspaceId?: string[];
|
|
849
|
+
threadId?: string[];
|
|
850
|
+
sessionId?: string[];
|
|
851
|
+
startTime?: number;
|
|
852
|
+
endTime?: number;
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
//# sourceMappingURL=index.d.ts.map
|