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
fix(email): disable intermediate progress delivery
chengyongru90b889394fb7
diff --git a/nanobot/channels/email/runtime.py b/nanobot/channels/email/runtime.pyindex f36cda50b..7e09a4eac 100644--- a/nanobot/channels/email/runtime.py+++ b/nanobot/channels/email/runtime.py@@ -94,6 +94,8 @@ class EmailChannel(BaseChannel):name = "email"display_name = "Email"+ send_progress = False+ send_tool_hints = False_IMAP_MONTHS = ("Jan","Feb",@@ -128,6 +130,10 @@ class EmailChannel(BaseChannel):def default_config(cls) -> dict[str, Any]:return EmailConfig().model_dump(by_alias=True)+ def progress_transport_defaults(self) -> tuple[bool, bool]:+ """Email delivers one final reply instead of intermediate trace messages."""+ return False, False+def __init__(self, config: Any, bus: MessageBus):if isinstance(config, dict):config = EmailConfig.model_validate(config)diff --git a/nanobot/channels/email/tests/test_email_channel.py b/nanobot/channels/email/tests/test_email_channel.pyindex c26e53da9..60863b6ba 100644--- a/nanobot/channels/email/tests/test_email_channel.py+++ b/nanobot/channels/email/tests/test_email_channel.py@@ -8,7 +8,10 @@ import pytestfrom nanobot.bus.events import OutboundMessagefrom nanobot.bus.outbound_events import ProgressEventfrom nanobot.bus.queue import MessageBus+from nanobot.channels.base import BaseChannelfrom nanobot.channels.email.runtime import EmailChannel, EmailConfig+from nanobot.channels.manager import ChannelManager+from nanobot.config.schema import Configdef _make_config(**overrides) -> EmailConfig:@@ -50,6 +53,19 @@ def _make_raw_email(return msg.as_bytes()+def test_email_only_enables_final_reply_delivery() -> None:+ manager = ChannelManager.__new__(ChannelManager)+ manager.config = Config.model_validate({"channels": {"email": {"enabled": True}}})+ manager.bus = MessageBus()++ channel = manager._build_channel("email", EmailChannel, {"enabled": True})++ assert channel.send_progress is False+ assert channel.send_tool_hints is False+ assert channel.supports_streaming is False+ assert type(channel).send_reasoning_delta is BaseChannel.send_reasoning_delta++def test_fetch_new_messages_parses_unseen_and_marks_seen(monkeypatch) -> None:raw = _make_raw_email(subject="Invoice", body="Please pay")