@framers/agentos 0.1.119 → 0.1.121
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/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/store/HnswSidecar.d.ts +115 -0
- package/dist/memory/store/HnswSidecar.d.ts.map +1 -0
- package/dist/memory/store/HnswSidecar.js +256 -0
- package/dist/memory/store/HnswSidecar.js.map +1 -0
- 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 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file index.ts
|
|
3
|
+
* Barrel export for the video generation and analysis subsystem.
|
|
4
|
+
*
|
|
5
|
+
* Re-exports all public types, interfaces, and the fallback proxy so
|
|
6
|
+
* consumers can import from `@agentos/core/video` (or the relative path)
|
|
7
|
+
* without reaching into individual files.
|
|
8
|
+
*
|
|
9
|
+
* Also provides a provider factory registry (modelled on the image
|
|
10
|
+
* subsystem's pattern) so that built-in and third-party video providers
|
|
11
|
+
* can be registered and instantiated by provider ID.
|
|
12
|
+
*/
|
|
13
|
+
import type { IVideoGenerator } from './IVideoGenerator.js';
|
|
14
|
+
export * from './types.js';
|
|
15
|
+
export * from './IVideoGenerator.js';
|
|
16
|
+
export * from './IVideoAnalyzer.js';
|
|
17
|
+
export * from './FallbackVideoProxy.js';
|
|
18
|
+
export * from './VideoAnalyzer.js';
|
|
19
|
+
/** A factory function that creates an uninitialised video provider instance. */
|
|
20
|
+
export type VideoProviderFactory = () => IVideoGenerator;
|
|
21
|
+
/**
|
|
22
|
+
* Register a video provider factory for a given provider ID.
|
|
23
|
+
*
|
|
24
|
+
* Use this to add third-party or custom video providers at runtime.
|
|
25
|
+
* Built-in providers (runway, replicate, fal) are pre-registered.
|
|
26
|
+
*
|
|
27
|
+
* @param providerId - Unique identifier for the provider (lowercased for matching).
|
|
28
|
+
* @param factory - Factory function that creates a new uninitialised provider instance.
|
|
29
|
+
*/
|
|
30
|
+
export declare function registerVideoProviderFactory(providerId: string, factory: VideoProviderFactory): void;
|
|
31
|
+
/**
|
|
32
|
+
* Create a video provider instance by provider ID.
|
|
33
|
+
*
|
|
34
|
+
* Looks up the factory in the registry and returns a new uninitialised
|
|
35
|
+
* provider. The caller must call `provider.initialize(config)` before use.
|
|
36
|
+
*
|
|
37
|
+
* @param providerId - Provider identifier (e.g. `"runway"`, `"replicate"`, `"fal"`).
|
|
38
|
+
* @returns A new uninitialised {@link IVideoGenerator} instance.
|
|
39
|
+
* @throws {Error} When no factory is registered for the given provider ID.
|
|
40
|
+
*/
|
|
41
|
+
export declare function createVideoProvider(providerId: string): IVideoGenerator;
|
|
42
|
+
/**
|
|
43
|
+
* Check whether a video provider factory is registered for the given ID.
|
|
44
|
+
*
|
|
45
|
+
* @param providerId - Provider identifier to check.
|
|
46
|
+
* @returns `true` if a factory exists for this provider.
|
|
47
|
+
*/
|
|
48
|
+
export declare function hasVideoProviderFactory(providerId: string): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* List all registered video provider factory IDs, sorted alphabetically.
|
|
51
|
+
*
|
|
52
|
+
* @returns Sorted array of registered provider identifiers.
|
|
53
|
+
*/
|
|
54
|
+
export declare function listVideoProviderFactories(): string[];
|
|
55
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/video/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAK5D,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AAMnC,gFAAgF;AAChF,MAAM,MAAM,oBAAoB,GAAG,MAAM,eAAe,CAAC;AAczD;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,oBAAoB,GAC5B,IAAI,CAEN;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,CAMvE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,EAAE,CAErD"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file index.ts
|
|
3
|
+
* Barrel export for the video generation and analysis subsystem.
|
|
4
|
+
*
|
|
5
|
+
* Re-exports all public types, interfaces, and the fallback proxy so
|
|
6
|
+
* consumers can import from `@agentos/core/video` (or the relative path)
|
|
7
|
+
* without reaching into individual files.
|
|
8
|
+
*
|
|
9
|
+
* Also provides a provider factory registry (modelled on the image
|
|
10
|
+
* subsystem's pattern) so that built-in and third-party video providers
|
|
11
|
+
* can be registered and instantiated by provider ID.
|
|
12
|
+
*/
|
|
13
|
+
import { FalVideoProvider } from './providers/FalVideoProvider.js';
|
|
14
|
+
import { ReplicateVideoProvider } from './providers/ReplicateVideoProvider.js';
|
|
15
|
+
import { RunwayVideoProvider } from './providers/RunwayVideoProvider.js';
|
|
16
|
+
export * from './types.js';
|
|
17
|
+
export * from './IVideoGenerator.js';
|
|
18
|
+
export * from './IVideoAnalyzer.js';
|
|
19
|
+
export * from './FallbackVideoProxy.js';
|
|
20
|
+
export * from './VideoAnalyzer.js';
|
|
21
|
+
/**
|
|
22
|
+
* Internal registry mapping provider IDs to provider constructors.
|
|
23
|
+
*
|
|
24
|
+
* Built-in providers (Runway, Replicate, Fal) are pre-registered here so the
|
|
25
|
+
* public `createVideoProvider()` API remains synchronous and ESM-safe.
|
|
26
|
+
*/
|
|
27
|
+
const videoProviderFactories = new Map([
|
|
28
|
+
['runway', () => new RunwayVideoProvider()],
|
|
29
|
+
['replicate', () => new ReplicateVideoProvider()],
|
|
30
|
+
['fal', () => new FalVideoProvider()],
|
|
31
|
+
]);
|
|
32
|
+
/**
|
|
33
|
+
* Register a video provider factory for a given provider ID.
|
|
34
|
+
*
|
|
35
|
+
* Use this to add third-party or custom video providers at runtime.
|
|
36
|
+
* Built-in providers (runway, replicate, fal) are pre-registered.
|
|
37
|
+
*
|
|
38
|
+
* @param providerId - Unique identifier for the provider (lowercased for matching).
|
|
39
|
+
* @param factory - Factory function that creates a new uninitialised provider instance.
|
|
40
|
+
*/
|
|
41
|
+
export function registerVideoProviderFactory(providerId, factory) {
|
|
42
|
+
videoProviderFactories.set(providerId.toLowerCase(), factory);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Create a video provider instance by provider ID.
|
|
46
|
+
*
|
|
47
|
+
* Looks up the factory in the registry and returns a new uninitialised
|
|
48
|
+
* provider. The caller must call `provider.initialize(config)` before use.
|
|
49
|
+
*
|
|
50
|
+
* @param providerId - Provider identifier (e.g. `"runway"`, `"replicate"`, `"fal"`).
|
|
51
|
+
* @returns A new uninitialised {@link IVideoGenerator} instance.
|
|
52
|
+
* @throws {Error} When no factory is registered for the given provider ID.
|
|
53
|
+
*/
|
|
54
|
+
export function createVideoProvider(providerId) {
|
|
55
|
+
const factory = videoProviderFactories.get(providerId.toLowerCase());
|
|
56
|
+
if (!factory) {
|
|
57
|
+
throw new Error(`Video generation is not supported for provider "${providerId}".`);
|
|
58
|
+
}
|
|
59
|
+
return factory();
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Check whether a video provider factory is registered for the given ID.
|
|
63
|
+
*
|
|
64
|
+
* @param providerId - Provider identifier to check.
|
|
65
|
+
* @returns `true` if a factory exists for this provider.
|
|
66
|
+
*/
|
|
67
|
+
export function hasVideoProviderFactory(providerId) {
|
|
68
|
+
return videoProviderFactories.has(providerId.toLowerCase());
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* List all registered video provider factory IDs, sorted alphabetically.
|
|
72
|
+
*
|
|
73
|
+
* @returns Sorted array of registered provider identifiers.
|
|
74
|
+
*/
|
|
75
|
+
export function listVideoProviderFactories() {
|
|
76
|
+
return Array.from(videoProviderFactories.keys()).sort();
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/video/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AASnC;;;;;GAKG;AACH,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAA+B;IACnE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,mBAAmB,EAAE,CAAC;IAC3C,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,sBAAsB,EAAE,CAAC;IACjD,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,IAAI,gBAAgB,EAAE,CAAC;CACtC,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,4BAA4B,CAC1C,UAAkB,EAClB,OAA6B;IAE7B,sBAAsB,CAAC,GAAG,CAAC,UAAU,CAAC,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAkB;IACpD,MAAM,OAAO,GAAG,sBAAsB,CAAC,GAAG,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;IACrE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,mDAAmD,UAAU,IAAI,CAAC,CAAC;IACrF,CAAC;IACD,OAAO,OAAO,EAAE,CAAC;AACnB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAkB;IACxD,OAAO,sBAAsB,CAAC,GAAG,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;AAC9D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,0BAA0B;IACxC,OAAO,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/video/providers/FalVideoProvider
|
|
3
|
+
*
|
|
4
|
+
* Video generation provider for the Fal.ai serverless GPU platform.
|
|
5
|
+
*
|
|
6
|
+
* Fal.ai hosts video generation models (Kling, HunyuanVideo, CogVideo, etc.)
|
|
7
|
+
* behind a queue-based API. This provider implements the three-step pattern
|
|
8
|
+
* established by {@link FalImageProvider}: submit to queue, poll for status,
|
|
9
|
+
* then fetch the completed result.
|
|
10
|
+
*
|
|
11
|
+
* ## Supported models
|
|
12
|
+
*
|
|
13
|
+
* | Model ID | Description |
|
|
14
|
+
* |----------------------------------|-----------------------------------|
|
|
15
|
+
* | `kling-video/v1` | Kling v1 — high quality video |
|
|
16
|
+
* | `fal-ai/hunyuan-video` | HunyuanVideo — Tencent's model |
|
|
17
|
+
* | `fal-ai/cogvideox-5b` | CogVideoX-5B — open model |
|
|
18
|
+
*
|
|
19
|
+
* ## API flow (three-step queue)
|
|
20
|
+
*
|
|
21
|
+
* 1. **Submit** — `POST ${baseURL}/${model}` with prompt/params.
|
|
22
|
+
* Returns `{ request_id }` immediately.
|
|
23
|
+
* 2. **Poll** — `GET ${baseURL}/${model}/requests/${request_id}/status`
|
|
24
|
+
* until `status === 'COMPLETED'` or `'FAILED'`.
|
|
25
|
+
* 3. **Fetch** — `GET ${baseURL}/${model}/requests/${request_id}`
|
|
26
|
+
* returns `{ video: { url } }`.
|
|
27
|
+
*
|
|
28
|
+
* ## Authentication
|
|
29
|
+
*
|
|
30
|
+
* Requires a `FAL_API_KEY`. Sent as `Authorization: Key ${apiKey}`.
|
|
31
|
+
*
|
|
32
|
+
* @see {@link IVideoGenerator} for the provider interface contract.
|
|
33
|
+
* @see {@link FalImageProvider} for the image counterpart.
|
|
34
|
+
*/
|
|
35
|
+
import type { IVideoGenerator } from '../IVideoGenerator.js';
|
|
36
|
+
import type { VideoGenerateRequest, ImageToVideoRequest, VideoResult } from '../types.js';
|
|
37
|
+
/**
|
|
38
|
+
* Configuration for the Fal.ai video generation provider.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```typescript
|
|
42
|
+
* const config: FalVideoProviderConfig = {
|
|
43
|
+
* apiKey: process.env.FAL_API_KEY!,
|
|
44
|
+
* defaultModelId: 'kling-video/v1',
|
|
45
|
+
* };
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export interface FalVideoProviderConfig {
|
|
49
|
+
/**
|
|
50
|
+
* Fal.ai API key. Sent as `Authorization: Key ${apiKey}`.
|
|
51
|
+
* Obtain from https://fal.ai/dashboard/keys
|
|
52
|
+
*/
|
|
53
|
+
apiKey: string;
|
|
54
|
+
/**
|
|
55
|
+
* Base URL for the Fal.ai queue API. Override for testing or proxy setups.
|
|
56
|
+
* @default 'https://queue.fal.run'
|
|
57
|
+
*/
|
|
58
|
+
baseURL?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Default model to use when the request doesn't specify one.
|
|
61
|
+
* @default 'kling-video/v1'
|
|
62
|
+
*/
|
|
63
|
+
defaultModelId?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Milliseconds between status polls while waiting for generation.
|
|
66
|
+
* @default 2000
|
|
67
|
+
*/
|
|
68
|
+
pollIntervalMs?: number;
|
|
69
|
+
/**
|
|
70
|
+
* Maximum milliseconds to wait for generation before timing out.
|
|
71
|
+
* @default 300000
|
|
72
|
+
*/
|
|
73
|
+
timeoutMs?: number;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Video generation provider connecting to the Fal.ai serverless platform.
|
|
77
|
+
*
|
|
78
|
+
* Implements the three-step queue pattern: submit a generation task,
|
|
79
|
+
* poll the status endpoint until completion, then fetch the result.
|
|
80
|
+
* This mirrors the flow used by {@link FalImageProvider}.
|
|
81
|
+
*
|
|
82
|
+
* @implements {IVideoGenerator}
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* const provider = new FalVideoProvider();
|
|
87
|
+
* await provider.initialize({ apiKey: process.env.FAL_API_KEY! });
|
|
88
|
+
*
|
|
89
|
+
* const result = await provider.generateVideo({
|
|
90
|
+
* modelId: 'kling-video/v1',
|
|
91
|
+
* prompt: 'A time-lapse of flowers blooming in a meadow',
|
|
92
|
+
* });
|
|
93
|
+
* console.log(result.videos[0].url);
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export declare class FalVideoProvider implements IVideoGenerator {
|
|
97
|
+
/** @inheritdoc */
|
|
98
|
+
readonly providerId = "fal";
|
|
99
|
+
/** @inheritdoc */
|
|
100
|
+
isInitialized: boolean;
|
|
101
|
+
/** @inheritdoc */
|
|
102
|
+
defaultModelId?: string;
|
|
103
|
+
/** Internal resolved configuration. */
|
|
104
|
+
private _config;
|
|
105
|
+
/**
|
|
106
|
+
* Initialize the provider with API credentials and optional configuration.
|
|
107
|
+
*
|
|
108
|
+
* @param config - Configuration object. Must include `apiKey`.
|
|
109
|
+
* @throws {Error} If `apiKey` is missing or empty.
|
|
110
|
+
*/
|
|
111
|
+
initialize(config: Record<string, unknown>): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Generate a video from a text prompt using the Fal.ai queue API.
|
|
114
|
+
*
|
|
115
|
+
* Submits the task, polls until complete, then fetches the result.
|
|
116
|
+
*
|
|
117
|
+
* @param request - Video generation request with prompt and optional params.
|
|
118
|
+
* @returns The generated video result envelope.
|
|
119
|
+
*
|
|
120
|
+
* @throws {Error} If the provider is not initialized.
|
|
121
|
+
* @throws {Error} If the API returns an error or times out.
|
|
122
|
+
*/
|
|
123
|
+
generateVideo(request: VideoGenerateRequest): Promise<VideoResult>;
|
|
124
|
+
/**
|
|
125
|
+
* Generate a video from a source image using the Fal.ai queue API.
|
|
126
|
+
*
|
|
127
|
+
* The source image Buffer is converted to a base64 data URL and passed
|
|
128
|
+
* as the `image_url` parameter.
|
|
129
|
+
*
|
|
130
|
+
* @param request - Generation parameters including the source image buffer.
|
|
131
|
+
* @returns The generated video result envelope.
|
|
132
|
+
*
|
|
133
|
+
* @throws {Error} If the provider is not initialized or the API fails.
|
|
134
|
+
*/
|
|
135
|
+
imageToVideo(request: ImageToVideoRequest): Promise<VideoResult>;
|
|
136
|
+
/**
|
|
137
|
+
* Fal.ai supports both text-to-video and image-to-video generation.
|
|
138
|
+
*
|
|
139
|
+
* @param capability - The capability to check.
|
|
140
|
+
* @returns `true` for both `'text-to-video'` and `'image-to-video'`.
|
|
141
|
+
*/
|
|
142
|
+
supports(capability: 'text-to-video' | 'image-to-video'): boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Release any resources held by the provider. No-op for HTTP-only providers.
|
|
145
|
+
*/
|
|
146
|
+
shutdown(): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* Submit a generation task to the Fal.ai queue.
|
|
149
|
+
*
|
|
150
|
+
* @param model - Full model path (e.g. 'kling-video/v1').
|
|
151
|
+
* @param body - Request body with prompt and generation params.
|
|
152
|
+
* @returns The request_id for status polling.
|
|
153
|
+
*
|
|
154
|
+
* @throws {Error} If the submission request fails.
|
|
155
|
+
* @internal
|
|
156
|
+
*/
|
|
157
|
+
private _submitTask;
|
|
158
|
+
/**
|
|
159
|
+
* Poll the Fal.ai status endpoint until the task completes or times out.
|
|
160
|
+
*
|
|
161
|
+
* @param model - Full model path.
|
|
162
|
+
* @param requestId - The request ID from submission.
|
|
163
|
+
*
|
|
164
|
+
* @throws {Error} If the generation fails or times out.
|
|
165
|
+
* @internal
|
|
166
|
+
*/
|
|
167
|
+
private _pollStatus;
|
|
168
|
+
/**
|
|
169
|
+
* Fetch the completed generation result from the Fal.ai result endpoint.
|
|
170
|
+
*
|
|
171
|
+
* Called after polling confirms the task is COMPLETED. The result endpoint
|
|
172
|
+
* is separate from the status endpoint because Fal.ai returns the full
|
|
173
|
+
* payload (including video URLs) only here.
|
|
174
|
+
*
|
|
175
|
+
* @param model - Full model path.
|
|
176
|
+
* @param requestId - The request ID from submission.
|
|
177
|
+
* @returns The generation result with video URL.
|
|
178
|
+
*
|
|
179
|
+
* @throws {Error} If the result fetch fails.
|
|
180
|
+
* @internal
|
|
181
|
+
*/
|
|
182
|
+
private _fetchResult;
|
|
183
|
+
/**
|
|
184
|
+
* Build a {@link VideoResult} from a completed Fal.ai result.
|
|
185
|
+
*
|
|
186
|
+
* @param result - The Fal.ai result response.
|
|
187
|
+
* @param model - Model ID used for the generation.
|
|
188
|
+
* @returns Normalized video result envelope.
|
|
189
|
+
*
|
|
190
|
+
* @throws {Error} If the result has no video URL.
|
|
191
|
+
* @internal
|
|
192
|
+
*/
|
|
193
|
+
private _buildResult;
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=FalVideoProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FalVideoProvider.d.ts","sourceRoot":"","sources":["../../../../src/core/video/providers/FalVideoProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACZ,MAAM,aAAa,CAAC;AAMrB;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA4DD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,gBAAiB,YAAW,eAAe;IACtD,kBAAkB;IAClB,SAAgB,UAAU,SAAS;IAEnC,kBAAkB;IACX,aAAa,UAAS;IAE7B,kBAAkB;IACX,cAAc,CAAC,EAAE,MAAM,CAAC;IAE/B,uCAAuC;IACvC,OAAO,CAAC,OAAO,CAA0H;IAMzI;;;;;OAKG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAkChE;;;;;;;;;;OAUG;IACG,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,WAAW,CAAC;IAuBxE;;;;;;;;;;OAUG;IACG,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAC;IA+BtE;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,eAAe,GAAG,gBAAgB,GAAG,OAAO;IAIjE;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ/B;;;;;;;;;OASG;YACW,WAAW;IAyBzB;;;;;;;;OAQG;YACW,WAAW;IAoCzB;;;;;;;;;;;;;OAaG;YACW,YAAY;IAiB1B;;;;;;;;;OASG;IACH,OAAO,CAAC,YAAY;CAsBrB"}
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/video/providers/FalVideoProvider
|
|
3
|
+
*
|
|
4
|
+
* Video generation provider for the Fal.ai serverless GPU platform.
|
|
5
|
+
*
|
|
6
|
+
* Fal.ai hosts video generation models (Kling, HunyuanVideo, CogVideo, etc.)
|
|
7
|
+
* behind a queue-based API. This provider implements the three-step pattern
|
|
8
|
+
* established by {@link FalImageProvider}: submit to queue, poll for status,
|
|
9
|
+
* then fetch the completed result.
|
|
10
|
+
*
|
|
11
|
+
* ## Supported models
|
|
12
|
+
*
|
|
13
|
+
* | Model ID | Description |
|
|
14
|
+
* |----------------------------------|-----------------------------------|
|
|
15
|
+
* | `kling-video/v1` | Kling v1 — high quality video |
|
|
16
|
+
* | `fal-ai/hunyuan-video` | HunyuanVideo — Tencent's model |
|
|
17
|
+
* | `fal-ai/cogvideox-5b` | CogVideoX-5B — open model |
|
|
18
|
+
*
|
|
19
|
+
* ## API flow (three-step queue)
|
|
20
|
+
*
|
|
21
|
+
* 1. **Submit** — `POST ${baseURL}/${model}` with prompt/params.
|
|
22
|
+
* Returns `{ request_id }` immediately.
|
|
23
|
+
* 2. **Poll** — `GET ${baseURL}/${model}/requests/${request_id}/status`
|
|
24
|
+
* until `status === 'COMPLETED'` or `'FAILED'`.
|
|
25
|
+
* 3. **Fetch** — `GET ${baseURL}/${model}/requests/${request_id}`
|
|
26
|
+
* returns `{ video: { url } }`.
|
|
27
|
+
*
|
|
28
|
+
* ## Authentication
|
|
29
|
+
*
|
|
30
|
+
* Requires a `FAL_API_KEY`. Sent as `Authorization: Key ${apiKey}`.
|
|
31
|
+
*
|
|
32
|
+
* @see {@link IVideoGenerator} for the provider interface contract.
|
|
33
|
+
* @see {@link FalImageProvider} for the image counterpart.
|
|
34
|
+
*/
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
// Helpers
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
/**
|
|
39
|
+
* Sleep for the specified number of milliseconds.
|
|
40
|
+
* Used between poll requests to avoid rate-limiting.
|
|
41
|
+
* @param ms - Duration in milliseconds.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
function sleep(ms) {
|
|
45
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
46
|
+
}
|
|
47
|
+
// ---------------------------------------------------------------------------
|
|
48
|
+
// Implementation
|
|
49
|
+
// ---------------------------------------------------------------------------
|
|
50
|
+
/**
|
|
51
|
+
* Video generation provider connecting to the Fal.ai serverless platform.
|
|
52
|
+
*
|
|
53
|
+
* Implements the three-step queue pattern: submit a generation task,
|
|
54
|
+
* poll the status endpoint until completion, then fetch the result.
|
|
55
|
+
* This mirrors the flow used by {@link FalImageProvider}.
|
|
56
|
+
*
|
|
57
|
+
* @implements {IVideoGenerator}
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```typescript
|
|
61
|
+
* const provider = new FalVideoProvider();
|
|
62
|
+
* await provider.initialize({ apiKey: process.env.FAL_API_KEY! });
|
|
63
|
+
*
|
|
64
|
+
* const result = await provider.generateVideo({
|
|
65
|
+
* modelId: 'kling-video/v1',
|
|
66
|
+
* prompt: 'A time-lapse of flowers blooming in a meadow',
|
|
67
|
+
* });
|
|
68
|
+
* console.log(result.videos[0].url);
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export class FalVideoProvider {
|
|
72
|
+
constructor() {
|
|
73
|
+
/** @inheritdoc */
|
|
74
|
+
this.providerId = 'fal';
|
|
75
|
+
/** @inheritdoc */
|
|
76
|
+
this.isInitialized = false;
|
|
77
|
+
}
|
|
78
|
+
// -------------------------------------------------------------------------
|
|
79
|
+
// Lifecycle
|
|
80
|
+
// -------------------------------------------------------------------------
|
|
81
|
+
/**
|
|
82
|
+
* Initialize the provider with API credentials and optional configuration.
|
|
83
|
+
*
|
|
84
|
+
* @param config - Configuration object. Must include `apiKey`.
|
|
85
|
+
* @throws {Error} If `apiKey` is missing or empty.
|
|
86
|
+
*/
|
|
87
|
+
async initialize(config) {
|
|
88
|
+
const apiKey = typeof config.apiKey === 'string' ? config.apiKey.trim() : '';
|
|
89
|
+
if (!apiKey) {
|
|
90
|
+
throw new Error('Fal.ai video provider requires apiKey (FAL_API_KEY).');
|
|
91
|
+
}
|
|
92
|
+
this._config = {
|
|
93
|
+
apiKey,
|
|
94
|
+
baseURL: typeof config.baseURL === 'string' && config.baseURL.trim()
|
|
95
|
+
? config.baseURL.trim()
|
|
96
|
+
: 'https://queue.fal.run',
|
|
97
|
+
defaultModelId: typeof config.defaultModelId === 'string' && config.defaultModelId.trim()
|
|
98
|
+
? config.defaultModelId.trim()
|
|
99
|
+
: 'kling-video/v1',
|
|
100
|
+
pollIntervalMs: typeof config.pollIntervalMs === 'number' && config.pollIntervalMs > 0
|
|
101
|
+
? config.pollIntervalMs
|
|
102
|
+
: 2000,
|
|
103
|
+
timeoutMs: typeof config.timeoutMs === 'number' && config.timeoutMs > 0
|
|
104
|
+
? config.timeoutMs
|
|
105
|
+
: 300000,
|
|
106
|
+
};
|
|
107
|
+
this.defaultModelId = this._config.defaultModelId;
|
|
108
|
+
this.isInitialized = true;
|
|
109
|
+
}
|
|
110
|
+
// -------------------------------------------------------------------------
|
|
111
|
+
// Generation
|
|
112
|
+
// -------------------------------------------------------------------------
|
|
113
|
+
/**
|
|
114
|
+
* Generate a video from a text prompt using the Fal.ai queue API.
|
|
115
|
+
*
|
|
116
|
+
* Submits the task, polls until complete, then fetches the result.
|
|
117
|
+
*
|
|
118
|
+
* @param request - Video generation request with prompt and optional params.
|
|
119
|
+
* @returns The generated video result envelope.
|
|
120
|
+
*
|
|
121
|
+
* @throws {Error} If the provider is not initialized.
|
|
122
|
+
* @throws {Error} If the API returns an error or times out.
|
|
123
|
+
*/
|
|
124
|
+
async generateVideo(request) {
|
|
125
|
+
if (!this.isInitialized) {
|
|
126
|
+
throw new Error('Fal.ai video provider is not initialized. Call initialize() first.');
|
|
127
|
+
}
|
|
128
|
+
const model = request.modelId || this.defaultModelId || 'kling-video/v1';
|
|
129
|
+
const body = {
|
|
130
|
+
prompt: request.prompt,
|
|
131
|
+
};
|
|
132
|
+
if (request.durationSec !== undefined)
|
|
133
|
+
body.duration = request.durationSec;
|
|
134
|
+
if (request.aspectRatio)
|
|
135
|
+
body.aspect_ratio = request.aspectRatio;
|
|
136
|
+
if (request.seed !== undefined)
|
|
137
|
+
body.seed = request.seed;
|
|
138
|
+
// Three-step flow: submit → poll → fetch
|
|
139
|
+
const requestId = await this._submitTask(model, body);
|
|
140
|
+
await this._pollStatus(model, requestId);
|
|
141
|
+
const result = await this._fetchResult(model, requestId);
|
|
142
|
+
return this._buildResult(result, model);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Generate a video from a source image using the Fal.ai queue API.
|
|
146
|
+
*
|
|
147
|
+
* The source image Buffer is converted to a base64 data URL and passed
|
|
148
|
+
* as the `image_url` parameter.
|
|
149
|
+
*
|
|
150
|
+
* @param request - Generation parameters including the source image buffer.
|
|
151
|
+
* @returns The generated video result envelope.
|
|
152
|
+
*
|
|
153
|
+
* @throws {Error} If the provider is not initialized or the API fails.
|
|
154
|
+
*/
|
|
155
|
+
async imageToVideo(request) {
|
|
156
|
+
if (!this.isInitialized) {
|
|
157
|
+
throw new Error('Fal.ai video provider is not initialized. Call initialize() first.');
|
|
158
|
+
}
|
|
159
|
+
const model = request.modelId || this.defaultModelId || 'kling-video/v1';
|
|
160
|
+
// Convert the image buffer to a base64 data URL for the Fal.ai API.
|
|
161
|
+
const imageBase64 = `data:image/png;base64,${request.image.toString('base64')}`;
|
|
162
|
+
const body = {
|
|
163
|
+
prompt: request.prompt,
|
|
164
|
+
image_url: imageBase64,
|
|
165
|
+
};
|
|
166
|
+
if (request.durationSec !== undefined)
|
|
167
|
+
body.duration = request.durationSec;
|
|
168
|
+
if (request.aspectRatio)
|
|
169
|
+
body.aspect_ratio = request.aspectRatio;
|
|
170
|
+
if (request.seed !== undefined)
|
|
171
|
+
body.seed = request.seed;
|
|
172
|
+
// Three-step flow: submit → poll → fetch
|
|
173
|
+
const requestId = await this._submitTask(model, body);
|
|
174
|
+
await this._pollStatus(model, requestId);
|
|
175
|
+
const result = await this._fetchResult(model, requestId);
|
|
176
|
+
return this._buildResult(result, model);
|
|
177
|
+
}
|
|
178
|
+
// -------------------------------------------------------------------------
|
|
179
|
+
// Capability query
|
|
180
|
+
// -------------------------------------------------------------------------
|
|
181
|
+
/**
|
|
182
|
+
* Fal.ai supports both text-to-video and image-to-video generation.
|
|
183
|
+
*
|
|
184
|
+
* @param capability - The capability to check.
|
|
185
|
+
* @returns `true` for both `'text-to-video'` and `'image-to-video'`.
|
|
186
|
+
*/
|
|
187
|
+
supports(capability) {
|
|
188
|
+
return capability === 'text-to-video' || capability === 'image-to-video';
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Release any resources held by the provider. No-op for HTTP-only providers.
|
|
192
|
+
*/
|
|
193
|
+
async shutdown() {
|
|
194
|
+
this.isInitialized = false;
|
|
195
|
+
}
|
|
196
|
+
// -------------------------------------------------------------------------
|
|
197
|
+
// Private helpers
|
|
198
|
+
// -------------------------------------------------------------------------
|
|
199
|
+
/**
|
|
200
|
+
* Submit a generation task to the Fal.ai queue.
|
|
201
|
+
*
|
|
202
|
+
* @param model - Full model path (e.g. 'kling-video/v1').
|
|
203
|
+
* @param body - Request body with prompt and generation params.
|
|
204
|
+
* @returns The request_id for status polling.
|
|
205
|
+
*
|
|
206
|
+
* @throws {Error} If the submission request fails.
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
async _submitTask(model, body) {
|
|
210
|
+
const url = `${this._config.baseURL}/${model}`;
|
|
211
|
+
const response = await fetch(url, {
|
|
212
|
+
method: 'POST',
|
|
213
|
+
headers: {
|
|
214
|
+
Authorization: `Key ${this._config.apiKey}`,
|
|
215
|
+
'Content-Type': 'application/json',
|
|
216
|
+
},
|
|
217
|
+
body: JSON.stringify(body),
|
|
218
|
+
});
|
|
219
|
+
if (!response.ok) {
|
|
220
|
+
const errorText = await response.text();
|
|
221
|
+
throw new Error(`Fal.ai video generation submission failed (${response.status}): ${errorText}`);
|
|
222
|
+
}
|
|
223
|
+
const data = (await response.json());
|
|
224
|
+
if (!data.request_id) {
|
|
225
|
+
throw new Error('Fal.ai submission response missing request_id.');
|
|
226
|
+
}
|
|
227
|
+
return data.request_id;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Poll the Fal.ai status endpoint until the task completes or times out.
|
|
231
|
+
*
|
|
232
|
+
* @param model - Full model path.
|
|
233
|
+
* @param requestId - The request ID from submission.
|
|
234
|
+
*
|
|
235
|
+
* @throws {Error} If the generation fails or times out.
|
|
236
|
+
* @internal
|
|
237
|
+
*/
|
|
238
|
+
async _pollStatus(model, requestId) {
|
|
239
|
+
const startedAt = Date.now();
|
|
240
|
+
while (Date.now() - startedAt < this._config.timeoutMs) {
|
|
241
|
+
const url = `${this._config.baseURL}/${model}/requests/${requestId}/status`;
|
|
242
|
+
const response = await fetch(url, {
|
|
243
|
+
headers: {
|
|
244
|
+
Authorization: `Key ${this._config.apiKey}`,
|
|
245
|
+
},
|
|
246
|
+
});
|
|
247
|
+
if (!response.ok) {
|
|
248
|
+
const errorText = await response.text();
|
|
249
|
+
throw new Error(`Fal.ai status polling failed (${response.status}): ${errorText}`);
|
|
250
|
+
}
|
|
251
|
+
const data = (await response.json());
|
|
252
|
+
if (data.status === 'COMPLETED') {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
if (data.status === 'FAILED') {
|
|
256
|
+
throw new Error(`Fal.ai video generation failed for request ${requestId}.`);
|
|
257
|
+
}
|
|
258
|
+
// 'IN_QUEUE' or 'IN_PROGRESS' — wait before next poll
|
|
259
|
+
await sleep(this._config.pollIntervalMs);
|
|
260
|
+
}
|
|
261
|
+
throw new Error(`Fal.ai video generation timed out after ${this._config.timeoutMs}ms for request ${requestId}.`);
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Fetch the completed generation result from the Fal.ai result endpoint.
|
|
265
|
+
*
|
|
266
|
+
* Called after polling confirms the task is COMPLETED. The result endpoint
|
|
267
|
+
* is separate from the status endpoint because Fal.ai returns the full
|
|
268
|
+
* payload (including video URLs) only here.
|
|
269
|
+
*
|
|
270
|
+
* @param model - Full model path.
|
|
271
|
+
* @param requestId - The request ID from submission.
|
|
272
|
+
* @returns The generation result with video URL.
|
|
273
|
+
*
|
|
274
|
+
* @throws {Error} If the result fetch fails.
|
|
275
|
+
* @internal
|
|
276
|
+
*/
|
|
277
|
+
async _fetchResult(model, requestId) {
|
|
278
|
+
const url = `${this._config.baseURL}/${model}/requests/${requestId}`;
|
|
279
|
+
const response = await fetch(url, {
|
|
280
|
+
headers: {
|
|
281
|
+
Authorization: `Key ${this._config.apiKey}`,
|
|
282
|
+
},
|
|
283
|
+
});
|
|
284
|
+
if (!response.ok) {
|
|
285
|
+
const errorText = await response.text();
|
|
286
|
+
throw new Error(`Fal.ai result fetch failed (${response.status}): ${errorText}`);
|
|
287
|
+
}
|
|
288
|
+
return (await response.json());
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Build a {@link VideoResult} from a completed Fal.ai result.
|
|
292
|
+
*
|
|
293
|
+
* @param result - The Fal.ai result response.
|
|
294
|
+
* @param model - Model ID used for the generation.
|
|
295
|
+
* @returns Normalized video result envelope.
|
|
296
|
+
*
|
|
297
|
+
* @throws {Error} If the result has no video URL.
|
|
298
|
+
* @internal
|
|
299
|
+
*/
|
|
300
|
+
_buildResult(result, model) {
|
|
301
|
+
if (!result.video?.url) {
|
|
302
|
+
throw new Error('Fal.ai generation completed but returned no video output.');
|
|
303
|
+
}
|
|
304
|
+
return {
|
|
305
|
+
created: Math.floor(Date.now() / 1000),
|
|
306
|
+
modelId: model,
|
|
307
|
+
providerId: this.providerId,
|
|
308
|
+
videos: [{
|
|
309
|
+
url: result.video.url,
|
|
310
|
+
mimeType: result.video.content_type ?? 'video/mp4',
|
|
311
|
+
durationSec: result.video.duration,
|
|
312
|
+
providerMetadata: {
|
|
313
|
+
seed: result.seed,
|
|
314
|
+
},
|
|
315
|
+
}],
|
|
316
|
+
usage: {
|
|
317
|
+
totalVideos: 1,
|
|
318
|
+
},
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
//# sourceMappingURL=FalVideoProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FalVideoProvider.js","sourceRoot":"","sources":["../../../../src/core/video/providers/FalVideoProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAgGH,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E;;;;;GAKG;AACH,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,gBAAgB;IAA7B;QACE,kBAAkB;QACF,eAAU,GAAG,KAAK,CAAC;QAEnC,kBAAkB;QACX,kBAAa,GAAG,KAAK,CAAC;IAoS/B,CAAC;IA5RC,4EAA4E;IAC5E,YAAY;IACZ,4EAA4E;IAE5E;;;;;OAKG;IACH,K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