@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,305 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/audio/providers/UdioProvider
|
|
3
|
+
*
|
|
4
|
+
* Music generation provider for the Udio model via Replicate.
|
|
5
|
+
*
|
|
6
|
+
* Udio is hosted on Replicate and accessed through the predictions API
|
|
7
|
+
* using the submit-then-poll pattern. This provider is music-only; it
|
|
8
|
+
* does not support sound effect generation.
|
|
9
|
+
*
|
|
10
|
+
* ## API flow (Replicate submit-poll)
|
|
11
|
+
*
|
|
12
|
+
* 1. **Create prediction** — `POST ${baseURL}/predictions` with
|
|
13
|
+
* `Prefer: wait=60`. If the model finishes within 60 seconds the
|
|
14
|
+
* response already contains the output.
|
|
15
|
+
* 2. **Poll** (if needed) — `GET prediction.urls.get` until `status` is
|
|
16
|
+
* `succeeded`, `failed`, or `canceled`.
|
|
17
|
+
* 3. **Result** — `output` is the audio URL (string or first array element).
|
|
18
|
+
*
|
|
19
|
+
* ## Authentication
|
|
20
|
+
*
|
|
21
|
+
* Requires a `REPLICATE_API_TOKEN`. Sent as `Authorization: Token ${apiKey}`.
|
|
22
|
+
*
|
|
23
|
+
* @see {@link IAudioGenerator} for the provider interface contract.
|
|
24
|
+
* @see {@link SunoProvider} for a similar Replicate-hosted music provider.
|
|
25
|
+
*/
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
// Helpers
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
/**
|
|
30
|
+
* Sleep for the specified number of milliseconds.
|
|
31
|
+
* @param ms - Duration in milliseconds.
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
function sleep(ms) {
|
|
35
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Extract an audio URL from the Replicate prediction output.
|
|
39
|
+
*
|
|
40
|
+
* @param output - Raw output from the prediction.
|
|
41
|
+
* @returns The audio URL string, or `undefined` if not found.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
function extractAudioUrl(output) {
|
|
45
|
+
if (typeof output === 'string')
|
|
46
|
+
return output;
|
|
47
|
+
if (Array.isArray(output)) {
|
|
48
|
+
for (const item of output) {
|
|
49
|
+
if (typeof item === 'string')
|
|
50
|
+
return item;
|
|
51
|
+
}
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
if (output && typeof output === 'object') {
|
|
55
|
+
const obj = output;
|
|
56
|
+
if (typeof obj.url === 'string')
|
|
57
|
+
return obj.url;
|
|
58
|
+
if (typeof obj.audio === 'string')
|
|
59
|
+
return obj.audio;
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
// ---------------------------------------------------------------------------
|
|
64
|
+
// Implementation
|
|
65
|
+
// ---------------------------------------------------------------------------
|
|
66
|
+
/**
|
|
67
|
+
* Music generation provider connecting to the Udio model on Replicate.
|
|
68
|
+
*
|
|
69
|
+
* Follows the Replicate submit-then-poll pattern: create a prediction with
|
|
70
|
+
* `Prefer: wait=60`, then poll if the model takes longer than the wait window.
|
|
71
|
+
*
|
|
72
|
+
* @implements {IAudioGenerator}
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const provider = new UdioProvider();
|
|
77
|
+
* await provider.initialize({ apiKey: process.env.REPLICATE_API_TOKEN! });
|
|
78
|
+
*
|
|
79
|
+
* const result = await provider.generateMusic({
|
|
80
|
+
* prompt: 'Epic orchestral film score with dramatic strings',
|
|
81
|
+
* durationSec: 120,
|
|
82
|
+
* });
|
|
83
|
+
* console.log(result.audio[0].url);
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
export class UdioProvider {
|
|
87
|
+
constructor() {
|
|
88
|
+
/** @inheritdoc */
|
|
89
|
+
this.providerId = 'udio';
|
|
90
|
+
/** @inheritdoc */
|
|
91
|
+
this.isInitialized = false;
|
|
92
|
+
}
|
|
93
|
+
// -------------------------------------------------------------------------
|
|
94
|
+
// Lifecycle
|
|
95
|
+
// -------------------------------------------------------------------------
|
|
96
|
+
/**
|
|
97
|
+
* Initialize the provider with API credentials and optional configuration.
|
|
98
|
+
*
|
|
99
|
+
* @param config - Configuration object. Must include `apiKey`.
|
|
100
|
+
* @throws {Error} If `apiKey` is missing or empty.
|
|
101
|
+
*/
|
|
102
|
+
async initialize(config) {
|
|
103
|
+
const apiKey = typeof config.apiKey === 'string' ? config.apiKey.trim() : '';
|
|
104
|
+
if (!apiKey) {
|
|
105
|
+
throw new Error('Udio provider requires apiKey (REPLICATE_API_TOKEN).');
|
|
106
|
+
}
|
|
107
|
+
this._config = {
|
|
108
|
+
apiKey,
|
|
109
|
+
baseURL: typeof config.baseURL === 'string' && config.baseURL.trim()
|
|
110
|
+
? config.baseURL.trim()
|
|
111
|
+
: 'https://api.replicate.com/v1',
|
|
112
|
+
defaultModelId: typeof config.defaultModelId === 'string' && config.defaultModelId.trim()
|
|
113
|
+
? config.defaultModelId.trim()
|
|
114
|
+
: 'udio/udio',
|
|
115
|
+
pollIntervalMs: typeof config.pollIntervalMs === 'number' && config.pollIntervalMs > 0
|
|
116
|
+
? config.pollIntervalMs
|
|
117
|
+
: 5000,
|
|
118
|
+
timeoutMs: typeof config.timeoutMs === 'number' && config.timeoutMs > 0
|
|
119
|
+
? config.timeoutMs
|
|
120
|
+
: 300000,
|
|
121
|
+
};
|
|
122
|
+
this.defaultModelId = this._config.defaultModelId;
|
|
123
|
+
this.isInitialized = true;
|
|
124
|
+
}
|
|
125
|
+
// -------------------------------------------------------------------------
|
|
126
|
+
// Generation
|
|
127
|
+
// -------------------------------------------------------------------------
|
|
128
|
+
/**
|
|
129
|
+
* Generate music from a text prompt using the Udio model on Replicate.
|
|
130
|
+
*
|
|
131
|
+
* Creates a prediction, waits for synchronous completion (up to 60s), then
|
|
132
|
+
* polls if still in progress.
|
|
133
|
+
*
|
|
134
|
+
* @param request - Music generation request with prompt and optional params.
|
|
135
|
+
* @returns The generated audio result envelope.
|
|
136
|
+
*
|
|
137
|
+
* @throws {Error} If the provider is not initialized.
|
|
138
|
+
* @throws {Error} If the API returns an error or times out.
|
|
139
|
+
*/
|
|
140
|
+
async generateMusic(request) {
|
|
141
|
+
if (!this.isInitialized) {
|
|
142
|
+
throw new Error('Udio provider is not initialized. Call initialize() first.');
|
|
143
|
+
}
|
|
144
|
+
const model = request.modelId || this.defaultModelId || 'udio/udio';
|
|
145
|
+
const input = {
|
|
146
|
+
prompt: request.prompt,
|
|
147
|
+
};
|
|
148
|
+
if (request.durationSec !== undefined)
|
|
149
|
+
input.duration = request.durationSec;
|
|
150
|
+
const prediction = await this._runPrediction(model, input);
|
|
151
|
+
return this._buildResult(prediction, model);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* SFX generation is not supported by the Udio model.
|
|
155
|
+
*
|
|
156
|
+
* @throws {Error} Always throws — use an SFX-capable provider instead.
|
|
157
|
+
*/
|
|
158
|
+
async generateSFX(_request) {
|
|
159
|
+
throw new Error('Udio provider does not support SFX generation. Use an SFX-capable provider.');
|
|
160
|
+
}
|
|
161
|
+
// -------------------------------------------------------------------------
|
|
162
|
+
// Capability query
|
|
163
|
+
// -------------------------------------------------------------------------
|
|
164
|
+
/**
|
|
165
|
+
* Udio supports music generation only.
|
|
166
|
+
*
|
|
167
|
+
* @param capability - The capability to check.
|
|
168
|
+
* @returns `true` only for `'music'`; `false` for `'sfx'`.
|
|
169
|
+
*/
|
|
170
|
+
supports(capability) {
|
|
171
|
+
return capability === 'music';
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Release any resources held by the provider. No-op for HTTP-only providers.
|
|
175
|
+
*/
|
|
176
|
+
async shutdown() {
|
|
177
|
+
this.isInitialized = false;
|
|
178
|
+
}
|
|
179
|
+
// -------------------------------------------------------------------------
|
|
180
|
+
// Private helpers
|
|
181
|
+
// -------------------------------------------------------------------------
|
|
182
|
+
/**
|
|
183
|
+
* Create a prediction and wait for it to complete.
|
|
184
|
+
*
|
|
185
|
+
* Uses `Prefer: wait=60` to get synchronous completion for fast models.
|
|
186
|
+
* Falls back to polling if the prediction hasn't completed within the
|
|
187
|
+
* wait window.
|
|
188
|
+
*
|
|
189
|
+
* @param model - Model identifier (e.g. 'udio/udio').
|
|
190
|
+
* @param input - Model input parameters.
|
|
191
|
+
* @returns The completed prediction object.
|
|
192
|
+
*
|
|
193
|
+
* @throws {Error} If prediction creation fails, the prediction fails,
|
|
194
|
+
* is canceled, or times out.
|
|
195
|
+
* @internal
|
|
196
|
+
*/
|
|
197
|
+
async _runPrediction(model, input) {
|
|
198
|
+
let prediction = await this._createPrediction(model, input);
|
|
199
|
+
// If the prediction hasn't reached a terminal state, poll for it.
|
|
200
|
+
if (prediction.status
|
|
201
|
+
&& !['succeeded', 'failed', 'canceled'].includes(prediction.status)
|
|
202
|
+
&& prediction.urls?.get) {
|
|
203
|
+
prediction = await this._pollPrediction(prediction.urls.get);
|
|
204
|
+
}
|
|
205
|
+
if (prediction.status === 'failed') {
|
|
206
|
+
throw new Error(`Udio music generation failed: ${prediction.error ?? 'unknown error'}`);
|
|
207
|
+
}
|
|
208
|
+
if (prediction.status === 'canceled') {
|
|
209
|
+
throw new Error('Udio music generation was canceled.');
|
|
210
|
+
}
|
|
211
|
+
return prediction;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Create a new prediction via `POST /predictions`.
|
|
215
|
+
*
|
|
216
|
+
* @param model - Model identifier.
|
|
217
|
+
* @param input - Model input parameters.
|
|
218
|
+
* @returns The prediction response (may or may not be completed).
|
|
219
|
+
*
|
|
220
|
+
* @throws {Error} If the HTTP request fails.
|
|
221
|
+
* @internal
|
|
222
|
+
*/
|
|
223
|
+
async _createPrediction(model, input) {
|
|
224
|
+
const body = {
|
|
225
|
+
model,
|
|
226
|
+
input,
|
|
227
|
+
};
|
|
228
|
+
const response = await fetch(`${this._config.baseURL}/predictions`, {
|
|
229
|
+
method: 'POST',
|
|
230
|
+
headers: {
|
|
231
|
+
Authorization: `Token ${this._config.apiKey}`,
|
|
232
|
+
'Content-Type': 'application/json',
|
|
233
|
+
Prefer: 'wait=60',
|
|
234
|
+
},
|
|
235
|
+
body: JSON.stringify(body),
|
|
236
|
+
});
|
|
237
|
+
if (!response.ok) {
|
|
238
|
+
const errorText = await response.text();
|
|
239
|
+
throw new Error(`Udio prediction submission failed (${response.status}): ${errorText}`);
|
|
240
|
+
}
|
|
241
|
+
return (await response.json());
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Poll a prediction URL until it reaches a terminal state.
|
|
245
|
+
*
|
|
246
|
+
* @param url - The `prediction.urls.get` URL to poll.
|
|
247
|
+
* @returns The completed prediction object.
|
|
248
|
+
*
|
|
249
|
+
* @throws {Error} If polling fails or times out.
|
|
250
|
+
* @internal
|
|
251
|
+
*/
|
|
252
|
+
async _pollPrediction(url) {
|
|
253
|
+
const startedAt = Date.now();
|
|
254
|
+
while (Date.now() - startedAt < this._config.timeoutMs) {
|
|
255
|
+
const response = await fetch(url, {
|
|
256
|
+
headers: {
|
|
257
|
+
Authorization: `Token ${this._config.apiKey}`,
|
|
258
|
+
},
|
|
259
|
+
});
|
|
260
|
+
if (!response.ok) {
|
|
261
|
+
const errorText = await response.text();
|
|
262
|
+
throw new Error(`Udio prediction polling failed (${response.status}): ${errorText}`);
|
|
263
|
+
}
|
|
264
|
+
const prediction = (await response.json());
|
|
265
|
+
if (!prediction.status
|
|
266
|
+
|| ['succeeded', 'failed', 'canceled'].includes(prediction.status)) {
|
|
267
|
+
return prediction;
|
|
268
|
+
}
|
|
269
|
+
await sleep(this._config.pollIntervalMs);
|
|
270
|
+
}
|
|
271
|
+
throw new Error(`Udio music generation timed out after ${this._config.timeoutMs}ms.`);
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Build an {@link AudioResult} from a completed Replicate prediction.
|
|
275
|
+
*
|
|
276
|
+
* @param prediction - The succeeded prediction object.
|
|
277
|
+
* @param model - Model ID used for the generation.
|
|
278
|
+
* @returns Normalized audio result envelope.
|
|
279
|
+
*
|
|
280
|
+
* @throws {Error} If no audio URL could be extracted from the output.
|
|
281
|
+
* @internal
|
|
282
|
+
*/
|
|
283
|
+
_buildResult(prediction, model) {
|
|
284
|
+
const audioUrl = extractAudioUrl(prediction.output);
|
|
285
|
+
if (!audioUrl) {
|
|
286
|
+
throw new Error('Udio prediction succeeded but returned no audio output.');
|
|
287
|
+
}
|
|
288
|
+
return {
|
|
289
|
+
created: Math.floor(Date.now() / 1000),
|
|
290
|
+
modelId: model,
|
|
291
|
+
providerId: this.providerId,
|
|
292
|
+
audio: [{
|
|
293
|
+
url: audioUrl,
|
|
294
|
+
mimeType: 'audio/mpeg',
|
|
295
|
+
providerMetadata: {
|
|
296
|
+
predictionId: prediction.id,
|
|
297
|
+
},
|
|
298
|
+
}],
|
|
299
|
+
usage: {
|
|
300
|
+
totalAudioClips: 1,
|
|
301
|
+
},
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
//# sourceMappingURL=UdioProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UdioProvider.js","sourceRoot":"","sources":["../../../../src/core/audio/providers/UdioProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AA4EH,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E;;;;GAIG;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;;;;;;GAMG;AACH,SAAS,eAAe,CAAC,MAAe;IACtC,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC;IAE9C,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1B,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;YAC1B,IAAI,OAAO,IAAI,KAAK,QAAQ;gBAAE,OAAO,IAAI,CAAC;QAC5C,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QACzC,MAAM,GAAG,GAAG,MAAiC,CAAC;QAC9C,IAAI,OAAO,GAAG,CAAC,GAAG,KAAK,QAAQ;YAAE,OAAO,GAAG,CAAC,GAAG,CAAC;QAChD,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ;YAAE,OAAO,GAAG,CAAC,KAAK,CAAC;IACtD,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,8EA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K,YAAY,CAAC,UAA+B,EAAE,KAAa;QACjE,MAAM,QAAQ,GAAG,eAAe,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAEpD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;QAC7E,CAAC;QAED,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;YACtC,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,KAAK,EAAE,CAAC;oBACN,GAAG,EAAE,QAAQ;oBACb,QAAQ,EAAE,YAAY;oBACtB,gBAAgB,EAAE;wBAChB,YAAY,EAAE,UAAU,CAAC,EAAE;qBAC5B;iBACF,CAAC;YACF,KAAK,EAAE;gBACL,eAAe,EAAE,CAAC;aACnB;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file types.ts
|
|
3
|
+
* Core type definitions for the audio generation subsystem.
|
|
4
|
+
*
|
|
5
|
+
* These types are consumed by {@link IAudioGenerator}, {@link FallbackAudioProxy},
|
|
6
|
+
* and concrete provider implementations (Suno, Udio, Stable Audio,
|
|
7
|
+
* ElevenLabs SFX, etc.) to provide a unified audio pipeline across multiple
|
|
8
|
+
* provider backends.
|
|
9
|
+
*
|
|
10
|
+
* Audio generation is split into two sub-modalities:
|
|
11
|
+
*
|
|
12
|
+
* - **Music** — full-length musical compositions from text prompts (Suno, Udio,
|
|
13
|
+
* Stable Audio).
|
|
14
|
+
* - **SFX** — short sound effects from text descriptions (ElevenLabs, Stable
|
|
15
|
+
* Audio).
|
|
16
|
+
*
|
|
17
|
+
* Not all providers support both; capability negotiation is handled via
|
|
18
|
+
* {@link IAudioGenerator.supports}.
|
|
19
|
+
*/
|
|
20
|
+
/** Well-known audio provider identifiers. Extensible via `(string & {})`. */
|
|
21
|
+
export type AudioProviderId = 'suno' | 'udio' | 'stable-audio' | 'elevenlabs-sfx' | 'replicate-audio' | 'fal-audio' | 'musicgen-local' | 'audiogen-local' | (string & {});
|
|
22
|
+
/** Output audio container/codec format. */
|
|
23
|
+
export type AudioOutputFormat = 'mp3' | 'wav' | 'flac' | 'ogg' | 'aac';
|
|
24
|
+
/**
|
|
25
|
+
* Aggregated usage / billing counters for an audio generation session.
|
|
26
|
+
*
|
|
27
|
+
* Providers that report cost or timing information populate the optional
|
|
28
|
+
* fields; the minimum required field is {@link totalAudioClips}.
|
|
29
|
+
*/
|
|
30
|
+
export interface AudioProviderUsage {
|
|
31
|
+
/** Number of audio clips generated in this session. */
|
|
32
|
+
totalAudioClips: number;
|
|
33
|
+
/** Total cost in USD, if the provider reports it. */
|
|
34
|
+
totalCostUSD?: number;
|
|
35
|
+
/** Total processing time in milliseconds. */
|
|
36
|
+
processingTimeMs?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Request payload for music generation from a text prompt.
|
|
40
|
+
*
|
|
41
|
+
* Passed to {@link IAudioGenerator.generateMusic} by the high-level
|
|
42
|
+
* orchestration layer after normalising user input.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* const request: MusicGenerateRequest = {
|
|
47
|
+
* prompt: 'Upbeat lo-fi hip hop beat with vinyl crackle and mellow piano',
|
|
48
|
+
* durationSec: 60,
|
|
49
|
+
* outputFormat: 'mp3',
|
|
50
|
+
* };
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export interface MusicGenerateRequest {
|
|
54
|
+
/**
|
|
55
|
+
* Text prompt describing the desired musical composition.
|
|
56
|
+
*
|
|
57
|
+
* Quality and specificity of the prompt directly influence output quality.
|
|
58
|
+
* Include genre, mood, instrumentation, and tempo for best results.
|
|
59
|
+
*/
|
|
60
|
+
prompt: string;
|
|
61
|
+
/**
|
|
62
|
+
* Model identifier to use for generation.
|
|
63
|
+
*
|
|
64
|
+
* When omitted the provider falls back to its {@link IAudioGenerator.defaultModelId}.
|
|
65
|
+
*/
|
|
66
|
+
modelId?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Desired output duration in seconds.
|
|
69
|
+
*
|
|
70
|
+
* Provider limits vary: Suno caps at ~240s, Stable Audio at ~47s.
|
|
71
|
+
* Exceeding the limit may result in truncation or an error.
|
|
72
|
+
*/
|
|
73
|
+
durationSec?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Negative prompt describing musical elements to avoid.
|
|
76
|
+
*
|
|
77
|
+
* Not all providers support negative prompts — unsupported values are
|
|
78
|
+
* silently ignored by the adapter.
|
|
79
|
+
*/
|
|
80
|
+
negativePrompt?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Output audio format.
|
|
83
|
+
*
|
|
84
|
+
* @default 'mp3'
|
|
85
|
+
*/
|
|
86
|
+
outputFormat?: AudioOutputFormat;
|
|
87
|
+
/**
|
|
88
|
+
* Seed for reproducible output.
|
|
89
|
+
*
|
|
90
|
+
* Not all providers honour seeds — check provider documentation.
|
|
91
|
+
*/
|
|
92
|
+
seed?: number;
|
|
93
|
+
/**
|
|
94
|
+
* Number of audio clips to generate.
|
|
95
|
+
*
|
|
96
|
+
* @default 1
|
|
97
|
+
*/
|
|
98
|
+
n?: number;
|
|
99
|
+
/** Identifier of the requesting user (for billing / rate limiting). */
|
|
100
|
+
userId?: string;
|
|
101
|
+
/** Arbitrary provider-specific options. */
|
|
102
|
+
providerOptions?: Record<string, unknown>;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Request payload for sound-effect generation from a text prompt.
|
|
106
|
+
*
|
|
107
|
+
* Passed to {@link IAudioGenerator.generateSFX} by the high-level
|
|
108
|
+
* orchestration layer after normalising user input.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```typescript
|
|
112
|
+
* const request: SFXGenerateRequest = {
|
|
113
|
+
* prompt: 'Thunder crack followed by heavy rain on a tin roof',
|
|
114
|
+
* durationSec: 5,
|
|
115
|
+
* };
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
export interface SFXGenerateRequest {
|
|
119
|
+
/**
|
|
120
|
+
* Text prompt describing the desired sound effect.
|
|
121
|
+
*
|
|
122
|
+
* Be specific about the sound, its environment, and any layering
|
|
123
|
+
* (e.g. "glass breaking on a marble floor in a large hall with reverb").
|
|
124
|
+
*/
|
|
125
|
+
prompt: string;
|
|
126
|
+
/**
|
|
127
|
+
* Model identifier to use for generation.
|
|
128
|
+
*
|
|
129
|
+
* When omitted the provider falls back to its {@link IAudioGenerator.defaultModelId}.
|
|
130
|
+
*/
|
|
131
|
+
modelId?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Desired output duration in seconds.
|
|
134
|
+
*
|
|
135
|
+
* SFX clips are typically short (1-15 seconds). Providers may enforce
|
|
136
|
+
* their own limits.
|
|
137
|
+
*/
|
|
138
|
+
durationSec?: number;
|
|
139
|
+
/**
|
|
140
|
+
* Output audio format.
|
|
141
|
+
*
|
|
142
|
+
* @default 'mp3'
|
|
143
|
+
*/
|
|
144
|
+
outputFormat?: AudioOutputFormat;
|
|
145
|
+
/**
|
|
146
|
+
* Seed for reproducible output.
|
|
147
|
+
*
|
|
148
|
+
* Not all providers honour seeds — check provider documentation.
|
|
149
|
+
*/
|
|
150
|
+
seed?: number;
|
|
151
|
+
/**
|
|
152
|
+
* Number of audio clips to generate.
|
|
153
|
+
*
|
|
154
|
+
* @default 1
|
|
155
|
+
*/
|
|
156
|
+
n?: number;
|
|
157
|
+
/** Identifier of the requesting user (for billing / rate limiting). */
|
|
158
|
+
userId?: string;
|
|
159
|
+
/** Arbitrary provider-specific options. */
|
|
160
|
+
providerOptions?: Record<string, unknown>;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* A single generated audio artifact.
|
|
164
|
+
*
|
|
165
|
+
* At least one of {@link url} or {@link base64} will be populated depending
|
|
166
|
+
* on the provider's response format.
|
|
167
|
+
*/
|
|
168
|
+
export interface GeneratedAudio {
|
|
169
|
+
/** Public URL where the audio can be downloaded. */
|
|
170
|
+
url?: string;
|
|
171
|
+
/** Base64-encoded audio data. */
|
|
172
|
+
base64?: string;
|
|
173
|
+
/** MIME type of the audio (e.g. `'audio/mpeg'`, `'audio/wav'`). */
|
|
174
|
+
mimeType?: string;
|
|
175
|
+
/** Duration of the generated audio in seconds. */
|
|
176
|
+
durationSec?: number;
|
|
177
|
+
/** Sample rate in Hz (e.g. `44100`, `48000`). */
|
|
178
|
+
sampleRate?: number;
|
|
179
|
+
/** Provider-specific metadata (job ID, generation params, etc.). */
|
|
180
|
+
providerMetadata?: Record<string, unknown>;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Result envelope returned by {@link IAudioGenerator.generateMusic} and
|
|
184
|
+
* {@link IAudioGenerator.generateSFX}.
|
|
185
|
+
*
|
|
186
|
+
* Follows the same envelope pattern used by {@link VideoResult} in the video
|
|
187
|
+
* subsystem: a timestamp, model/provider IDs, the generated artifact(s), and
|
|
188
|
+
* optional usage/billing information.
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* ```typescript
|
|
192
|
+
* const result: AudioResult = {
|
|
193
|
+
* created: Math.floor(Date.now() / 1000),
|
|
194
|
+
* modelId: 'suno-v3.5',
|
|
195
|
+
* providerId: 'suno',
|
|
196
|
+
* audio: [{ url: 'https://cdn.suno.ai/abc123.mp3', mimeType: 'audio/mpeg' }],
|
|
197
|
+
* usage: { totalAudioClips: 1 },
|
|
198
|
+
* };
|
|
199
|
+
* ```
|
|
200
|
+
*/
|
|
201
|
+
export interface AudioResult {
|
|
202
|
+
/** Unix timestamp (seconds) when the result was created. */
|
|
203
|
+
created: number;
|
|
204
|
+
/** Model identifier that produced the result. */
|
|
205
|
+
modelId: string;
|
|
206
|
+
/** Provider identifier that produced the result. */
|
|
207
|
+
providerId: string;
|
|
208
|
+
/** The generated audio clip(s). */
|
|
209
|
+
audio: GeneratedAudio[];
|
|
210
|
+
/** Usage / billing information, if available. */
|
|
211
|
+
usage?: AudioProviderUsage;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Typed progress event emitted during audio generation.
|
|
215
|
+
*
|
|
216
|
+
* The generation lifecycle flows through these statuses in order:
|
|
217
|
+
* `queued` -> `processing` -> `downloading` -> `complete` (or `failed`
|
|
218
|
+
* at any point).
|
|
219
|
+
*
|
|
220
|
+
* Not all providers emit all statuses — synchronous providers (Stable Audio,
|
|
221
|
+
* ElevenLabs) may jump directly from `processing` to `complete`.
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* ```typescript
|
|
225
|
+
* emitter.on('audio:progress', (evt: AudioProgressEvent) => {
|
|
226
|
+
* console.log(`[${evt.status}] ${evt.progress ?? '?'}% — ${evt.message}`);
|
|
227
|
+
* });
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
export interface AudioProgressEvent {
|
|
231
|
+
/**
|
|
232
|
+
* Current status of the generation job.
|
|
233
|
+
*
|
|
234
|
+
* - `'queued'` — Request accepted, waiting for processing slot
|
|
235
|
+
* - `'processing'` — Actively generating audio
|
|
236
|
+
* - `'downloading'` — Generation complete, downloading result
|
|
237
|
+
* - `'complete'` — Fully done, result available
|
|
238
|
+
* - `'failed'` — Terminal error, see {@link message}
|
|
239
|
+
*/
|
|
240
|
+
status: 'queued' | 'processing' | 'downloading' | 'complete' | 'failed';
|
|
241
|
+
/**
|
|
242
|
+
* Estimated progress percentage (0-100).
|
|
243
|
+
*
|
|
244
|
+
* Not all providers report granular progress; may remain `undefined`
|
|
245
|
+
* until the final status transition.
|
|
246
|
+
*/
|
|
247
|
+
progress?: number;
|
|
248
|
+
/**
|
|
249
|
+
* Estimated time remaining in milliseconds.
|
|
250
|
+
*
|
|
251
|
+
* Only available when the provider reports ETA information.
|
|
252
|
+
*/
|
|
253
|
+
estimatedRemainingMs?: number;
|
|
254
|
+
/** Human-readable status message or error description. */
|
|
255
|
+
message?: string;
|
|
256
|
+
}
|
|
257
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/audio/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,6EAA6E;AAC7E,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,MAAM,GACN,cAAc,GACd,gBAAgB,GAChB,iBAAiB,GACjB,WAAW,GACX,gBAAgB,GAChB,gBAAgB,GAChB,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,2CAA2C;AAC3C,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;AAMvE;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,uDAAuD;IACvD,eAAe,EAAE,MAAM,CAAC;IAExB,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,6CAA6C;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAMD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IAEjC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IAEX,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CA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AM,WAAW,kBAAkB;IACjC;;;;;;;;OAQG;IACH,MAAM,EAAE,QAAQ,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,GAAG,QAAQ,CAAC;IAExE;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file types.ts
|
|
3
|
+
* Core type definitions for the audio generation subsystem.
|
|
4
|
+
*
|
|
5
|
+
* These types are consumed by {@link IAudioGenerator}, {@link FallbackAudioProxy},
|
|
6
|
+
* and concrete provider implementations (Suno, Udio, Stable Audio,
|
|
7
|
+
* ElevenLabs SFX, etc.) to provide a unified audio pipeline across multiple
|
|
8
|
+
* provider backends.
|
|
9
|
+
*
|
|
10
|
+
* Audio generation is split into two sub-modalities:
|
|
11
|
+
*
|
|
12
|
+
* - **Music** — full-length musical compositions from text prompts (Suno, Udio,
|
|
13
|
+
* Stable Audio).
|
|
14
|
+
* - **SFX** — short sound effects from text descriptions (ElevenLabs, Stable
|
|
15
|
+
* Audio).
|
|
16
|
+
*
|
|
17
|
+
* Not all providers support both; capability negotiation is handled via
|
|
18
|
+
* {@link IAudioGenerator.supports}.
|
|
19
|
+
*/
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/audio/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG"}
|