ForcePilot/backend/package/yuxi/channels/__init__.py

193 lines
5.1 KiB
Python
Raw Normal View History

from yuxi.channels.auth import (
AuthHealth,
AuthHealthMonitor,
BackoffConfig,
BaseTokenProvider,
CertificateTokenProvider,
CompatTokenProvider,
DmPolicy,
ExponentialBackoff,
GroupPolicy,
NetworkGuardError,
OAuth2TokenProvider,
QRTokenProvider,
SecretManager,
SecretSource,
SecurityPolicy,
SecurityPolicyEngine,
SensitiveDataFilter,
StaticTokenProvider,
TokenProviderType,
TokenState,
UnifiedTokenManager,
apply_ssrf_guard_defaults,
build_ssrf_safe_headers,
check_response_size,
check_response_text,
fetch_with_ssrf_guard,
get_health_monitor,
get_secret_manager,
get_security_policy_engine,
get_token_manager,
init_secret_manager,
is_hostname_allowed,
is_private_url,
redact_sensitive,
safe_webhook_url,
sanitize_transport_kwargs,
validate_url,
validate_url_with_whitelist,
)
from yuxi.channels.base import BaseChannelAdapter
from yuxi.channels.bridge import BridgeAdapter
from yuxi.channels.capabilities import ChannelCapabilities
from yuxi.channels.exceptions import (
ChannelAuthenticationError,
ChannelConnectionError,
ChannelException,
ChannelNotConnectedError,
ChannelRateLimitError,
DeliveryFailedError,
MessageFormatError,
)
from yuxi.channels.infra.broadcast import EventBroadcaster
from yuxi.channels.infra.circuit_breaker import CircuitBreaker, CircuitBreakerOpenError, CircuitState
from yuxi.channels.infra.config_watcher import ConfigWatcher
from yuxi.channels.manager import ChannelManager
from yuxi.channels.meta import ChannelMeta
from yuxi.channels.models import (
AgentRequest,
AgentResult,
Attachment,
ChannelAccountSnapshot,
ChannelIdentity,
ChannelMessage,
ChannelResponse,
ChannelStatus,
ChannelType,
ChatType,
DeliveryResult,
EventType,
HealthStatus,
MentionsInfo,
MessageType,
TokenStatus,
build_snapshot_from_adapter,
)
from yuxi.channels.plugin import ChannelPlugin, channel_plugin
from yuxi.channels.policy.heartbeat import BaseHeartbeatAdapter
from yuxi.channels.protocols import (
ChannelConfigProtocol,
ChannelGatewayProtocol,
ChannelHeartbeatProtocol,
ChannelLifecycleProtocol,
ChannelMessageActionProtocol,
ChannelMessagingProtocol,
ChannelOutboundProtocol,
ChannelStatusProtocol,
ChannelThreadingProtocol,
)
from yuxi.channels.registry import ChannelRegistry, register_builtin_adapter
from yuxi.channels.router import MessageRouter
from yuxi.channels.services.context import ChatAbortEntry, ChatRunBuffer, GatewayRequestContext
from yuxi.channels.services.doctor import ConfigDoctor, DiagnosisIssue
from yuxi.channels.services.maintenance import MaintenanceRunner
from yuxi.channels.session_mapper import SessionMapper
__all__ = [
"AgentRequest",
"AgentResult",
"Attachment",
"ChannelAccountSnapshot",
"ChannelIdentity",
"ChannelMessage",
"ChannelResponse",
"ChannelStatus",
"ChannelType",
"ChatType",
"DeliveryResult",
"EventType",
"HealthStatus",
"MentionsInfo",
"MessageType",
"TokenStatus",
"build_snapshot_from_adapter",
"BaseChannelAdapter",
"BaseHeartbeatAdapter",
"ChannelAuthenticationError",
"ChannelConnectionError",
"ChannelException",
"ChannelNotConnectedError",
"ChannelRateLimitError",
"DeliveryFailedError",
"MessageFormatError",
"CircuitBreaker",
"CircuitBreakerOpenError",
"CircuitState",
"ChannelRegistry",
"register_builtin_adapter",
"ChannelManager",
"MessageRouter",
"SessionMapper",
"MaintenanceRunner",
"BridgeAdapter",
"ChannelPlugin",
"channel_plugin",
"ChannelMeta",
"ChannelCapabilities",
"ChannelConfigProtocol",
"ChannelGatewayProtocol",
"ChannelHeartbeatProtocol",
"ChannelLifecycleProtocol",
"ChannelMessageActionProtocol",
"ChannelMessagingProtocol",
"ChannelOutboundProtocol",
"ChannelStatusProtocol",
"ChannelThreadingProtocol",
"ChatAbortEntry",
"ChatRunBuffer",
"GatewayRequestContext",
"EventBroadcaster",
"ConfigWatcher",
"ConfigDoctor",
"DiagnosisIssue",
"SecretManager",
"SecretSource",
"get_secret_manager",
"init_secret_manager",
"BaseTokenProvider",
"TokenProviderType",
"TokenState",
"UnifiedTokenManager",
"get_token_manager",
"CertificateTokenProvider",
"CompatTokenProvider",
"OAuth2TokenProvider",
"QRTokenProvider",
"StaticTokenProvider",
"AuthHealth",
"AuthHealthMonitor",
"get_health_monitor",
"BackoffConfig",
"ExponentialBackoff",
"DmPolicy",
"GroupPolicy",
"SecurityPolicy",
"SecurityPolicyEngine",
"get_security_policy_engine",
"SensitiveDataFilter",
"redact_sensitive",
"NetworkGuardError",
"apply_ssrf_guard_defaults",
"build_ssrf_safe_headers",
"check_response_size",
"check_response_text",
"fetch_with_ssrf_guard",
"is_hostname_allowed",
"is_private_url",
"safe_webhook_url",
"sanitize_transport_kwargs",
"validate_url",
"validate_url_with_whitelist",
]