@framers/agentos 0.1.120 → 0.1.122
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/README.md +21 -0
- package/dist/api/agency.d.ts.map +1 -1
- package/dist/api/agency.js +227 -84
- package/dist/api/agency.js.map +1 -1
- package/dist/api/analyzeVideo.d.ts +127 -0
- package/dist/api/analyzeVideo.d.ts.map +1 -0
- package/dist/api/analyzeVideo.js +136 -0
- package/dist/api/analyzeVideo.js.map +1 -0
- package/dist/api/detectScenes.d.ts +82 -0
- package/dist/api/detectScenes.d.ts.map +1 -0
- package/dist/api/detectScenes.js +67 -0
- package/dist/api/detectScenes.js.map +1 -0
- package/dist/api/generateImage.d.ts +7 -0
- package/dist/api/generateImage.d.ts.map +1 -1
- package/dist/api/generateImage.js +133 -9
- package/dist/api/generateImage.js.map +1 -1
- package/dist/api/generateMusic.d.ts +98 -0
- package/dist/api/generateMusic.d.ts.map +1 -0
- package/dist/api/generateMusic.js +319 -0
- package/dist/api/generateMusic.js.map +1 -0
- package/dist/api/generateSFX.d.ts +96 -0
- package/dist/api/generateSFX.d.ts.map +1 -0
- package/dist/api/generateSFX.js +317 -0
- package/dist/api/generateSFX.js.map +1 -0
- package/dist/api/generateVideo.d.ts +113 -0
- package/dist/api/generateVideo.d.ts.map +1 -0
- package/dist/api/generateVideo.js +342 -0
- package/dist/api/generateVideo.js.map +1 -0
- package/dist/api/model.d.ts.map +1 -1
- package/dist/api/model.js +8 -4
- package/dist/api/model.js.map +1 -1
- package/dist/api/performOCR.d.ts +169 -0
- package/dist/api/performOCR.d.ts.map +1 -0
- package/dist/api/performOCR.js +198 -0
- package/dist/api/performOCR.js.map +1 -0
- package/dist/api/provider-defaults.d.ts +7 -5
- package/dist/api/provider-defaults.d.ts.map +1 -1
- package/dist/api/provider-defaults.js +32 -10
- package/dist/api/provider-defaults.js.map +1 -1
- package/dist/api/strategies/debate.d.ts.map +1 -1
- package/dist/api/strategies/debate.js +1 -0
- package/dist/api/strategies/debate.js.map +1 -1
- package/dist/api/strategies/graph.d.ts.map +1 -1
- package/dist/api/strategies/graph.js +69 -13
- package/dist/api/strategies/graph.js.map +1 -1
- package/dist/api/strategies/hierarchical.d.ts.map +1 -1
- package/dist/api/strategies/hierarchical.js +1 -0
- package/dist/api/strategies/hierarchical.js.map +1 -1
- package/dist/api/strategies/parallel.d.ts.map +1 -1
- package/dist/api/strategies/parallel.js +1 -0
- package/dist/api/strategies/parallel.js.map +1 -1
- package/dist/api/strategies/review-loop.d.ts.map +1 -1
- package/dist/api/strategies/review-loop.js +1 -0
- package/dist/api/strategies/review-loop.js.map +1 -1
- package/dist/api/strategies/sequential.d.ts.map +1 -1
- package/dist/api/strategies/sequential.js +54 -48
- package/dist/api/strategies/sequential.js.map +1 -1
- package/dist/api/streamBuffer.d.ts +20 -0
- package/dist/api/streamBuffer.d.ts.map +1 -0
- package/dist/api/streamBuffer.js +81 -0
- package/dist/api/streamBuffer.js.map +1 -0
- package/dist/api/types.d.ts +145 -5
- package/dist/api/types.d.ts.map +1 -1
- package/dist/api/types.js.map +1 -1
- package/dist/channels/adapters/RedditChannelAdapter.js.map +1 -1
- package/dist/core/audio/AudioProcessor.d.ts.map +1 -1
- package/dist/core/audio/AudioProcessor.js +1 -0
- package/dist/core/audio/AudioProcessor.js.map +1 -1
- package/dist/core/audio/EnvironmentalCalibrator.d.ts.map +1 -1
- package/dist/core/audio/EnvironmentalCalibrator.js +1 -0
- package/dist/core/audio/EnvironmentalCalibrator.js.map +1 -1
- package/dist/core/audio/FallbackAudioProxy.d.ts +169 -0
- package/dist/core/audio/FallbackAudioProxy.d.ts.map +1 -0
- package/dist/core/audio/FallbackAudioProxy.js +236 -0
- package/dist/core/audio/FallbackAudioProxy.js.map +1 -0
- package/dist/core/audio/IAudioGenerator.d.ts +103 -0
- package/dist/core/audio/IAudioGenerator.d.ts.map +1 -0
- package/dist/core/audio/IAudioGenerator.js +24 -0
- package/dist/core/audio/IAudioGenerator.js.map +1 -0
- package/dist/core/audio/index.d.ts +54 -0
- package/dist/core/audio/index.d.ts.map +1 -1
- package/dist/core/audio/index.js +93 -0
- package/dist/core/audio/index.js.map +1 -1
- package/dist/core/audio/providers/AudioGenLocalProvider.d.ts +136 -0
- package/dist/core/audio/providers/AudioGenLocalProvider.d.ts.map +1 -0
- package/dist/core/audio/providers/AudioGenLocalProvider.js +235 -0
- package/dist/core/audio/providers/AudioGenLocalProvider.js.map +1 -0
- package/dist/core/audio/providers/ElevenLabsSFXProvider.d.ts +107 -0
- package/dist/core/audio/providers/ElevenLabsSFXProvider.d.ts.map +1 -0
- package/dist/core/audio/providers/ElevenLabsSFXProvider.js +154 -0
- package/dist/core/audio/providers/ElevenLabsSFXProvider.js.map +1 -0
- package/dist/core/audio/providers/FalAudioProvider.d.ts +207 -0
- package/dist/core/audio/providers/FalAudioProvider.d.ts.map +1 -0
- package/dist/core/audio/providers/FalAudioProvider.js +315 -0
- package/dist/core/audio/providers/FalAudioProvider.js.map +1 -0
- package/dist/core/audio/providers/MusicGenLocalProvider.d.ts +136 -0
- package/dist/core/audio/providers/MusicGenLocalProvider.d.ts.map +1 -0
- package/dist/core/audio/providers/MusicGenLocalProvider.js +235 -0
- package/dist/core/audio/providers/MusicGenLocalProvider.js.map +1 -0
- package/dist/core/audio/providers/ReplicateAudioProvider.d.ts +200 -0
- package/dist/core/audio/providers/ReplicateAudioProvider.d.ts.map +1 -0
- package/dist/core/audio/providers/ReplicateAudioProvider.js +346 -0
- package/dist/core/audio/providers/ReplicateAudioProvider.js.map +1 -0
- package/dist/core/audio/providers/StableAudioProvider.d.ts +138 -0
- package/dist/core/audio/providers/StableAudioProvider.d.ts.map +1 -0
- package/dist/core/audio/providers/StableAudioProvider.js +192 -0
- package/dist/core/audio/providers/StableAudioProvider.js.map +1 -0
- package/dist/core/audio/providers/SunoProvider.d.ts +182 -0
- package/dist/core/audio/providers/SunoProvider.d.ts.map +1 -0
- package/dist/core/audio/providers/SunoProvider.js +312 -0
- package/dist/core/audio/providers/SunoProvider.js.map +1 -0
- package/dist/core/audio/providers/UdioProvider.d.ts +177 -0
- package/dist/core/audio/providers/UdioProvider.d.ts.map +1 -0
- package/dist/core/audio/providers/UdioProvider.js +305 -0
- package/dist/core/audio/providers/UdioProvider.js.map +1 -0
- package/dist/core/audio/types.d.ts +257 -0
- package/dist/core/audio/types.d.ts.map +1 -0
- package/dist/core/audio/types.js +21 -0
- package/dist/core/audio/types.js.map +1 -0
- package/dist/core/images/FallbackImageProxy.d.ts +183 -0
- package/dist/core/images/FallbackImageProxy.d.ts.map +1 -0
- package/dist/core/images/FallbackImageProxy.js +283 -0
- package/dist/core/images/FallbackImageProxy.js.map +1 -0
- package/dist/core/images/IImageProvider.d.ts +1 -1
- package/dist/core/images/IImageProvider.d.ts.map +1 -1
- package/dist/core/images/index.d.ts +1 -0
- package/dist/core/images/index.d.ts.map +1 -1
- package/dist/core/images/index.js +1 -0
- package/dist/core/images/index.js.map +1 -1
- package/dist/core/llm/providers/AIModelProviderManager.d.ts +3 -1
- package/dist/core/llm/providers/AIModelProviderManager.d.ts.map +1 -1
- package/dist/core/llm/providers/AIModelProviderManager.js +8 -0
- package/dist/core/llm/providers/AIModelProviderManager.js.map +1 -1
- package/dist/core/llm/providers/errors/ClaudeCodeProviderError.d.ts +52 -0
- package/dist/core/llm/providers/errors/ClaudeCodeProviderError.d.ts.map +1 -0
- package/dist/core/llm/providers/errors/ClaudeCodeProviderError.js +36 -0
- package/dist/core/llm/providers/errors/ClaudeCodeProviderError.js.map +1 -0
- package/dist/core/llm/providers/errors/GeminiCLIProviderError.d.ts +32 -0
- package/dist/core/llm/providers/errors/GeminiCLIProviderError.d.ts.map +1 -0
- package/dist/core/llm/providers/errors/GeminiCLIProviderError.js +27 -0
- package/dist/core/llm/providers/errors/GeminiCLIProviderError.js.map +1 -0
- package/dist/core/llm/providers/implementations/ClaudeCodeCLIBridge.d.ts +38 -0
- package/dist/core/llm/providers/implementations/ClaudeCodeCLIBridge.d.ts.map +1 -0
- package/dist/core/llm/providers/implementations/ClaudeCodeCLIBridge.js +128 -0
- package/dist/core/llm/providers/implementations/ClaudeCodeCLIBridge.js.map +1 -0
- package/dist/core/llm/providers/implementations/ClaudeCodeProvider.d.ts +107 -0
- package/dist/core/llm/providers/implementations/ClaudeCodeProvider.d.ts.map +1 -0
- package/dist/core/llm/providers/implementations/ClaudeCodeProvider.js +504 -0
- package/dist/core/llm/providers/implementations/ClaudeCodeProvider.js.map +1 -0
- package/dist/core/llm/providers/implementations/GeminiCLIBridge.d.ts +60 -0
- package/dist/core/llm/providers/implementations/GeminiCLIBridge.d.ts.map +1 -0
- package/dist/core/llm/providers/implementations/GeminiCLIBridge.js +177 -0
- package/dist/core/llm/providers/implementations/GeminiCLIBridge.js.map +1 -0
- package/dist/core/llm/providers/implementations/GeminiCLIProvider.d.ts +55 -0
- package/dist/core/llm/providers/implementations/GeminiCLIProvider.d.ts.map +1 -0
- package/dist/core/llm/providers/implementations/GeminiCLIProvider.js +447 -0
- package/dist/core/llm/providers/implementations/GeminiCLIProvider.js.map +1 -0
- package/dist/core/media/ProviderPreferences.d.ts +158 -0
- package/dist/core/media/ProviderPreferences.d.ts.map +1 -0
- package/dist/core/media/ProviderPreferences.js +183 -0
- package/dist/core/media/ProviderPreferences.js.map +1 -0
- package/dist/core/subprocess/CLIRegistry.d.ts +71 -0
- package/dist/core/subprocess/CLIRegistry.d.ts.map +1 -0
- package/dist/core/subprocess/CLIRegistry.js +210 -0
- package/dist/core/subprocess/CLIRegistry.js.map +1 -0
- package/dist/core/subprocess/CLISubprocessBridge.d.ts +117 -0
- package/dist/core/subprocess/CLISubprocessBridge.d.ts.map +1 -0
- package/dist/core/subprocess/CLISubprocessBridge.js +199 -0
- package/dist/core/subprocess/CLISubprocessBridge.js.map +1 -0
- package/dist/core/subprocess/errors.d.ts +76 -0
- package/dist/core/subprocess/errors.d.ts.map +1 -0
- package/dist/core/subprocess/errors.js +75 -0
- package/dist/core/subprocess/errors.js.map +1 -0
- package/dist/core/subprocess/index.d.ts +11 -0
- package/dist/core/subprocess/index.d.ts.map +1 -0
- package/dist/core/subprocess/index.js +10 -0
- package/dist/core/subprocess/index.js.map +1 -0
- package/dist/core/subprocess/types.d.ts +100 -0
- package/dist/core/subprocess/types.d.ts.map +1 -0
- package/dist/core/subprocess/types.js +9 -0
- package/dist/core/subprocess/types.js.map +1 -0
- package/dist/core/video/FallbackVideoProxy.d.ts +166 -0
- package/dist/core/video/FallbackVideoProxy.d.ts.map +1 -0
- package/dist/core/video/FallbackVideoProxy.js +228 -0
- package/dist/core/video/FallbackVideoProxy.js.map +1 -0
- package/dist/core/video/IVideoAnalyzer.d.ts +29 -0
- package/dist/core/video/IVideoAnalyzer.d.ts.map +1 -0
- package/dist/core/video/IVideoAnalyzer.js +12 -0
- package/dist/core/video/IVideoAnalyzer.js.map +1 -0
- package/dist/core/video/IVideoGenerator.d.ts +76 -0
- package/dist/core/video/IVideoGenerator.d.ts.map +1 -0
- package/dist/core/video/IVideoGenerator.js +13 -0
- package/dist/core/video/IVideoGenerator.js.map +1 -0
- package/dist/core/video/VideoAnalyzer.d.ts +278 -0
- package/dist/core/video/VideoAnalyzer.d.ts.map +1 -0
- package/dist/core/video/VideoAnalyzer.js +648 -0
- package/dist/core/video/VideoAnalyzer.js.map +1 -0
- package/dist/core/video/index.d.ts +55 -0
- package/dist/core/video/index.d.ts.map +1 -0
- package/dist/core/video/index.js +78 -0
- package/dist/core/video/index.js.map +1 -0
- package/dist/core/video/providers/FalVideoProvider.d.ts +195 -0
- package/dist/core/video/providers/FalVideoProvider.d.ts.map +1 -0
- package/dist/core/video/providers/FalVideoProvider.js +322 -0
- package/dist/core/video/providers/FalVideoProvider.js.map +1 -0
- package/dist/core/video/providers/ReplicateVideoProvider.d.ts +194 -0
- package/dist/core/video/providers/ReplicateVideoProvider.d.ts.map +1 -0
- package/dist/core/video/providers/ReplicateVideoProvider.js +356 -0
- package/dist/core/video/providers/ReplicateVideoProvider.js.map +1 -0
- package/dist/core/video/providers/RunwayVideoProvider.d.ts +175 -0
- package/dist/core/video/providers/RunwayVideoProvider.d.ts.map +1 -0
- package/dist/core/video/providers/RunwayVideoProvider.js +293 -0
- package/dist/core/video/providers/RunwayVideoProvider.js.map +1 -0
- package/dist/core/video/types.d.ts +441 -0
- package/dist/core/video/types.d.ts.map +1 -0
- package/dist/core/video/types.js +10 -0
- package/dist/core/video/types.js.map +1 -0
- package/dist/core/vision/SceneDetector.d.ts +180 -0
- package/dist/core/vision/SceneDetector.d.ts.map +1 -0
- package/dist/core/vision/SceneDetector.js +366 -0
- package/dist/core/vision/SceneDetector.js.map +1 -0
- package/dist/core/vision/index.d.ts +2 -1
- package/dist/core/vision/index.d.ts.map +1 -1
- package/dist/core/vision/index.js +1 -0
- package/dist/core/vision/index.js.map +1 -1
- package/dist/core/vision/types.d.ts +125 -0
- package/dist/core/vision/types.d.ts.map +1 -1
- package/dist/discovery/CapabilityDiscoveryEngine.d.ts +32 -0
- package/dist/discovery/CapabilityDiscoveryEngine.d.ts.map +1 -1
- package/dist/discovery/CapabilityDiscoveryEngine.js +46 -0
- package/dist/discovery/CapabilityDiscoveryEngine.js.map +1 -1
- package/dist/emergent/AdaptPersonalityTool.d.ts +158 -0
- package/dist/emergent/AdaptPersonalityTool.d.ts.map +1 -0
- package/dist/emergent/AdaptPersonalityTool.js +190 -0
- package/dist/emergent/AdaptPersonalityTool.js.map +1 -0
- package/dist/emergent/CreateWorkflowTool.d.ts +181 -0
- package/dist/emergent/CreateWorkflowTool.d.ts.map +1 -0
- package/dist/emergent/CreateWorkflowTool.js +307 -0
- package/dist/emergent/CreateWorkflowTool.js.map +1 -0
- package/dist/emergent/ManageSkillsTool.d.ts +154 -0
- package/dist/emergent/ManageSkillsTool.d.ts.map +1 -0
- package/dist/emergent/ManageSkillsTool.js +241 -0
- package/dist/emergent/ManageSkillsTool.js.map +1 -0
- package/dist/emergent/PersonalityMutationStore.d.ts +183 -0
- package/dist/emergent/PersonalityMutationStore.d.ts.map +1 -0
- package/dist/emergent/PersonalityMutationStore.js +222 -0
- package/dist/emergent/PersonalityMutationStore.js.map +1 -0
- package/dist/emergent/SelfEvaluateTool.d.ts +189 -0
- package/dist/emergent/SelfEvaluateTool.d.ts.map +1 -0
- package/dist/emergent/SelfEvaluateTool.js +353 -0
- package/dist/emergent/SelfEvaluateTool.js.map +1 -0
- package/dist/emergent/SelfImprovementConfig.d.ts +166 -0
- package/dist/emergent/SelfImprovementConfig.d.ts.map +1 -0
- package/dist/emergent/SelfImprovementConfig.js +43 -0
- package/dist/emergent/SelfImprovementConfig.js.map +1 -0
- package/dist/emergent/index.d.ts +1 -0
- package/dist/emergent/index.d.ts.map +1 -1
- package/dist/emergent/index.js +1 -0
- package/dist/emergent/index.js.map +1 -1
- package/dist/emergent/types.d.ts +9 -0
- package/dist/emergent/types.d.ts.map +1 -1
- package/dist/emergent/types.js.map +1 -1
- package/dist/extensions/MultiRegistryLoader.js.map +1 -1
- package/dist/index.d.ts +17 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/memory/CognitiveMemoryManager.d.ts +40 -0
- package/dist/memory/CognitiveMemoryManager.d.ts.map +1 -1
- package/dist/memory/CognitiveMemoryManager.js +54 -1
- package/dist/memory/CognitiveMemoryManager.js.map +1 -1
- package/dist/memory/facade/Memory.d.ts +4 -0
- package/dist/memory/facade/Memory.d.ts.map +1 -1
- package/dist/memory/facade/Memory.js +140 -4
- package/dist/memory/facade/Memory.js.map +1 -1
- package/dist/memory/facade/types.d.ts +30 -2
- package/dist/memory/facade/types.d.ts.map +1 -1
- package/dist/memory/index.d.ts +1 -0
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +1 -0
- package/dist/memory/index.js.map +1 -1
- package/dist/memory/types.d.ts +15 -0
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/query-router/QueryClassifier.d.ts +192 -21
- package/dist/query-router/QueryClassifier.d.ts.map +1 -1
- package/dist/query-router/QueryClassifier.js +604 -23
- package/dist/query-router/QueryClassifier.js.map +1 -1
- package/dist/query-router/QueryDispatcher.d.ts +106 -8
- package/dist/query-router/QueryDispatcher.d.ts.map +1 -1
- package/dist/query-router/QueryDispatcher.js +387 -8
- package/dist/query-router/QueryDispatcher.js.map +1 -1
- package/dist/query-router/QueryRouter.d.ts +198 -14
- package/dist/query-router/QueryRouter.d.ts.map +1 -1
- package/dist/query-router/QueryRouter.js +738 -50
- package/dist/query-router/QueryRouter.js.map +1 -1
- package/dist/query-router/index.d.ts +1 -1
- package/dist/query-router/index.d.ts.map +1 -1
- package/dist/query-router/index.js +1 -1
- package/dist/query-router/index.js.map +1 -1
- package/dist/query-router/types.d.ts +396 -3
- package/dist/query-router/types.d.ts.map +1 -1
- package/dist/query-router/types.js +35 -0
- package/dist/query-router/types.js.map +1 -1
- package/dist/rag/HydeRetriever.d.ts +108 -0
- package/dist/rag/HydeRetriever.d.ts.map +1 -1
- package/dist/rag/HydeRetriever.js +184 -0
- package/dist/rag/HydeRetriever.js.map +1 -1
- package/dist/rag/IRetrievalAugmentor.d.ts +15 -0
- package/dist/rag/IRetrievalAugmentor.d.ts.map +1 -1
- package/dist/rag/RetrievalAugmentor.d.ts +58 -0
- package/dist/rag/RetrievalAugmentor.d.ts.map +1 -1
- package/dist/rag/RetrievalAugmentor.js +200 -32
- package/dist/rag/RetrievalAugmentor.js.map +1 -1
- package/dist/rag/VectorStoreManager.js +1 -1
- package/dist/rag/audit/RAGAuditCollector.d.ts +7 -0
- package/dist/rag/audit/RAGAuditCollector.d.ts.map +1 -1
- package/dist/rag/audit/RAGAuditCollector.js +10 -0
- package/dist/rag/audit/RAGAuditCollector.js.map +1 -1
- package/dist/rag/audit/RAGAuditTypes.d.ts +10 -1
- package/dist/rag/audit/RAGAuditTypes.d.ts.map +1 -1
- package/dist/rag/chunking/SemanticChunker.d.ts +210 -0
- package/dist/rag/chunking/SemanticChunker.d.ts.map +1 -0
- package/dist/rag/chunking/SemanticChunker.js +460 -0
- package/dist/rag/chunking/SemanticChunker.js.map +1 -0
- package/dist/rag/chunking/index.d.ts +10 -0
- package/dist/rag/chunking/index.d.ts.map +1 -0
- package/dist/rag/chunking/index.js +10 -0
- package/dist/rag/chunking/index.js.map +1 -0
- package/dist/rag/implementations/vector_stores/PineconeVectorStore.d.ts +103 -0
- package/dist/rag/implementations/vector_stores/PineconeVectorStore.d.ts.map +1 -0
- package/dist/rag/implementations/vector_stores/PineconeVectorStore.js +315 -0
- package/dist/rag/implementations/vector_stores/PineconeVectorStore.js.map +1 -0
- package/dist/rag/implementations/vector_stores/PostgresVectorStore.d.ts +107 -0
- package/dist/rag/implementations/vector_stores/PostgresVectorStore.d.ts.map +1 -0
- package/dist/rag/implementations/vector_stores/PostgresVectorStore.js +438 -0
- package/dist/rag/implementations/vector_stores/PostgresVectorStore.js.map +1 -0
- package/dist/rag/index.d.ts +15 -1
- package/dist/rag/index.d.ts.map +1 -1
- package/dist/rag/index.js +32 -0
- package/dist/rag/index.js.map +1 -1
- package/dist/rag/migration/MigrationEngine.d.ts +47 -0
- package/dist/rag/migration/MigrationEngine.d.ts.map +1 -0
- package/dist/rag/migration/MigrationEngine.js +168 -0
- package/dist/rag/migration/MigrationEngine.js.map +1 -0
- package/dist/rag/migration/adapters/PineconeSourceAdapter.d.ts +23 -0
- package/dist/rag/migration/adapters/PineconeSourceAdapter.d.ts.map +1 -0
- package/dist/rag/migration/adapters/PineconeSourceAdapter.js +63 -0
- package/dist/rag/migration/adapters/PineconeSourceAdapter.js.map +1 -0
- package/dist/rag/migration/adapters/PostgresSourceAdapter.d.ts +30 -0
- package/dist/rag/migration/adapters/PostgresSourceAdapter.d.ts.map +1 -0
- package/dist/rag/migration/adapters/PostgresSourceAdapter.js +71 -0
- package/dist/rag/migration/adapters/PostgresSourceAdapter.js.map +1 -0
- package/dist/rag/migration/adapters/PostgresTargetAdapter.d.ts +38 -0
- package/dist/rag/migration/adapters/PostgresTargetAdapter.d.ts.map +1 -0
- package/dist/rag/migration/adapters/PostgresTargetAdapter.js +114 -0
- package/dist/rag/migration/adapters/PostgresTargetAdapter.js.map +1 -0
- package/dist/rag/migration/adapters/QdrantSourceAdapter.d.ts +36 -0
- package/dist/rag/migration/adapters/QdrantSourceAdapter.d.ts.map +1 -0
- package/dist/rag/migration/adapters/QdrantSourceAdapter.js +109 -0
- package/dist/rag/migration/adapters/QdrantSourceAdapter.js.map +1 -0
- package/dist/rag/migration/adapters/QdrantTargetAdapter.d.ts +35 -0
- package/dist/rag/migration/adapters/QdrantTargetAdapter.d.ts.map +1 -0
- package/dist/rag/migration/adapters/QdrantTargetAdapter.js +110 -0
- package/dist/rag/migration/adapters/QdrantTargetAdapter.js.map +1 -0
- package/dist/rag/migration/adapters/SqliteSourceAdapter.d.ts +37 -0
- package/dist/rag/migration/adapters/SqliteSourceAdapter.d.ts.map +1 -0
- package/dist/rag/migration/adapters/SqliteSourceAdapter.js +72 -0
- package/dist/rag/migration/adapters/SqliteSourceAdapter.js.map +1 -0
- package/dist/rag/migration/adapters/SqliteTargetAdapter.d.ts +47 -0
- package/dist/rag/migration/adapters/SqliteTargetAdapter.d.ts.map +1 -0
- package/dist/rag/migration/adapters/SqliteTargetAdapter.js +93 -0
- package/dist/rag/migration/adapters/SqliteTargetAdapter.js.map +1 -0
- package/dist/rag/migration/types.d.ts +108 -0
- package/dist/rag/migration/types.d.ts.map +1 -0
- package/dist/rag/migration/types.js +11 -0
- package/dist/rag/migration/types.js.map +1 -0
- package/dist/rag/multimodal/MultimodalIndexer.d.ts +35 -0
- package/dist/rag/multimodal/MultimodalIndexer.d.ts.map +1 -1
- package/dist/rag/multimodal/MultimodalIndexer.js +66 -1
- package/dist/rag/multimodal/MultimodalIndexer.js.map +1 -1
- package/dist/rag/multimodal/types.d.ts +24 -0
- package/dist/rag/multimodal/types.d.ts.map +1 -1
- package/dist/rag/raptor/RaptorTree.d.ts +268 -0
- package/dist/rag/raptor/RaptorTree.d.ts.map +1 -0
- package/dist/rag/raptor/RaptorTree.js +443 -0
- package/dist/rag/raptor/RaptorTree.js.map +1 -0
- package/dist/rag/raptor/index.d.ts +11 -0
- package/dist/rag/raptor/index.d.ts.map +1 -0
- package/dist/rag/raptor/index.js +11 -0
- package/dist/rag/raptor/index.js.map +1 -0
- package/dist/rag/reranking/providers/CohereReranker.js.map +1 -1
- package/dist/rag/search/BM25Index.d.ts +282 -0
- package/dist/rag/search/BM25Index.d.ts.map +1 -0
- package/dist/rag/search/BM25Index.js +344 -0
- package/dist/rag/search/BM25Index.js.map +1 -0
- package/dist/rag/search/HybridSearcher.d.ts +198 -0
- package/dist/rag/search/HybridSearcher.d.ts.map +1 -0
- package/dist/rag/search/HybridSearcher.js +316 -0
- package/dist/rag/search/HybridSearcher.js.map +1 -0
- package/dist/rag/search/index.d.ts +12 -0
- package/dist/rag/search/index.d.ts.map +1 -0
- package/dist/rag/search/index.js +12 -0
- package/dist/rag/search/index.js.map +1 -0
- package/dist/rag/setup/DockerDetector.d.ts +67 -0
- package/dist/rag/setup/DockerDetector.d.ts.map +1 -0
- package/dist/rag/setup/DockerDetector.js +125 -0
- package/dist/rag/setup/DockerDetector.js.map +1 -0
- package/dist/rag/setup/PostgresSetup.d.ts +20 -0
- package/dist/rag/setup/PostgresSetup.d.ts.map +1 -0
- package/dist/rag/setup/PostgresSetup.js +133 -0
- package/dist/rag/setup/PostgresSetup.js.map +1 -0
- package/dist/rag/setup/QdrantSetup.d.ts +26 -0
- package/dist/rag/setup/QdrantSetup.d.ts.map +1 -0
- package/dist/rag/setup/QdrantSetup.js +96 -0
- package/dist/rag/setup/QdrantSetup.js.map +1 -0
- package/dist/rag/setup/types.d.ts +55 -0
- package/dist/rag/setup/types.d.ts.map +1 -0
- package/dist/rag/setup/types.js +6 -0
- package/dist/rag/setup/types.js.map +1 -0
- package/dist/rag/unified/UnifiedRetriever.d.ts +472 -0
- package/dist/rag/unified/UnifiedRetriever.d.ts.map +1 -0
- package/dist/rag/unified/UnifiedRetriever.js +887 -0
- package/dist/rag/unified/UnifiedRetriever.js.map +1 -0
- package/dist/rag/unified/index.d.ts +24 -0
- package/dist/rag/unified/index.d.ts.map +1 -0
- package/dist/rag/unified/index.js +23 -0
- package/dist/rag/unified/index.js.map +1 -0
- package/dist/rag/unified/types.d.ts +546 -0
- package/dist/rag/unified/types.d.ts.map +1 -0
- package/dist/rag/unified/types.js +177 -0
- package/dist/rag/unified/types.js.map +1 -0
- package/dist/speech/providers/AssemblyAISTTProvider.js.map +1 -1
- package/dist/speech/providers/AzureSpeechSTTProvider.js.map +1 -1
- package/dist/speech/providers/BuiltInAdaptiveVadProvider.d.ts +1 -1
- package/dist/speech/providers/DeepgramBatchSTTProvider.js.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview SelfEvaluateTool — ITool implementation that enables agents to
|
|
3
|
+
* evaluate their own response quality, adjust runtime parameters, and report
|
|
4
|
+
* on performance drift over a session.
|
|
5
|
+
*
|
|
6
|
+
* @module @framers/agentos/emergent/SelfEvaluateTool
|
|
7
|
+
*
|
|
8
|
+
* Three actions:
|
|
9
|
+
* - `evaluate` — Score a response using an LLM judge (via generateText).
|
|
10
|
+
* - `adjust` — Tweak runtime parameters (temperature, verbosity) or
|
|
11
|
+
* delegate personality adjustments to {@link AdaptPersonalityTool}.
|
|
12
|
+
* - `report` — Aggregate session evaluation history, compute score averages,
|
|
13
|
+
* and list all adjustments made.
|
|
14
|
+
*
|
|
15
|
+
* The tool itself is read-only (`hasSideEffects: false`) because evaluate is
|
|
16
|
+
* observational; adjust delegates its side effects to adapt_personality or
|
|
17
|
+
* stores changes in an ephemeral session state map.
|
|
18
|
+
*/
|
|
19
|
+
import type { ITool, ToolExecutionResult, ToolExecutionContext, JSONSchemaObject } from '../core/tools/ITool.js';
|
|
20
|
+
import type { AdaptPersonalityTool } from './AdaptPersonalityTool.js';
|
|
21
|
+
/**
|
|
22
|
+
* Score dimensions returned by the LLM evaluation judge.
|
|
23
|
+
*/
|
|
24
|
+
export interface EvaluationScores {
|
|
25
|
+
/** How relevant the response is to the user's query (0–1). */
|
|
26
|
+
relevance: number;
|
|
27
|
+
/** How clear and well-structured the response is (0–1). */
|
|
28
|
+
clarity: number;
|
|
29
|
+
/** How accurate the factual content is (0–1). */
|
|
30
|
+
accuracy: number;
|
|
31
|
+
/** How helpful the response is for the user's goal (0–1). */
|
|
32
|
+
helpfulness: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A recorded evaluation with scores and timestamp.
|
|
36
|
+
*/
|
|
37
|
+
export interface EvaluationRecord {
|
|
38
|
+
/** The scores assigned by the LLM judge. */
|
|
39
|
+
scores: EvaluationScores;
|
|
40
|
+
/** ISO-8601 timestamp of when the evaluation was performed. */
|
|
41
|
+
timestamp: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A recorded parameter adjustment.
|
|
45
|
+
*/
|
|
46
|
+
export interface AdjustmentRecord {
|
|
47
|
+
/** The parameter that was adjusted. */
|
|
48
|
+
param: string;
|
|
49
|
+
/** Value before adjustment. */
|
|
50
|
+
prev: unknown;
|
|
51
|
+
/** Value after adjustment. */
|
|
52
|
+
new: unknown;
|
|
53
|
+
/** ISO-8601 timestamp of when the adjustment was made. */
|
|
54
|
+
timestamp: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Memory trace stored via the optional storeMemory callback.
|
|
58
|
+
*/
|
|
59
|
+
export interface MemoryTrace {
|
|
60
|
+
/** Trace type identifier. */
|
|
61
|
+
type: string;
|
|
62
|
+
/** Scope of the trace (e.g. 'session'). */
|
|
63
|
+
scope: string;
|
|
64
|
+
/** Serialized trace content. */
|
|
65
|
+
content: string;
|
|
66
|
+
/** Tags for categorization and retrieval. */
|
|
67
|
+
tags: string[];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Input arguments accepted by the `self_evaluate` tool.
|
|
71
|
+
* Discriminated on the `action` field.
|
|
72
|
+
*/
|
|
73
|
+
export interface SelfEvaluateInput extends Record<string, any> {
|
|
74
|
+
/** The action to perform: evaluate, adjust, or report. */
|
|
75
|
+
action: 'evaluate' | 'adjust' | 'report';
|
|
76
|
+
/** The response text to evaluate (required for evaluate). */
|
|
77
|
+
response?: string;
|
|
78
|
+
/** The original user query for context (required for evaluate). */
|
|
79
|
+
query?: string;
|
|
80
|
+
/** The parameter to adjust (required for adjust). */
|
|
81
|
+
param?: string;
|
|
82
|
+
/** The new value for the parameter (required for adjust). */
|
|
83
|
+
value?: unknown;
|
|
84
|
+
/** Reasoning for personality adjustments (required when param is a personality trait). */
|
|
85
|
+
reasoning?: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Dependencies injected into the {@link SelfEvaluateTool} constructor.
|
|
89
|
+
*/
|
|
90
|
+
export interface SelfEvaluateDeps {
|
|
91
|
+
/** Configuration controlling auto-adjust behaviour and evaluation limits. */
|
|
92
|
+
config: {
|
|
93
|
+
/** Whether adjustments are applied automatically after evaluations. */
|
|
94
|
+
autoAdjust: boolean;
|
|
95
|
+
/** Parameters that may be adjusted (e.g. 'temperature', 'verbosity', 'openness'). */
|
|
96
|
+
adjustableParams: string[];
|
|
97
|
+
/** Maximum number of evaluations allowed per session. */
|
|
98
|
+
maxEvaluationsPerSession: number;
|
|
99
|
+
};
|
|
100
|
+
/** Optional AdaptPersonalityTool for delegating personality adjustments. */
|
|
101
|
+
adaptPersonality?: AdaptPersonalityTool;
|
|
102
|
+
/** Optional callback to persist evaluation traces to long-term memory. */
|
|
103
|
+
storeMemory?: (trace: MemoryTrace) => Promise<void>;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* ITool implementation enabling agents to evaluate their own responses,
|
|
107
|
+
* adjust runtime parameters, and generate performance reports.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```ts
|
|
111
|
+
* const tool = new SelfEvaluateTool({
|
|
112
|
+
* config: {
|
|
113
|
+
* autoAdjust: false,
|
|
114
|
+
* adjustableParams: ['temperature', 'verbosity'],
|
|
115
|
+
* maxEvaluationsPerSession: 20,
|
|
116
|
+
* },
|
|
117
|
+
* });
|
|
118
|
+
*
|
|
119
|
+
* const result = await tool.execute({
|
|
120
|
+
* action: 'evaluate',
|
|
121
|
+
* response: 'The capital of France is Paris.',
|
|
122
|
+
* query: 'What is the capital of France?',
|
|
123
|
+
* }, context);
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
export declare class SelfEvaluateTool implements ITool<SelfEvaluateInput> {
|
|
127
|
+
/** @inheritdoc */
|
|
128
|
+
readonly id = "com.framers.emergent.self-evaluate";
|
|
129
|
+
/** @inheritdoc */
|
|
130
|
+
readonly name = "self_evaluate";
|
|
131
|
+
/** @inheritdoc */
|
|
132
|
+
readonly displayName = "Self Evaluate";
|
|
133
|
+
/** @inheritdoc */
|
|
134
|
+
readonly description: string;
|
|
135
|
+
/** @inheritdoc */
|
|
136
|
+
readonly category = "emergent";
|
|
137
|
+
/** @inheritdoc */
|
|
138
|
+
readonly hasSideEffects = false;
|
|
139
|
+
/** @inheritdoc */
|
|
140
|
+
readonly inputSchema: JSONSchemaObject;
|
|
141
|
+
/** Session evaluation history. */
|
|
142
|
+
private readonly evaluations;
|
|
143
|
+
/** Session adjustment history. */
|
|
144
|
+
private readonly adjustments;
|
|
145
|
+
/** Current session parameter values (non-personality). */
|
|
146
|
+
private readonly sessionParams;
|
|
147
|
+
/** Number of evaluations performed this session. */
|
|
148
|
+
private evalCount;
|
|
149
|
+
/** Injected dependencies. */
|
|
150
|
+
private readonly deps;
|
|
151
|
+
/**
|
|
152
|
+
* Create a new SelfEvaluateTool.
|
|
153
|
+
*
|
|
154
|
+
* @param deps - Injected dependencies including config, optional
|
|
155
|
+
* adaptPersonality tool, and optional memory store callback.
|
|
156
|
+
*/
|
|
157
|
+
constructor(deps: SelfEvaluateDeps);
|
|
158
|
+
/**
|
|
159
|
+
* Execute the requested self-evaluation action.
|
|
160
|
+
*
|
|
161
|
+
* @param args - Action type and associated parameters.
|
|
162
|
+
* @param context - Tool execution context.
|
|
163
|
+
* @returns A {@link ToolExecutionResult} wrapping the action outcome.
|
|
164
|
+
*/
|
|
165
|
+
execute(args: SelfEvaluateInput, context: ToolExecutionContext): Promise<ToolExecutionResult>;
|
|
166
|
+
/**
|
|
167
|
+
* Evaluate a response using an LLM judge and record the scores.
|
|
168
|
+
*
|
|
169
|
+
* Calls generateText with a small model to produce structured JSON scores,
|
|
170
|
+
* then persists the evaluation as a memory trace if storeMemory is provided.
|
|
171
|
+
*/
|
|
172
|
+
private handleEvaluate;
|
|
173
|
+
/**
|
|
174
|
+
* Adjust a runtime parameter.
|
|
175
|
+
*
|
|
176
|
+
* For personality traits (openness, conscientiousness, etc.), delegates to
|
|
177
|
+
* the injected AdaptPersonalityTool. For non-personality params (temperature,
|
|
178
|
+
* verbosity), stores the value in session state.
|
|
179
|
+
*/
|
|
180
|
+
private handleAdjust;
|
|
181
|
+
/**
|
|
182
|
+
* Generate a session performance report.
|
|
183
|
+
*
|
|
184
|
+
* Aggregates all evaluations, computes score averages, lists all adjustments,
|
|
185
|
+
* and summarizes personality drift and skill changes.
|
|
186
|
+
*/
|
|
187
|
+
private handleReport;
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=SelfEvaluateTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelfEvaluateTool.d.ts","sourceRoot":"","sources":["../../src/emergent/SelfEvaluateTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EACV,KAAK,EACL,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAMtE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC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/B;;;;;OAKG;YACW,cAAc;IAsF5B;;;;;;OAMG;YACW,YAAY;IAsF1B;;;;;OAKG;YACW,YAAY;CA6D3B"}
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview SelfEvaluateTool — ITool implementation that enables agents to
|
|
3
|
+
* evaluate their own response quality, adjust runtime parameters, and report
|
|
4
|
+
* on performance drift over a session.
|
|
5
|
+
*
|
|
6
|
+
* @module @framers/agentos/emergent/SelfEvaluateTool
|
|
7
|
+
*
|
|
8
|
+
* Three actions:
|
|
9
|
+
* - `evaluate` — Score a response using an LLM judge (via generateText).
|
|
10
|
+
* - `adjust` — Tweak runtime parameters (temperature, verbosity) or
|
|
11
|
+
* delegate personality adjustments to {@link AdaptPersonalityTool}.
|
|
12
|
+
* - `report` — Aggregate session evaluation history, compute score averages,
|
|
13
|
+
* and list all adjustments made.
|
|
14
|
+
*
|
|
15
|
+
* The tool itself is read-only (`hasSideEffects: false`) because evaluate is
|
|
16
|
+
* observational; adjust delegates its side effects to adapt_personality or
|
|
17
|
+
* stores changes in an ephemeral session state map.
|
|
18
|
+
*/
|
|
19
|
+
import { generateText } from '../api/generateText.js';
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// TOOL IMPLEMENTATION
|
|
22
|
+
// ============================================================================
|
|
23
|
+
/**
|
|
24
|
+
* ITool implementation enabling agents to evaluate their own responses,
|
|
25
|
+
* adjust runtime parameters, and generate performance reports.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const tool = new SelfEvaluateTool({
|
|
30
|
+
* config: {
|
|
31
|
+
* autoAdjust: false,
|
|
32
|
+
* adjustableParams: ['temperature', 'verbosity'],
|
|
33
|
+
* maxEvaluationsPerSession: 20,
|
|
34
|
+
* },
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* const result = await tool.execute({
|
|
38
|
+
* action: 'evaluate',
|
|
39
|
+
* response: 'The capital of France is Paris.',
|
|
40
|
+
* query: 'What is the capital of France?',
|
|
41
|
+
* }, context);
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export class SelfEvaluateTool {
|
|
45
|
+
/**
|
|
46
|
+
* Create a new SelfEvaluateTool.
|
|
47
|
+
*
|
|
48
|
+
* @param deps - Injected dependencies including config, optional
|
|
49
|
+
* adaptPersonality tool, and optional memory store callback.
|
|
50
|
+
*/
|
|
51
|
+
constructor(deps) {
|
|
52
|
+
/** @inheritdoc */
|
|
53
|
+
this.id = 'com.framers.emergent.self-evaluate';
|
|
54
|
+
/** @inheritdoc */
|
|
55
|
+
this.name = 'self_evaluate';
|
|
56
|
+
/** @inheritdoc */
|
|
57
|
+
this.displayName = 'Self Evaluate';
|
|
58
|
+
/** @inheritdoc */
|
|
59
|
+
this.description = 'Evaluate response quality, adjust runtime parameters, or generate a ' +
|
|
60
|
+
'performance report. Evaluate uses an LLM judge to score relevance, ' +
|
|
61
|
+
'clarity, accuracy, and helpfulness.';
|
|
62
|
+
/** @inheritdoc */
|
|
63
|
+
this.category = 'emergent';
|
|
64
|
+
/** @inheritdoc */
|
|
65
|
+
this.hasSideEffects = false;
|
|
66
|
+
/** @inheritdoc */
|
|
67
|
+
this.inputSchema = {
|
|
68
|
+
type: 'object',
|
|
69
|
+
properties: {
|
|
70
|
+
action: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
enum: ['evaluate', 'adjust', 'report'],
|
|
73
|
+
description: 'The self-evaluation action to perform.',
|
|
74
|
+
},
|
|
75
|
+
response: {
|
|
76
|
+
type: 'string',
|
|
77
|
+
description: 'The response text to evaluate.',
|
|
78
|
+
},
|
|
79
|
+
query: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
description: 'The original user query for evaluation context.',
|
|
82
|
+
},
|
|
83
|
+
param: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
description: 'The parameter to adjust.',
|
|
86
|
+
},
|
|
87
|
+
value: {
|
|
88
|
+
description: 'The new value for the parameter.',
|
|
89
|
+
},
|
|
90
|
+
reasoning: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
description: 'Reasoning for personality trait adjustments.',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
required: ['action'],
|
|
96
|
+
};
|
|
97
|
+
/** Session evaluation history. */
|
|
98
|
+
this.evaluations = [];
|
|
99
|
+
/** Session adjustment history. */
|
|
100
|
+
this.adjustments = [];
|
|
101
|
+
/** Current session parameter values (non-personality). */
|
|
102
|
+
this.sessionParams = new Map();
|
|
103
|
+
/** Number of evaluations performed this session. */
|
|
104
|
+
this.evalCount = 0;
|
|
105
|
+
this.deps = deps;
|
|
106
|
+
}
|
|
107
|
+
// --------------------------------------------------------------------------
|
|
108
|
+
// EXECUTE
|
|
109
|
+
// --------------------------------------------------------------------------
|
|
110
|
+
/**
|
|
111
|
+
* Execute the requested self-evaluation action.
|
|
112
|
+
*
|
|
113
|
+
* @param args - Action type and associated parameters.
|
|
114
|
+
* @param context - Tool execution context.
|
|
115
|
+
* @returns A {@link ToolExecutionResult} wrapping the action outcome.
|
|
116
|
+
*/
|
|
117
|
+
async execute(args, context) {
|
|
118
|
+
switch (args.action) {
|
|
119
|
+
case 'evaluate':
|
|
120
|
+
return this.handleEvaluate(args, context);
|
|
121
|
+
case 'adjust':
|
|
122
|
+
return this.handleAdjust(args, context);
|
|
123
|
+
case 'report':
|
|
124
|
+
return this.handleReport();
|
|
125
|
+
default:
|
|
126
|
+
return {
|
|
127
|
+
success: false,
|
|
128
|
+
error: `Unknown action "${args.action}". Must be one of: evaluate, adjust, report`,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// --------------------------------------------------------------------------
|
|
133
|
+
// EVALUATE
|
|
134
|
+
// --------------------------------------------------------------------------
|
|
135
|
+
/**
|
|
136
|
+
* Evaluate a response using an LLM judge and record the scores.
|
|
137
|
+
*
|
|
138
|
+
* Calls generateText with a small model to produce structured JSON scores,
|
|
139
|
+
* then persists the evaluation as a memory trace if storeMemory is provided.
|
|
140
|
+
*/
|
|
141
|
+
async handleEvaluate(args, _context) {
|
|
142
|
+
const { response, query } = args;
|
|
143
|
+
if (!response || typeof response !== 'string') {
|
|
144
|
+
return { success: false, error: 'response is required for the evaluate action' };
|
|
145
|
+
}
|
|
146
|
+
if (!query || typeof query !== 'string') {
|
|
147
|
+
return { success: false, error: 'query is required for the evaluate action' };
|
|
148
|
+
}
|
|
149
|
+
// Check session evaluation limit
|
|
150
|
+
if (this.evalCount >= this.deps.config.maxEvaluationsPerSession) {
|
|
151
|
+
return {
|
|
152
|
+
success: false,
|
|
153
|
+
error: `Maximum evaluations per session reached (${this.deps.config.maxEvaluationsPerSession})`,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
// Call LLM to produce evaluation scores
|
|
157
|
+
let scores;
|
|
158
|
+
try {
|
|
159
|
+
const result = await generateText({
|
|
160
|
+
model: 'openai:gpt-4o-mini',
|
|
161
|
+
system: 'You are a response quality evaluator. Score the following response on four dimensions: ' +
|
|
162
|
+
'relevance, clarity, accuracy, and helpfulness. Each score is a number between 0 and 1. ' +
|
|
163
|
+
'Return ONLY a JSON object with these four keys, no other text.',
|
|
164
|
+
prompt: `User query: ${query}\n\nResponse to evaluate: ${response}`,
|
|
165
|
+
temperature: 0,
|
|
166
|
+
maxTokens: 200,
|
|
167
|
+
});
|
|
168
|
+
scores = JSON.parse(result.text);
|
|
169
|
+
// Validate score structure
|
|
170
|
+
for (const key of ['relevance', 'clarity', 'accuracy', 'helpfulness']) {
|
|
171
|
+
if (typeof scores[key] !== 'number' || scores[key] < 0 || scores[key] > 1) {
|
|
172
|
+
scores[key] = 0.5; // Default to neutral if malformed
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
catch (err) {
|
|
177
|
+
return {
|
|
178
|
+
success: false,
|
|
179
|
+
error: `Evaluation LLM call failed: ${err.message ?? String(err)}`,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
// Record the evaluation
|
|
183
|
+
const record = {
|
|
184
|
+
scores,
|
|
185
|
+
timestamp: new Date().toISOString(),
|
|
186
|
+
};
|
|
187
|
+
this.evaluations.push(record);
|
|
188
|
+
this.evalCount++;
|
|
189
|
+
// Store as memory trace if callback is provided
|
|
190
|
+
if (this.deps.storeMemory) {
|
|
191
|
+
try {
|
|
192
|
+
await this.deps.storeMemory({
|
|
193
|
+
type: 'self-evaluation',
|
|
194
|
+
scope: 'session',
|
|
195
|
+
content: JSON.stringify({ query, scores }),
|
|
196
|
+
tags: ['evaluation', 'quality'],
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
catch {
|
|
200
|
+
// Best-effort memory storage; don't fail the evaluation
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return {
|
|
204
|
+
success: true,
|
|
205
|
+
output: {
|
|
206
|
+
scores,
|
|
207
|
+
evalCount: this.evalCount,
|
|
208
|
+
remainingEvaluations: this.deps.config.maxEvaluationsPerSession - this.evalCount,
|
|
209
|
+
},
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
// --------------------------------------------------------------------------
|
|
213
|
+
// ADJUST
|
|
214
|
+
// --------------------------------------------------------------------------
|
|
215
|
+
/**
|
|
216
|
+
* Adjust a runtime parameter.
|
|
217
|
+
*
|
|
218
|
+
* For personality traits (openness, conscientiousness, etc.), delegates to
|
|
219
|
+
* the injected AdaptPersonalityTool. For non-personality params (temperature,
|
|
220
|
+
* verbosity), stores the value in session state.
|
|
221
|
+
*/
|
|
222
|
+
async handleAdjust(args, context) {
|
|
223
|
+
const { param, value, reasoning } = args;
|
|
224
|
+
if (!param || typeof param !== 'string') {
|
|
225
|
+
return { success: false, error: 'param is required for the adjust action' };
|
|
226
|
+
}
|
|
227
|
+
if (value === undefined || value === null) {
|
|
228
|
+
return { success: false, error: 'value is required for the adjust action' };
|
|
229
|
+
}
|
|
230
|
+
// Check if param is adjustable
|
|
231
|
+
if (!this.deps.config.adjustableParams.includes(param)) {
|
|
232
|
+
return {
|
|
233
|
+
success: false,
|
|
234
|
+
error: `Parameter "${param}" is not adjustable. Allowed: ${this.deps.config.adjustableParams.join(', ')}`,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
const personalityTraits = [
|
|
238
|
+
'openness',
|
|
239
|
+
'conscientiousness',
|
|
240
|
+
'emotionality',
|
|
241
|
+
'extraversion',
|
|
242
|
+
'agreeableness',
|
|
243
|
+
'honesty',
|
|
244
|
+
];
|
|
245
|
+
if (personalityTraits.includes(param)) {
|
|
246
|
+
// Delegate to AdaptPersonalityTool
|
|
247
|
+
if (!this.deps.adaptPersonality) {
|
|
248
|
+
return {
|
|
249
|
+
success: false,
|
|
250
|
+
error: 'Personality adjustment requires AdaptPersonalityTool but none was provided.',
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
const delta = typeof value === 'number' ? value : 0;
|
|
254
|
+
const personalityResult = await this.deps.adaptPersonality.execute({
|
|
255
|
+
trait: param,
|
|
256
|
+
delta,
|
|
257
|
+
reasoning: reasoning ?? `Self-evaluation adjustment for ${param}`,
|
|
258
|
+
}, context);
|
|
259
|
+
if (personalityResult.success && personalityResult.output) {
|
|
260
|
+
this.adjustments.push({
|
|
261
|
+
param,
|
|
262
|
+
prev: personalityResult.output.previousValue,
|
|
263
|
+
new: personalityResult.output.newValue,
|
|
264
|
+
timestamp: new Date().toISOString(),
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
return personalityResult;
|
|
268
|
+
}
|
|
269
|
+
// Non-personality parameter (temperature, verbosity, etc.)
|
|
270
|
+
const prevValue = this.sessionParams.get(param);
|
|
271
|
+
this.sessionParams.set(param, value);
|
|
272
|
+
this.adjustments.push({
|
|
273
|
+
param,
|
|
274
|
+
prev: prevValue ?? null,
|
|
275
|
+
new: value,
|
|
276
|
+
timestamp: new Date().toISOString(),
|
|
277
|
+
});
|
|
278
|
+
return {
|
|
279
|
+
success: true,
|
|
280
|
+
output: {
|
|
281
|
+
param,
|
|
282
|
+
previousValue: prevValue ?? null,
|
|
283
|
+
newValue: value,
|
|
284
|
+
},
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
// --------------------------------------------------------------------------
|
|
288
|
+
// REPORT
|
|
289
|
+
// --------------------------------------------------------------------------
|
|
290
|
+
/**
|
|
291
|
+
* Generate a session performance report.
|
|
292
|
+
*
|
|
293
|
+
* Aggregates all evaluations, computes score averages, lists all adjustments,
|
|
294
|
+
* and summarizes personality drift and skill changes.
|
|
295
|
+
*/
|
|
296
|
+
async handleReport() {
|
|
297
|
+
// Compute average scores across all evaluations
|
|
298
|
+
const averages = {
|
|
299
|
+
relevance: 0,
|
|
300
|
+
clarity: 0,
|
|
301
|
+
accuracy: 0,
|
|
302
|
+
helpfulness: 0,
|
|
303
|
+
};
|
|
304
|
+
if (this.evaluations.length > 0) {
|
|
305
|
+
for (const evalRecord of this.evaluations) {
|
|
306
|
+
averages.relevance += evalRecord.scores.relevance;
|
|
307
|
+
averages.clarity += evalRecord.scores.clarity;
|
|
308
|
+
averages.accuracy += evalRecord.scores.accuracy;
|
|
309
|
+
averages.helpfulness += evalRecord.scores.helpfulness;
|
|
310
|
+
}
|
|
311
|
+
const count = this.evaluations.length;
|
|
312
|
+
averages.relevance /= count;
|
|
313
|
+
averages.clarity /= count;
|
|
314
|
+
averages.accuracy /= count;
|
|
315
|
+
averages.helpfulness /= count;
|
|
316
|
+
}
|
|
317
|
+
// Summarize personality drift from adjustments
|
|
318
|
+
const personalityDrift = {};
|
|
319
|
+
const paramAdjustments = [];
|
|
320
|
+
for (const adj of this.adjustments) {
|
|
321
|
+
const personalityTraits = [
|
|
322
|
+
'openness',
|
|
323
|
+
'conscientiousness',
|
|
324
|
+
'emotionality',
|
|
325
|
+
'extraversion',
|
|
326
|
+
'agreeableness',
|
|
327
|
+
'honesty',
|
|
328
|
+
];
|
|
329
|
+
if (personalityTraits.includes(adj.param)) {
|
|
330
|
+
if (!personalityDrift[adj.param]) {
|
|
331
|
+
personalityDrift[adj.param] = { totalDelta: 0, adjustmentCount: 0 };
|
|
332
|
+
}
|
|
333
|
+
personalityDrift[adj.param].totalDelta +=
|
|
334
|
+
adj.new - adj.prev;
|
|
335
|
+
personalityDrift[adj.param].adjustmentCount++;
|
|
336
|
+
}
|
|
337
|
+
else {
|
|
338
|
+
paramAdjustments.push(adj);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return {
|
|
342
|
+
success: true,
|
|
343
|
+
output: {
|
|
344
|
+
totalEvaluations: this.evaluations.length,
|
|
345
|
+
averageScores: averages,
|
|
346
|
+
adjustments: paramAdjustments,
|
|
347
|
+
personalityDrift,
|
|
348
|
+
evaluations: this.evaluations,
|
|
349
|
+
},
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
//# sourceMappingURL=SelfEvaluateTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelfEvaluateTool.js","sourceRoot":"","sources":["../../src/emergent/SelfEvaluateTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAQH,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AA6GtD,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,gBAAgB;IAqE3B;;;;;OAKG;IACH,YAAY,IAAsB;QA1ElC,kBAAkB;QACT,OAAE,GAAG,oCAAoC,CAAC;QAEnD,kBAAkB;QACT,SAAI,GAAG,eAAe,CAAC;QAEhC,kBAAkB;QACT,gBAAW,GAAG,eAAe,CAAC;QAEvC,kBAAkB;QACT,gBAAW,GAClB,sEAAsE;YACtE,qEAAqE;YACrE,qCAAqC,CAAC;QAExC,kBAAkB;QACT,aAAQ,GAAG,UAAU,CAAC;QAE/B,kBAAkB;QACT,mBAAc,GAAG,KAAK,CAAC;QAEhC,kBAAkB;QACT,gBAAW,GAAqB;YACvC,I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