mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-04 16:52:37 +00:00
Move crewai.a2a into lib/crewai-a2a as its own workspace package, importable as crewai_a2a. The crewai[a2a] extra now pulls in crewai-a2a, which owns a2a-sdk, httpx-auth, httpx-sse, and aiocache. crewai.a2a stays importable. Its __init__ is a compat shim that installs a meta-path finder routing crewai.a2a.* to crewai_a2a.*, so existing user code keeps working untouched. a2a tests and cassettes moved alongside the package under lib/crewai-a2a/tests/. Added that path to the mypy and ruff per-file-ignores lists to match the other test dirs.
26 lines
855 B
Python
26 lines
855 B
Python
"""Polling update mechanism configuration."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class PollingConfig(BaseModel):
|
|
"""Configuration for polling-based task updates.
|
|
|
|
Attributes:
|
|
interval: Seconds between poll attempts.
|
|
timeout: Max seconds to poll before raising timeout error.
|
|
max_polls: Max number of poll attempts.
|
|
history_length: Number of messages to retrieve per poll.
|
|
"""
|
|
|
|
interval: float = Field(
|
|
default=2.0, gt=0, description="Seconds between poll attempts"
|
|
)
|
|
timeout: float | None = Field(default=None, gt=0, description="Max seconds to poll")
|
|
max_polls: int | None = Field(default=None, gt=0, description="Max poll attempts")
|
|
history_length: int = Field(
|
|
default=100, gt=0, description="Messages to retrieve per poll"
|
|
)
|