Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
Merge remote-tracking branch 'origin/main' into advisory-email-fix
Xubin Ren9f192970561d
diff --cc nanobot/channels/email.pyindex 9e2ff4487,be3cb3e6d..bee2ceccd--- a/nanobot/channels/email.py+++ b/nanobot/channels/email.py@@@ -19,8 -20,37 +20,41 @@@ from pydantic import Fielfrom nanobot.bus.events import OutboundMessagefrom nanobot.bus.queue import MessageBusfrom nanobot.channels.base import BaseChannel- from nanobot.config.schema import EmailConfig+ from nanobot.config.schema import Base+++ class EmailConfig(Base):+ """Email channel configuration (IMAP inbound + SMTP outbound)."""++ enabled: bool = False+ consent_granted: bool = False++ imap_host: str = ""+ imap_port: int = 993+ imap_username: str = ""+ imap_password: str = ""+ imap_mailbox: str = "INBOX"+ imap_use_ssl: bool = True++ smtp_host: str = ""+ smtp_port: int = 587+ smtp_username: str = ""+ smtp_password: str = ""+ smtp_use_tls: bool = True+ smtp_use_ssl: bool = False+ from_address: str = ""++ auto_reply_enabled: bool = True+ poll_interval_seconds: int = 30+ mark_seen: bool = True+ max_body_chars: int = 12000+ subject_prefix: str = "Re: "+ allow_from: list[str] = Field(default_factory=list)+++ # Email authentication verification (anti-spoofing)++ verify_dkim: bool = True # Require Authentication-Results with dkim=pass++ verify_spf: bool = True # Require Authentication-Results with spf=pass+class EmailChannel(BaseChannel):"""diff --cc tests/test_email_channel.pyindex 808c8f6fd,23d3ea73e..2d0e33ce3--- a/tests/test_email_channel.py+++ b/tests/test_email_channel.py@@@ -6,11 -7,11 +7,11 @@@ import pytesfrom nanobot.bus.events import OutboundMessagefrom nanobot.bus.queue import MessageBusfrom nanobot.channels.email import EmailChannel- from nanobot.config.schema import EmailConfig+ from nanobot.channels.email import EmailConfig-def _make_config() -> EmailConfig:- return EmailConfig(+def _make_config(**overrides) -> EmailConfig:+ defaults = dict(enabled=True,consent_granted=True,imap_host="imap.example.com",