mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 23:58:34 +00:00
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Adds initial extensions API (with registry temporarily no-op), introduces aiocache for async caching, ensures reference task IDs propagate correctly, fixes streamed response model handling, updates streaming tests, and regenerates lockfiles.
35 lines
839 B
Python
35 lines
839 B
Python
"""Extension registry factory for A2A configurations.
|
|
|
|
This module provides utilities for creating extension registries from A2A configurations.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
from crewai.a2a.extensions.base import ExtensionRegistry
|
|
|
|
|
|
if TYPE_CHECKING:
|
|
from crewai.a2a.config import A2AConfig
|
|
|
|
|
|
def create_extension_registry_from_config(
|
|
a2a_config: list[A2AConfig] | A2AConfig,
|
|
) -> ExtensionRegistry:
|
|
"""Create an extension registry from A2A configuration.
|
|
|
|
Args:
|
|
a2a_config: A2A configuration (single or list)
|
|
|
|
Returns:
|
|
Configured extension registry with all applicable extensions
|
|
"""
|
|
registry = ExtensionRegistry()
|
|
configs = a2a_config if isinstance(a2a_config, list) else [a2a_config]
|
|
|
|
for _ in configs:
|
|
pass
|
|
|
|
return registry
|