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(whatsapp_agent): clarify privacy and align current channel setup
Xubin Ren86f16ff493eb
diff --git a/docs/chat-apps.md b/docs/chat-apps.mdindex 2a6fc64d0..4b178a119 100644--- a/docs/chat-apps.md+++ b/docs/chat-apps.md@@ -9,7 +9,7 @@ Connect nanobot to Telegram, Discord, Slack, WeChat, Email, Mattermost, Linear,| Slack | [Build a Slack AI Agent with nanobot](./guides/slack-ai-agent.md) || Feishu | [Build a Feishu AI Agent with nanobot](./guides/feishu-ai-agent.md) || WhatsApp | [Build a WhatsApp AI Agent with nanobot](./guides/whatsapp-ai-agent.md) |-| WhatsApp Agent Platform | [Build an official WhatsApp agent with nanobot](./guides/whatsapp-agent-platform.md) |+| WhatsApp Agent Platform | [Connect nanobot to WhatsApp Agent Platform](./guides/whatsapp-agent-platform.md) || WeChat | [Build a WeChat AI Agent with nanobot](./guides/wechat-ai-agent.md) || QQ | [Build a QQ AI Agent with nanobot](./guides/qq-ai-agent.md) || Email | [Build an Email AI Agent with nanobot](./guides/email-ai-agent.md) |@@ -481,7 +481,7 @@ Modern WhatsApp can deliver a sender's LID instead of their phone number. nanoboConnects nanobot through the **official** WhatsApp Agent Platform API. The agent appears as its own chat in WhatsApp and can only talk to you, its creator. No QR pairing, no linked device, and no optional Python dependencies.-This is a different channel from `whatsapp`. See the [official WhatsApp agent guide](./guides/whatsapp-agent-platform.md) for the full comparison and walkthrough.+This is a different channel from `whatsapp`. nanobot is an independent third-party project, not a WhatsApp product. See the [WhatsApp Agent Platform guide](./guides/whatsapp-agent-platform.md) for the full comparison and walkthrough.**1. Create the agent in WhatsApp**@@ -511,7 +511,7 @@ nanobot gateway**Notes**- At most one gateway may poll a given agent token. A second one causes `409` and is logged as a duplicate-poller error.-- Agent conversations are not end-to-end encrypted: Meta processes them on the agent's behalf. Your other chats are unaffected.+- Agent conversations are not end-to-end encrypted. nanobot and your configured model provider process these messages; your other WhatsApp chats are unaffected. Review the [third-party agent terms](https://www.whatsapp.com/legal/third-party-agents-terms) before connecting.- Replies are split at 4096 characters. Progress and tool-hint messages are off by default because every send spends the same 12-per-minute budget.- Ambiguous send outcomes (HTTP `500`, read timeouts) are not retried by default, because a duplicate is worse than a miss. Set `retryAmbiguousSends: true` to opt in.diff --git a/docs/guides/README.md b/docs/guides/README.mdindex 290479792..280e5e556 100644--- a/docs/guides/README.md+++ b/docs/guides/README.md@@ -26,7 +26,7 @@ Use **Channels** in the WebUI for guided setup. These guides explain the account| Connect Slack | [Slack AI agent](./slack-ai-agent.md) || Connect Feishu | [Feishu AI agent](./feishu-ai-agent.md) || Connect WhatsApp | [WhatsApp AI agent](./whatsapp-ai-agent.md) |-| Connect an official WhatsApp agent | [Official WhatsApp agent](./whatsapp-agent-platform.md) |+| Connect through WhatsApp Agent Platform | [WhatsApp Agent Platform](./whatsapp-agent-platform.md) || Connect WeChat | [WeChat AI agent](./wechat-ai-agent.md) || Connect QQ | [QQ AI agent](./qq-ai-agent.md) || Connect Email | [Email AI agent](./email-ai-agent.md) |diff --git a/docs/guides/whatsapp-agent-platform.md b/docs/guides/whatsapp-agent-platform.mdindex b4e49bae9..8d104825b 100644--- a/docs/guides/whatsapp-agent-platform.md+++ b/docs/guides/whatsapp-agent-platform.md@@ -1,7 +1,11 @@-# Build an official WhatsApp agent with nanobot+# Connect nanobot to WhatsApp Agent PlatformThis guide connects nanobot to WhatsApp through the `whatsapp_agent` channel, which uses the **official WhatsApp Agent Platform** API. The agent appears as its own chat inside WhatsApp and talks only to you.+nanobot is an independent third-party project, not a WhatsApp product. Using this API does not imply endorsement by WhatsApp.++**Before connecting:** agent chats are not end-to-end encrypted. nanobot and your configured model provider process these messages. Review the [WhatsApp third-party agent terms](https://www.whatsapp.com/legal/third-party-agents-terms) and your provider's data policies before sharing sensitive information.+This is a different product from the [`whatsapp`](./whatsapp-ai-agent.md) channel.## Which WhatsApp channel should I use?@@ -17,7 +21,7 @@ This is a different product from the [`whatsapp`](./whatsapp-ai-agent.md) channe| Availability | Limited countries, per account | Wherever WhatsApp can link a device || Account risk | Officially supported interface | Uses an unofficial linked-device protocol |-Choose `whatsapp_agent` when you want an official, sandboxed personal assistant that WhatsApp itself provides, and you do not need group access. Keep `whatsapp` when you need groups, media breadth, or availability in a country where the Agent Platform has not rolled out.+Choose `whatsapp_agent` when you want to connect your own nanobot through WhatsApp's agent API and do not need group access. This limits which WhatsApp chats the channel can access; it does not sandbox nanobot's tools. Keep `whatsapp` when you need groups, media breadth, or availability in a country where the Agent Platform has not rolled out.Both channels can be enabled at once with different names and different access rules.@@ -152,7 +156,7 @@ At most one poller may run per agent token. If you start a second gateway agains- **Durable cursor.** nanobot records message ids before handling them and saves the server cursor after each batch. A restart deduplicates recorded ids. A crash between recording and dispatch can lose that message; this is not exactly-once delivery. If state cannot be saved, the channel stops instead of acknowledging more traffic.- **Retention.** WhatsApp keeps updates for 30 days. On first run, nanobot saves the current time and reads from `offset=0`, discarding messages older than that time or without a timestamp. This avoids gaps after empty polls. Keep the gateway clock synchronized. Timestamps have one-second precision, so messages from the startup second are included. Reading a large backlog can delay the first reply. Restarts retain the original boundary and cursor; changing the token starts a new boundary.- **Invalid token.** If WhatsApp rejects the token, the channel stops and logs an actionable message instead of retrying forever.-- **Privacy.** Agent conversations are not end-to-end encrypted: Meta processes them on the agent's behalf. Your other WhatsApp chats are unaffected. Do not use this channel for data that requires end-to-end encryption.+- **Privacy.** Agent conversations are not end-to-end encrypted. nanobot processes these messages and sends them to your configured model provider. Downloaded attachments and session history may remain on the nanobot host. Your other WhatsApp chats are unaffected. Do not use this channel for data that requires end-to-end encryption.## Troubleshootingdiff --git a/docs/guides/whatsapp-ai-agent.md b/docs/guides/whatsapp-ai-agent.mdindex 6fcba3cbc..20f04d7eb 100644--- a/docs/guides/whatsapp-ai-agent.md+++ b/docs/guides/whatsapp-ai-agent.md@@ -3,7 +3,7 @@This guide connects nanobot to WhatsApp through the `whatsapp` channel. The channel links as a WhatsApp device and uses the same nanobot agent runtime, tools, memory, and workspace as the CLI and WebUI.> [!NOTE]-> WhatsApp also offers an official Agent Platform where the agent appears as its own chat and talks only to you. That is a separate channel with different tradeoffs — no group support, no end-to-end encryption, and limited country availability, but an officially supported interface that does not rely on a linked device. See [Build an official WhatsApp agent with nanobot](./whatsapp-agent-platform.md) to compare them.+> WhatsApp also offers an official Agent Platform where the agent appears as its own chat and talks only to you. That is a separate channel with different tradeoffs — no group support, no end-to-end encryption, and limited country availability, but an officially supported interface that does not rely on a linked device. See [Connect nanobot to WhatsApp Agent Platform](./whatsapp-agent-platform.md) to compare them.## What this guide buildsdiff --git a/nanobot/channels/whatsapp_agent/runtime.py b/nanobot/channels/whatsapp_agent/runtime.pyindex 818ad5da5..f13f8a2f4 100644--- a/nanobot/channels/whatsapp_agent/runtime.py+++ b/nanobot/channels/whatsapp_agent/runtime.py@@ -61,7 +61,7 @@ from nanobot.channels.whatsapp_agent.state import (default_state_dir,token_fingerprint,)-from nanobot.config.schema import Base+from nanobot.config_base import Basefrom nanobot.events import ContextCompactionEventfrom nanobot.utils.helpers import safe_filename, split_messagediff --git a/nanobot/channels/whatsapp_agent/webui/index.ts b/nanobot/channels/whatsapp_agent/webui/index.tsindex 59bb3f978..4b9bcd9eb 100644--- a/nanobot/channels/whatsapp_agent/webui/index.ts+++ b/nanobot/channels/whatsapp_agent/webui/index.ts@@ -1,7 +1,7 @@import { Bot } from "lucide-react";import type { ChannelUiContribution } from "@/channel-plugins/types";-import { chatAppGuideUrl } from "@/components/settings/channels/catalog";+import { chatAppGuideUrl } from "@/channel-plugins/catalog";export default {presentation: {diff --git a/nanobot/channels/whatsapp_agent/webui/locales/en.json b/nanobot/channels/whatsapp_agent/webui/locales/en.jsonindex 27a7617d5..8d724ec75 100644--- a/nanobot/channels/whatsapp_agent/webui/locales/en.json+++ b/nanobot/channels/whatsapp_agent/webui/locales/en.json@@ -2,7 +2,8 @@"setup": {"docsLabel": "Open agent setup guide","officialLabel": "Open WhatsApp agent help",- "summary": "Connect nanobot as an official third-party agent in your own WhatsApp account. Only you can chat with it, and it cannot access your other chats.",+ "summary": "Connect nanobot through WhatsApp's Agent Platform API. Only you can chat with it, and it cannot access your other WhatsApp chats.",+ "privacyNotice": "Agent chats are not end-to-end encrypted. Messages are processed by nanobot and your configured model provider.","fields": {"token": {"label": "API token",diff --git a/nanobot/channels/whatsapp_agent/webui/locales/es.json b/nanobot/channels/whatsapp_agent/webui/locales/es.jsonindex 3310fe176..0ea0feecb 100644--- a/nanobot/channels/whatsapp_agent/webui/locales/es.json+++ b/nanobot/channels/whatsapp_agent/webui/locales/es.json@@ -2,7 +2,8 @@"setup": {"docsLabel": "Abrir la guía de configuración del agente","officialLabel": "Abrir la ayuda de agentes de WhatsApp",- "summary": "Conecta nanobot como agente oficial de terceros en tu propia cuenta de WhatsApp. Solo tú puedes chatear con él y no accede a tus otros chats.",+ "summary": "Conecta nanobot mediante la API de WhatsApp Agent Platform. Solo tú puedes chatear con él y no puede acceder a tus otros chats de WhatsApp.",+ "privacyNotice": "Los chats con el agente no están cifrados de extremo a extremo. nanobot y el proveedor de modelos que hayas configurado procesan los mensajes.","fields": {"token": {"label": "Token de API",diff --git a/nanobot/channels/whatsapp_agent/webui/locales/fr.json b/nanobot/channels/whatsapp_agent/webui/locales/fr.jsonindex 2933a3d51..57e4ddd36 100644--- a/nanobot/channels/whatsapp_agent/webui/locales/fr.json+++ b/nanobot/channels/whatsapp_agent/webui/locales/fr.json@@ -2,7 +2,8 @@"setup": {"docsLabel": "Ouvrir le guide de configuration de l'agent","officialLabel": "Ouvrir l'aide des agents WhatsApp",- "summary": "Connectez nanobot comme agent tiers officiel dans votre propre compte WhatsApp. Vous seul pouvez lui écrire, et il n'accède pas à vos autres conversations.",+ "summary": "Connectez nanobot via l'API WhatsApp Agent Platform. Vous seul pouvez lui écrire, et il ne peut pas accéder à vos autres conversations WhatsApp.",+ "privacyNotice": "Les conversations avec l'agent ne sont pas chiffrées de bout en bout. Les messages sont traités par nanobot et le fournisseur de modèles que vous avez configuré.","fields": {"token": {"label": "Jeton d'API",diff --git a/nanobot/channels/whatsapp_agent/webui/locales/id.json b/nanobot/channels/whatsapp_agent/webui/locales/id.jsonindex 89596b16d..e1f7a9673 100644--- a/nanobot/channels/whatsapp_agent/webui/locales/id.json+++ b/nanobot/channels/whatsapp_agent/webui/locales/id.json@@ -2,7 +2,8 @@"setup": {"docsLabel": "Buka panduan penyiapan agen","officialLabel": "Buka bantuan agen WhatsApp",- "summary": "Hubungkan nanobot sebagai agen pihak ketiga resmi di akun WhatsApp Anda sendiri. Hanya Anda yang dapat mengobrol dengannya, dan ia tidak mengakses obrolan lain Anda.",+ "summary": "Hubungkan nanobot melalui API WhatsApp Agent Platform. Hanya Anda yang dapat mengobrol dengannya, dan agen tidak dapat mengakses obrolan WhatsApp Anda yang lain.",+ "privacyNotice": "Obrolan dengan agen tidak dienkripsi secara menyeluruh. Pesan diproses oleh nanobot dan penyedia model yang Anda konfigurasikan.","fields": {"token": {"label": "Token API",diff --git a/nanobot/channels/whatsapp_agent/webui/locales/ja.json b/nanobot/channels/whatsapp_agent/webui/locales/ja.jsonindex 53dbcc303..c8bfce81f 100644--- a/nanobot/channels/whatsapp_agent/webui/locales/ja.json+++ b/nanobot/channels/whatsapp_agent/webui/locales/ja.json@@ -2,7 +2,8 @@"setup": {"docsLabel": "エージェント設定ガイドを開く","officialLabel": "WhatsApp エージェントのヘルプを開く",- "summary": "nanobot を公式のサードパーティエージェントとして自分の WhatsApp アカウントに接続します。会話できるのは本人だけで、他のチャットにはアクセスできません。",+ "summary": "WhatsApp Agent Platform API を通じて nanobot を接続します。会話できるのは本人だけで、他の WhatsApp チャットにはアクセスできません。",+ "privacyNotice": "エージェントとのチャットはエンドツーエンド暗号化されません。メッセージは nanobot と設定したモデルプロバイダーによって処理されます。","fields": {"token": {"label": "API トークン",diff --git a/nanobot/channels/whatsapp_agent/webui/locales/ko.json b/nanobot/channels/whatsapp_agent/webui/locales/ko.jsonindex 29e53046d..08a072ce2 100644--- a/nanobot/channels/whatsapp_agent/webui/locales/ko.json+++ b/nanobot/channels/whatsapp_agent/webui/locales/ko.json@@ -2,7 +2,8 @@"setup": {"docsLabel": "에이전트 설정 가이드 열기","officialLabel": "WhatsApp 에이전트 도움말 열기",- "summary": "nanobot을 공식 서드파티 에이전트로 내 WhatsApp 계정에 연결합니다. 나만 대화할 수 있으며 다른 채팅에는 접근할 수 없습니다.",+ "summary": "WhatsApp Agent Platform API를 통해 nanobot을 연결합니다. 나만 대화할 수 있으며 다른 WhatsApp 채팅에는 접근할 수 없습니다.",+ "privacyNotice": "에이전트와의 채팅에는 종단간 암호화가 적용되지 않습니다. 메시지는 nanobot과 설정한 모델 제공업체가 처리합니다.","fields": {"token": {"label": "API 토큰",diff --git a/nanobot/channels/whatsapp_agent/webui/locales/pt-BR.json b/nanobot/channels/whatsapp_agent/webui/locales/pt-BR.jsonindex dedc6ce0d..5c12d353a 100644--- a/nanobot/channels/whatsapp_agent/webui/locales/pt-BR.json+++ b/nanobot/channels/whatsapp_agent/webui/locales/pt-BR.json@@ -2,7 +2,8 @@"setup": {"docsLabel": "Abrir o guia de configuração do agente","officialLabel": "Abrir a ajuda de agentes do WhatsApp",- "summary": "Conecte o nanobot como agente oficial de terceiros na sua própria conta do WhatsApp. Só você pode conversar com ele, e ele não acessa suas outras conversas.",+ "summary": "Conecte o nanobot pela API do WhatsApp Agent Platform. Só você pode conversar com ele, e ele não pode acessar suas outras conversas do WhatsApp.",+ "privacyNotice": "As conversas com o agente não têm criptografia de ponta a ponta. As mensagens são processadas pelo nanobot e pelo provedor de modelos que você configurou.","fields": {"token": {"label": "Token de API",diff --git a/nanobot/channels/whatsapp_agent/webui/locales/vi.json b/nanobot/channels/whatsapp_agent/webui/locales/vi.jsonindex c39fd3c7c..9820860d6 100644--- a/nanobot/channels/whatsapp_agent/webui/locales/vi.json+++ b/nanobot/channels/whatsapp_agent/webui/locales/vi.json@@ -2,7 +2,8 @@"setup": {"docsLabel": "Mở hướng dẫn thiết lập tác nhân","officialLabel": "Mở trợ giúp tác nhân WhatsApp",- "summary": "Kết nối nanobot như một tác nhân bên thứ ba chính thức trong tài khoản WhatsApp của bạn. Chỉ bạn có thể trò chuyện với nó và nó không truy cập các cuộc trò chuyện khác.",+ "summary": "Kết nối nanobot qua API WhatsApp Agent Platform. Chỉ bạn có thể trò chuyện với tác nhân và tác nhân không thể truy cập các cuộc trò chuyện WhatsApp khác của bạn.",+ "privacyNotice": "Cuộc trò chuyện với tác nhân không được mã hóa đầu cuối. Tin nhắn được xử lý bởi nanobot và nhà cung cấp mô hình bạn đã cấu hình.","fields": {"token": {"label": "Mã thông báo API",diff --git a/nanobot/channels/whatsapp_agent/webui/locales/zh-CN.json b/nanobot/channels/whatsapp_agent/webui/locales/zh-CN.jsonindex 3f888f898..05f0340e0 100644--- a/nanobot/channels/whatsapp_agent/webui/locales/zh-CN.json+++ b/nanobot/channels/whatsapp_agent/webui/locales/zh-CN.json@@ -2,7 +2,8 @@"setup": {"docsLabel": "打开智能体设置指南","officialLabel": "打开 WhatsApp 智能体帮助",- "summary": "将 nanobot 作为官方第三方智能体接入你自己的 WhatsApp 账号。只有你可以与它对话,它无法访问你的其他聊天。",+ "summary": "通过 WhatsApp Agent Platform API 接入 nanobot。只有你可以与它对话,它无法访问你的其他 WhatsApp 聊天。",+ "privacyNotice": "智能体对话不采用端到端加密。消息由 nanobot 和你配置的模型服务商处理。","fields": {"token": {"label": "API 令牌",diff --git a/nanobot/channels/whatsapp_agent/webui/locales/zh-TW.json b/nanobot/channels/whatsapp_agent/webui/locales/zh-TW.jsonindex 13b7aab6b..7ce24cd7f 100644--- a/nanobot/channels/whatsapp_agent/webui/locales/zh-TW.json+++ b/nanobot/channels/whatsapp_agent/webui/locales/zh-TW.json@@ -2,7 +2,8 @@"setup": {"docsLabel": "開啟代理設定指南","officialLabel": "開啟 WhatsApp 代理說明",- "summary": "將 nanobot 作為官方第三方代理連結到你的 WhatsApp 帳號。只有你可以與它對話,它無法存取你的其他聊天。",+ "summary": "透過 WhatsApp Agent Platform API 連接 nanobot。只有你可以與它對話,它無法存取你的其他 WhatsApp 聊天。",+ "privacyNotice": "代理對話不採用端對端加密。訊息由 nanobot 和你設定的模型服務供應商處理。","fields": {"token": {"label": "API 權杖",diff --git a/webui/src/channel-plugins/catalog.ts b/webui/src/channel-plugins/catalog.tsindex 5cda41bb9..4b44e7e39 100644--- a/webui/src/channel-plugins/catalog.ts+++ b/webui/src/channel-plugins/catalog.ts@@ -15,6 +15,7 @@ export type ChannelPresentation = {export type ChannelSetupPresentation = {mode?: "webui" | "credentials" | "connect";+ privacyNotice?: string;primaryActionLabel?: string;command?: string;docsUrl?: string;diff --git a/webui/src/channel-plugins/i18n.ts b/webui/src/channel-plugins/i18n.tsindex e686eb490..c72e4b7cc 100644--- a/webui/src/channel-plugins/i18n.ts+++ b/webui/src/channel-plugins/i18n.ts@@ -9,6 +9,7 @@ type ChannelFieldMessages = {export type ChannelMessages = {displayName?: string;setup: {+ privacyNotice?: string;primaryAction?: string;docsLabel?: string;officialLabel?: string;diff --git a/webui/src/components/settings/channels/ChannelIdentity.tsx b/webui/src/components/settings/channels/ChannelIdentity.tsxindex 71686412e..f085e1442 100644--- a/webui/src/components/settings/channels/ChannelIdentity.tsx+++ b/webui/src/components/settings/channels/ChannelIdentity.tsx@@ -50,6 +50,7 @@ export function channelSetup(});const presentation: ChannelSetupPresentation = {...definition,+ privacyNotice: setupMessages?.privacyNotice,primaryActionLabel: setupMessages?.primaryAction,docsLabel: setupMessages?.docsLabel,officialLabel: setupMessages?.officialLabel,diff --git a/webui/src/components/settings/channels/ChannelSetupSurfaceView.tsx b/webui/src/components/settings/channels/ChannelSetupSurfaceView.tsxindex 4e46e2c4f..51f55a4f1 100644--- a/webui/src/components/settings/channels/ChannelSetupSurfaceView.tsx+++ b/webui/src/components/settings/channels/ChannelSetupSurfaceView.tsx@@ -136,6 +136,11 @@ export function ChannelSetupSurfaceView({</div></div><ChannelRuntimeError message={feature.runtime_error} />+ {setup.privacyNotice ? (+ <p className="text-pretty text-sm leading-relaxed text-muted-foreground">+ {setup.privacyNotice}+ </p>+ ) : null}<div className="flex flex-wrap items-center gap-4"><section className={cn("min-w-0", inlineActions ? "flex-[1_1_20rem]" : "w-full")}><div className="flex flex-wrap items-center justify-between gap-2">diff --git a/webui/src/dev/gallery/channel-fixtures.ts b/webui/src/dev/gallery/channel-fixtures.tsindex 75085c9d7..a73d48613 100644--- a/webui/src/dev/gallery/channel-fixtures.ts+++ b/webui/src/dev/gallery/channel-fixtures.ts@@ -20,4 +20,5 @@ export const channelFeatures: Record<string, NanobotFeatureInfo> = {"wecom": {"name": "wecom","display_name": "WeCom","webui": "webui/index.ts","type": "channel","enabled": false,"installed": true,"configured": false,"ready": false,"status": "not_enabled","install_supported": true,"requires_restart": false,"runtime_status": "stopped","config_values": {},"configured_fields": [],"setup": {"fields": [{"key": "channels.wecom.botId","field": "botId","kind": "string","choices": [],"required": true},{"key": "channels.wecom.secret","field": "secret","kind": "secret","choices": [],"required": true},{"key": "channels.wecom.allowFrom","field": "allowFrom","kind": "list","choices": [],"required": false},{"key": "channels.wecom.welcomeMessage","field": "welcomeMessage","kind": "string","choices": [],"required": false}],"requirements": [{"alternatives": [["channels.wecom.botId"]]},{"alternatives": [["channels.wecom.secret"]]}],"official_url": "https://developer.work.weixin.qq.com/"}},"weixin": {"name": "weixin","display_name": "WeChat","webui": "webui/index.tsx","type": "channel","enabled": false,"installed": true,"configured": false,"ready": false,"status": "not_enabled","install_supported": true,"requires_restart": false,"runtime_status": "stopped","config_values": {},"configured_fields": [],"setup": {"fields": [{"key": "channels.weixin.allowFrom","field": "allowFrom","kind": "list","choices": [],"required": false},{"key": "channels.weixin.baseUrl","field": "baseUrl","kind": "string","choices": [],"required": false,"default_value": "https://ilinkai.weixin.qq.com"},{"key": "channels.weixin.cdnBaseUrl","field": "cdnBaseUrl","kind": "string","choices": [],"required": false,"default_value": "https://novac2c.cdn.weixin.qq.com/c2c"},{"key": "channels.weixin.routeTag","field": "routeTag","kind": "string","choices": [],"required": false},{"key": "channels.weixin.stateDir","field": "stateDir","kind": "string","choices": [],"required": false},{"key": "channels.weixin.pollTimeout","field": "pollTimeout","kind": "int","choices": [],"required": false,"default_value": "35"},{"key": "channels.weixin.sendProgress","field": "sendProgress","kind": "bool","choices": [],"required": false,"default_value": "false"},{"key": "channels.weixin.sendToolHints","field": "sendToolHints","kind": "bool","choices": [],"required": false,"default_value": "false"},{"key": "channels.weixin.replyProgressMessages","field": "replyProgressMessages","kind": "bool","choices": [],"required": false,"default_value": "false"},{"key": "channels.weixin.replyProgressMaxMessages","field": "replyProgressMaxMessages","kind": "int","choices": [],"required": false,"default_value": "2"},{"key": "channels.weixin.contextMessageBudget","field": "contextMessageBudget","kind": "int","choices": [],"required": false,"default_value": "8"},{"key": "channels.weixin.streaming","field": "streaming","kind": "bool","choices": [],"required": false,"default_value": "true"},{"key": "channels.weixin.blockStreaming","field": "blockStreaming","kind": "bool","choices": [],"required": false,"default_value": "false"},{"key": "channels.weixin.blockStreamingMinChars","field": "blockStreamingMinChars","kind": "int","choices": [],"required": false,"default_value": "1200"},{"key": "channels.weixin.blockStreamingMaxMessages","field": "blockStreamingMaxMessages","kind": "int","choices": [],"required": false,"default_value": "3"}],"requirements": [{"alternatives": [["channels.weixin.token"]]}],"official_url": "https://weixin.qq.com/"}},"whatsapp": {"name": "whatsapp","display_name": "WhatsApp","webui": "webui/index.tsx","type": "channel","enabled": false,"installed": true,"configured": false,"ready": false,"status": "not_enabled","install_supported": true,"requires_restart": false,"runtime_status": "stopped","config_values": {},"configured_fields": [],"setup": {"fields": [{"key": "channels.whatsapp.proxy","field": "proxy","kind": "string","choices": [],"required": false},{"key": "channels.whatsapp.allowFrom","field": "allowFrom","kind": "list","choices": [],"required": false},{"key": "channels.whatsapp.groupPolicy","field": "groupPolicy","kind": "enum","choices": ["mention","open"],"required": false,"default_value": "open"}],"requirements": [],"official_url": "https://faq.whatsapp.com/"}},+ "whatsapp_agent": {"name": "whatsapp_agent","display_name": "WhatsApp Agent Platform","webui": "webui/index.ts","type": "channel","enabled": false,"installed": true,"configured": false,"ready": false,"status": "not_enabled","install_supported": true,"requires_restart": false,"runtime_status": "stopped","config_values": {},"configured_fields": [],"setup": {"fields": [{"key": "channels.whatsapp_agent.token","field": "token","kind": "secret","choices": [],"required": true},{"key": "channels.whatsapp_agent.allowFrom","field": "allowFrom","kind": "list","choices": [],"required": false},{"key": "channels.whatsapp_agent.stateDir","field": "stateDir","kind": "string","choices": [],"required": false},{"key": "channels.whatsapp_agent.pollTimeout","field": "pollTimeout","kind": "int","choices": [],"required": false,"default_value": "25"},{"key": "channels.whatsapp_agent.markRead","field": "markRead","kind": "bool","choices": [],"required": false,"default_value": "true"},{"key": "channels.whatsapp_agent.typingIndicator","field": "typingIndicator","kind": "bool","choices": [],"required": false,"default_value": "true"},{"key": "channels.whatsapp_agent.downloadMedia","field": "downloadMedia","kind": "bool","choices": [],"required": false,"default_value": "true"},{"key": "channels.whatsapp_agent.deleteMediaAfterDownload","field": "deleteMediaAfterDownload","kind": "bool","choices": [],"required": false,"default_value": "false"},{"key": "channels.whatsapp_agent.maxMediaMb","field": "maxMediaMb","kind": "int","choices": [],"required": false,"default_value": "16"},{"key": "channels.whatsapp_agent.retryAmbiguousSends","field": "retryAmbiguousSends","kind": "bool","choices": [],"required": false,"default_value": "false"},{"key": "channels.whatsapp_agent.sendProgress","field": "sendProgress","kind": "bool","choices": [],"required": false,"default_value": "false"},{"key": "channels.whatsapp_agent.sendToolHints","field": "sendToolHints","kind": "bool","choices": [],"required": false,"default_value": "false"}],"requirements": [{"alternatives": [["channels.whatsapp_agent.token"]]}],"official_url": "https://faq.whatsapp.com/1050934623978152","verifies_connection": true}},};diff --git a/webui/src/tests/settings-channels.test.tsx b/webui/src/tests/settings-channels.test.tsxindex ccce2f7b1..5da01e698 100644--- a/webui/src/tests/settings-channels.test.tsx+++ b/webui/src/tests/settings-channels.test.tsx@@ -214,6 +214,39 @@ function catalogFeature(describe("Settings channels", () => {installSettingsViewTestHooks();+ it("shows agent chat privacy before entering credentials or enabling the channel", async () => {+ vi.stubGlobal("fetch", vi.fn(async (input: RequestInfo | URL) => {+ const url = String(input);+ if (url === "/api/settings") return jsonResponse(settingsPayload());+ if (url === "/api/settings/nanobot-features") return jsonResponse({+ features: [{+ ...catalogFeature("whatsapp_agent", false),+ display_name: "WhatsApp Agent Platform",+ webui: "webui/index.ts",+ setup: {+ verifies_connection: true,+ fields: [channelSetupField("whatsapp_agent", "token", "secret", { required: true })],+ requirements: [{ alternatives: [["channels.whatsapp_agent.token"]] }],+ },+ }],+ enabled_count: 0,+ });+ return jsonResponse({});+ }));++ renderSettingsView({ initialSection: "channels" });+ fireEvent.click(await screen.findByRole("button", { name: "View WhatsApp Agent Platform settings" }));++ const privacy = screen.getByText(/Agent chats are not end-to-end encrypted/);+ expect(privacy).toBeVisible();+ expect(privacy).toHaveTextContent("nanobot and your configured model provider");+ const token = screen.getByLabelText("API token");+ expect(token).toHaveValue("");+ expect(privacy.compareDocumentPosition(token) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();+ expect(screen.getByRole("switch", { name: "Enable channel" })).not.toBeChecked();+ expect(requestMutationMock).not.toHaveBeenCalled();+ });+it.each([{name: "telegram",