feat(webui): improve setup flows across chat channels (NAN-112) (#5356)

* feat(webui): improve channel setup flows

* fix(webui): refine channel setup interactions (NAN-112)

* fix(webui): keep email setup sections channel-owned

* fix(webui): remove concrete channel details from shared components

* refactor(webui): remove unused channel setup resources

* fix(webui): finish channel-owned setup boundaries

* fix(webui): update channel switches optimistically

* test(channels): remove obsolete absence assertions

* fix(webui): flatten channel instance settings disclosure

* fix(webui): complete channel setup and connection flows

* fix(whatsapp): wait for session database release

* fix(webui): preserve scrolling channel controls

* fix(webui): stage channel connection checks

* fix(channels): align verification actions

* fix(email): expose connection checks

* fix(webui): align channel field actions

* fix(email): verify account credentials

* fix(wecom): bypass system proxy for websocket

* fix(channels): stabilize async connection cleanup

* fix(webui): autosave channel credentials

* fix(email): make provider presets non-destructive

* test(weixin): isolate persisted QR credentials
This commit is contained in:
chengyongru authored and GitHub committed 2026-09-11 15:22:14 +08:00
1 parent 3cc3012b3a
commit e8a29a0087
291 files changed
+12194 -3979

No files matched your search

+16 -1
View File
@@ -2,6 +2,7 @@
from __future__ import annotations
import json
from collections.abc import Iterable
from copy import deepcopy
from dataclasses import dataclass
@@ -11,7 +12,7 @@ from typing import TYPE_CHECKING, Any, Callable, Literal, TypeGuard, cast
if TYPE_CHECKING:
from nanobot.channels.plugin import ChannelPlugin
FieldKind = Literal["string", "secret", "list", "bool", "int", "enum"]
FieldKind = Literal["string", "secret", "list", "bool", "int", "float", "json", "enum"]
RouteFieldType = str | tuple[str, set[str]]
@@ -162,6 +163,7 @@ class ChannelSetupSpec:
required: tuple[SetupRequirement, ...] = ()
official_url: str | None = None
validator: SetupValidator | None = None
verifies_connection: bool = False
@property
def secrets(self) -> frozenset[str]:
@@ -211,9 +213,20 @@ class ChannelSetupSpec:
fields.append(public_field)
payload: dict[str, Any] = {
"fields": fields,
"requirements": [
{
"alternatives": [
[f"channels.{channel_name}.{name}" for name in alternative]
for alternative in requirement.alternatives
]
}
for requirement in self.required
],
}
if self.official_url:
payload["official_url"] = self.official_url
if self.verifies_connection:
payload["verifies_connection"] = True
return payload
@@ -572,6 +585,8 @@ def stringify_channel_value(value: Any) -> str:
return "true" if value else "false"
if isinstance(value, list):
return ", ".join(str(item) for item in cast(list[Any], value))
if isinstance(value, dict):
return json.dumps(value, ensure_ascii=False, indent=2)
return str(value)
+4
View File
@@ -9,6 +9,10 @@ SETUP_SPEC = ChannelSetupSpec(
"clientId": field(),
"clientSecret": field("secret"),
"allowFrom": field("list"),
"allowRemoteMediaRedirects": field("bool", default=False),
"remoteMediaRedirectAllowedHosts": field("list"),
"groupUserIsolation": field("bool", default=False),
"disablePrivateChat": field("bool", default=False),
},
required=required_fields("clientId", "clientSecret"),
official_url="https://open.dingtalk.com/",
+4 -5
View File
@@ -3,18 +3,17 @@ import { chatAppGuideUrl } from "@/components/settings/channels/catalog";
export default {
presentation: {
logoUrl: "https://img.alicdn.com/imgextra/i3/O1CN01WMvMRG1ks3Ixc9x1v_!!6000000004738-55-tps-32-32.svg",
displayName: "DingTalk",
initials: "DT",
color: "#1677FF",
logoUrl:
"https://img.alicdn.com/imgextra/i3/O1CN01WMvMRG1ks3Ixc9x1v_!!6000000004738-55-tps-32-32.svg",
setup: {
mode: "credentials",
docsUrl: chatAppGuideUrl("dingtalk"),
fields: [
{ key: "channels.dingtalk.clientId" },
{ key: "channels.dingtalk.clientSecret" },
{ key: "channels.dingtalk.allowFrom" },
{ key: "channels.dingtalk.clientId", section: "credentials" },
{ key: "channels.dingtalk.clientSecret", section: "credentials" },
{ key: "channels.dingtalk.allowFrom", section: "access" },
],
},
},
+26 -13
View File
@@ -1,30 +1,43 @@
{
"description": "Use nanobot from DingTalk groups.",
"requirements": "DingTalk app credentials and gateway",
"setup": {
"docsLabel": "Open DingTalk setup",
"officialLabel": "Open DingTalk console",
"tryIt": "Send a test message from the DingTalk group where the app is installed.",
"summary": "DingTalk needs app credentials from Stream mode.",
"steps": [
"Create or choose a DingTalk app with Stream mode enabled.",
"Add Client ID and Client Secret.",
"Save and enable DingTalk, then send a test message."
],
"fields": {
"clientId": {
"label": "Client ID",
"placeholder": "DingTalk client ID",
"help": "Copy it from DingTalk app credentials."
"placeholder": "DingTalk client ID"
},
"clientSecret": {
"label": "Client Secret",
"placeholder": "••••••",
"help": "Copy it from the same DingTalk app credentials page."
"placeholder": "••••••"
},
"allowFrom": {
"label": "Allowed users",
"placeholder": "User IDs, comma separated"
},
"allowRemoteMediaRedirects": {
"label": "Allow media redirects",
"choices": {
"true": "On",
"false": "Off"
}
},
"remoteMediaRedirectAllowedHosts": {
"label": "Media redirect hosts"
},
"groupUserIsolation": {
"label": "Separate group sessions",
"choices": {
"true": "On",
"false": "Off"
}
},
"disablePrivateChat": {
"label": "Disable direct messages",
"choices": {
"true": "On",
"false": "Off"
}
}
}
}
+26 -13
View File
@@ -1,30 +1,43 @@
{
"description": "Usa nanobot desde grupos de DingTalk.",
"requirements": "Credenciales de la app de DingTalk y pasarela",
"setup": {
"docsLabel": "Abrir guía de DingTalk",
"officialLabel": "Abrir consola de DingTalk",
"tryIt": "Envía un mensaje de prueba desde el grupo de DingTalk donde está instalada la app.",
"summary": "DingTalk necesita credenciales de una app en modo Stream.",
"steps": [
"Crea o elige una app de DingTalk con el modo Stream activado.",
"Añade el Client ID y el Client Secret.",
"Guarda y activa DingTalk; después envía un mensaje de prueba."
],
"fields": {
"clientId": {
"label": "Client ID",
"placeholder": "Client ID de DingTalk",
"help": "Cópialo de las credenciales de la app de DingTalk."
"placeholder": "Client ID de DingTalk"
},
"clientSecret": {
"label": "Client Secret",
"placeholder": "••••••",
"help": "Cópialo de la misma página de credenciales."
"placeholder": "••••••"
},
"allowFrom": {
"label": "Usuarios permitidos",
"placeholder": "ID de usuario separados por comas"
},
"allowRemoteMediaRedirects": {
"label": "Permitir redirecciones de medios",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"remoteMediaRedirectAllowedHosts": {
"label": "Hosts de redireccionamiento de medios"
},
"groupUserIsolation": {
"label": "Sesiones grupales separadas",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"disablePrivateChat": {
"label": "Desactivar mensajes directos",
"choices": {
"true": "encendido",
"false": "Apagado"
}
}
}
}
+26 -13
View File
@@ -1,30 +1,43 @@
{
"description": "Utilisez nanobot depuis les groupes DingTalk.",
"requirements": "Identifiants d’application DingTalk et passerelle",
"setup": {
"docsLabel": "Ouvrir le guide DingTalk",
"officialLabel": "Ouvrir la console DingTalk",
"tryIt": "Envoyez un message test dans le groupe DingTalk où l’application est installée.",
"summary": "DingTalk nécessite les identifiants d’une application en mode Stream.",
"steps": [
"Créez ou choisissez une application DingTalk avec le mode Stream activé.",
"Ajoutez le Client ID et le Client Secret.",
"Enregistrez et activez DingTalk, puis envoyez un message test."
],
"fields": {
"clientId": {
"label": "Client ID",
"placeholder": "Client ID DingTalk",
"help": "Copiez-le depuis les identifiants de l’application DingTalk."
"placeholder": "Client ID DingTalk"
},
"clientSecret": {
"label": "Client Secret",
"placeholder": "••••••",
"help": "Copiez-le depuis la même page d’identifiants DingTalk."
"placeholder": "••••••"
},
"allowFrom": {
"label": "Utilisateurs autorisés",
"placeholder": "ID utilisateur séparés par des virgules"
},
"allowRemoteMediaRedirects": {
"label": "Autoriser les redirections multimédias",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"remoteMediaRedirectAllowedHosts": {
"label": "Hôtes de redirection multimédia"
},
"groupUserIsolation": {
"label": "Séances de groupe séparées",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"disablePrivateChat": {
"label": "Désactiver les messages directs",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
}
}
}
+26 -13
View File
@@ -1,30 +1,43 @@
{
"description": "Gunakan nanobot dari grup DingTalk.",
"requirements": "Kredensial aplikasi DingTalk dan gateway",
"setup": {
"docsLabel": "Buka panduan DingTalk",
"officialLabel": "Buka konsol DingTalk",
"tryIt": "Kirim pesan uji dari grup DingTalk tempat aplikasi dipasang.",
"summary": "DingTalk memerlukan kredensial aplikasi dari mode Stream.",
"steps": [
"Buat atau pilih aplikasi DingTalk dengan mode Stream aktif.",
"Tambahkan Client ID dan Client Secret.",
"Simpan dan aktifkan DingTalk, lalu kirim pesan uji."
],
"fields": {
"clientId": {
"label": "Client ID",
"placeholder": "Client ID DingTalk",
"help": "Salin dari kredensial aplikasi DingTalk."
"placeholder": "Client ID DingTalk"
},
"clientSecret": {
"label": "Client Secret",
"placeholder": "••••••",
"help": "Salin dari halaman kredensial yang sama."
"placeholder": "••••••"
},
"allowFrom": {
"label": "Pengguna yang diizinkan",
"placeholder": "ID pengguna, dipisahkan koma"
},
"allowRemoteMediaRedirects": {
"label": "Izinkan pengalihan media",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"remoteMediaRedirectAllowedHosts": {
"label": "Host pengalihan media"
},
"groupUserIsolation": {
"label": "Sesi kelompok terpisah",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"disablePrivateChat": {
"label": "Nonaktifkan pesan langsung",
"choices": {
"true": "Aktif",
"false": "Mati"
}
}
}
}
+26 -13
View File
@@ -1,30 +1,43 @@
{
"description": "DingTalk グループから nanobot を利用します。",
"requirements": "DingTalk アプリの認証情報とゲートウェイ",
"setup": {
"docsLabel": "DingTalk 設定ガイドを開く",
"officialLabel": "DingTalk コンソールを開く",
"tryIt": "アプリをインストールした DingTalk グループからテストメッセージを送信します。",
"summary": "DingTalk には Stream モードのアプリ認証情報が必要です。",
"steps": [
"Stream モードを有効にした DingTalk アプリを作成または選択します。",
"Client ID と Client Secret を追加します。",
"保存して DingTalk を有効にし、テストメッセージを送信します。"
],
"fields": {
"clientId": {
"label": "Client ID",
"placeholder": "DingTalk Client ID",
"help": "DingTalk アプリの認証情報からコピーします。"
"placeholder": "DingTalk Client ID"
},
"clientSecret": {
"label": "Client Secret",
"placeholder": "••••••",
"help": "同じ認証情報ページからコピーします。"
"placeholder": "••••••"
},
"allowFrom": {
"label": "許可するユーザー",
"placeholder": "ユーザー ID(カンマ区切り)"
},
"allowRemoteMediaRedirects": {
"label": "メディアのリダイレクトを許可する",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"remoteMediaRedirectAllowedHosts": {
"label": "メディアリダイレクトホスト"
},
"groupUserIsolation": {
"label": "個別のグループセッション",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"disablePrivateChat": {
"label": "ダイレクトメッセージを無効にする",
"choices": {
"true": "オン",
"false": "オフ"
}
}
}
}
+26 -13
View File
@@ -1,30 +1,43 @@
{
"description": "DingTalk 그룹에서 nanobot을 사용합니다.",
"requirements": "DingTalk 앱 인증 정보 및 게이트웨이",
"setup": {
"docsLabel": "DingTalk 설정 가이드 열기",
"officialLabel": "DingTalk 콘솔 열기",
"tryIt": "앱이 설치된 DingTalk 그룹에서 테스트 메시지를 보내세요.",
"summary": "DingTalk에는 Stream 모드 앱 인증 정보이 필요합니다.",
"steps": [
"Stream 모드가 활성화된 DingTalk 앱을 만들거나 선택하세요.",
"Client ID와 Client Secret을 추가하세요.",
"저장하고 DingTalk을 활성화한 다음 테스트 메시지를 보내세요."
],
"fields": {
"clientId": {
"label": "Client ID",
"placeholder": "DingTalk Client ID",
"help": "DingTalk 앱 인증 정보에서 복사하세요."
"placeholder": "DingTalk Client ID"
},
"clientSecret": {
"label": "Client Secret",
"placeholder": "••••••",
"help": "같은 인증 정보 페이지에서 복사하세요."
"placeholder": "••••••"
},
"allowFrom": {
"label": "허용된 사용자",
"placeholder": "사용자 ID, 쉼표로 구분"
},
"allowRemoteMediaRedirects": {
"label": "미디어 리디렉션 허용",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"remoteMediaRedirectAllowedHosts": {
"label": "미디어 리디렉션 호스트"
},
"groupUserIsolation": {
"label": "별도의 그룹 세션",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"disablePrivateChat": {
"label": "다이렉트 메시지 비활성화",
"choices": {
"true": "켜기",
"false": "끄기"
}
}
}
}
@@ -1,30 +1,43 @@
{
"description": "Use o nanobot em grupos do DingTalk.",
"requirements": "Credenciais do app DingTalk e gateway",
"setup": {
"docsLabel": "Abrir guia do DingTalk",
"officialLabel": "Abrir console do DingTalk",
"tryIt": "Envie uma mensagem de teste no grupo do DingTalk onde o app está instalado.",
"summary": "O DingTalk precisa das credenciais de um app no modo Stream.",
"steps": [
"Crie ou escolha um app do DingTalk com o modo Stream ativado.",
"Adicione o Client ID e o Client Secret.",
"Salve e ative o DingTalk; depois, envie uma mensagem de teste."
],
"fields": {
"clientId": {
"label": "Client ID",
"placeholder": "Client ID do DingTalk",
"help": "Copie das credenciais do app DingTalk."
"placeholder": "Client ID do DingTalk"
},
"clientSecret": {
"label": "Client Secret",
"placeholder": "••••••",
"help": "Copie da mesma página de credenciais."
"placeholder": "••••••"
},
"allowFrom": {
"label": "Usuários permitidos",
"placeholder": "IDs de usuário separados por vírgulas"
},
"allowRemoteMediaRedirects": {
"label": "Permitir redirecionamentos de mídia",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"remoteMediaRedirectAllowedHosts": {
"label": "Hosts de redirecionamento de mídia"
},
"groupUserIsolation": {
"label": "Sessões de grupo separadas",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"disablePrivateChat": {
"label": "Desativar mensagens diretas",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
}
}
}
+26 -13
View File
@@ -1,30 +1,43 @@
{
"description": "Sử dụng nanobot trong các nhóm DingTalk.",
"requirements": "Thông tin xác thực ứng dụng DingTalk và gateway",
"setup": {
"docsLabel": "Mở hướng dẫn DingTalk",
"officialLabel": "Mở bảng điều khiển DingTalk",
"tryIt": "Gửi tin nhắn thử từ nhóm DingTalk đã cài ứng dụng.",
"summary": "DingTalk cần thông tin xác thực ứng dụng ở chế độ Stream.",
"steps": [
"Tạo hoặc chọn ứng dụng DingTalk đã bật chế độ Stream.",
"Thêm Client ID và Client Secret.",
"Lưu và bật DingTalk, sau đó gửi tin nhắn thử."
],
"fields": {
"clientId": {
"label": "Client ID",
"placeholder": "Client ID DingTalk",
"help": "Sao chép từ thông tin xác thực ứng dụng DingTalk."
"placeholder": "Client ID DingTalk"
},
"clientSecret": {
"label": "Client Secret",
"placeholder": "••••••",
"help": "Sao chép từ cùng trang thông tin xác thực."
"placeholder": "••••••"
},
"allowFrom": {
"label": "Người dùng được phép",
"placeholder": "ID người dùng, phân tách bằng dấu phẩy"
},
"allowRemoteMediaRedirects": {
"label": "Cho phép chuyển hướng phương tiện",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"remoteMediaRedirectAllowedHosts": {
"label": "Máy chủ chuyển hướng phương tiện"
},
"groupUserIsolation": {
"label": "Các buổi nhóm riêng biệt",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"disablePrivateChat": {
"label": "Tắt tin nhắn trực tiếp",
"choices": {
"true": "Bật",
"false": "Tắt"
}
}
}
}
@@ -1,31 +1,44 @@
{
"displayName": "钉钉",
"description": "在钉钉群中使用 nanobot。",
"requirements": "钉钉应用凭据和网关",
"setup": {
"docsLabel": "打开钉钉配置指南",
"officialLabel": "打开钉钉开发者后台",
"tryIt": "在已安装应用的钉钉群中发送一条测试消息。",
"summary": "钉钉需要 Stream 模式的应用凭据。",
"steps": [
"创建或选择一个已启用 Stream 模式的钉钉应用。",
"填写 Client ID 和 Client Secret。",
"保存并启用钉钉,然后发送一条测试消息。"
],
"fields": {
"clientId": {
"label": "Client ID",
"placeholder": "钉钉 Client ID",
"help": "从钉钉应用凭据页面复制。"
"placeholder": "钉钉 Client ID"
},
"clientSecret": {
"label": "Client Secret",
"placeholder": "••••••",
"help": "从同一个钉钉应用凭据页面复制。"
"placeholder": "••••••"
},
"allowFrom": {
"label": "允许的用户",
"placeholder": "用户 ID,用逗号分隔"
},
"allowRemoteMediaRedirects": {
"label": "允许媒体重定向",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"remoteMediaRedirectAllowedHosts": {
"label": "允许重定向的媒体主机"
},
"groupUserIsolation": {
"label": "按群成员隔离会话",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"disablePrivateChat": {
"label": "禁用私聊",
"choices": {
"true": "开启",
"false": "关闭"
}
}
}
}
@@ -1,31 +1,44 @@
{
"displayName": "釘釘",
"description": "在釘釘群組中使用 nanobot。",
"requirements": "釘釘應用程式憑證和閘道",
"setup": {
"docsLabel": "開啟釘釘設定指南",
"officialLabel": "開啟釘釘開發者後台",
"tryIt": "在已安裝應用程式的釘釘群組中傳送一則測試訊息。",
"summary": "釘釘需要 Stream 模式的應用程式憑證。",
"steps": [
"建立或選擇一個已啟用 Stream 模式的釘釘應用程式。",
"填入 Client ID 和 Client Secret。",
"儲存並啟用釘釘,然後傳送一則測試訊息。"
],
"fields": {
"clientId": {
"label": "Client ID",
"placeholder": "釘釘 Client ID",
"help": "從釘釘應用程式憑證頁面複製。"
"placeholder": "釘釘 Client ID"
},
"clientSecret": {
"label": "Client Secret",
"placeholder": "••••••",
"help": "從同一個釘釘應用程式憑證頁面複製。"
"placeholder": "••••••"
},
"allowFrom": {
"label": "允許的使用者",
"placeholder": "使用者 ID,以逗號分隔"
},
"allowRemoteMediaRedirects": {
"label": "允許媒體重定向",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"remoteMediaRedirectAllowedHosts": {
"label": "允許重定向的媒體主機"
},
"groupUserIsolation": {
"label": "按群組成員隔離會話",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"disablePrivateChat": {
"label": "停用私聊",
"choices": {
"true": "開啟",
"false": "關閉"
}
}
}
}
+9
View File
@@ -8,13 +8,22 @@ from nanobot.channels.plugin import ChannelPlugin
SETUP_SPEC = ChannelSetupSpec(
fields={
"token": field("secret"),
"proxy": field(),
"proxyUsername": field(),
"proxyPassword": field("secret"),
"allowFrom": field("list", snapshot=False),
"allowChannels": field("list"),
"groupPolicy": field("enum", choices=DIRECT_GROUP_POLICIES, default="mention"),
"intents": field("int", default=37377),
"readReceiptEmoji": field(default="👀"),
"workingEmoji": field(default="🔧"),
"workingEmojiDelay": field("float", default=2.0),
"streaming": field("bool", default=True),
},
required=(required("token"),),
official_url="https://discord.com/developers/applications",
validator=validate,
verifies_connection=True,
)
PLUGIN = ChannelPlugin(
+4 -1
View File
@@ -464,10 +464,13 @@ class DiscordChannel(BaseChannel):
"proxy_password must be set; ignoring partial credentials",
)
proxy = self.config.proxy
if proxy and "://" not in proxy:
proxy = f"http://{proxy}"
self._client = DiscordBotClient(
self,
intents=intents,
proxy=self.config.proxy,
proxy=proxy,
proxy_auth=proxy_auth,
)
except Exception:
+2
View File
@@ -18,11 +18,13 @@ from nanobot.channels.validation import (
def validate(values: dict[str, Any], _context: ChannelValidationContext) -> dict[str, Any]:
checks, missing = required_checks("discord", values)
token = string_value(values.get("token"))
proxy = string_value(values.get("proxy"))
if token:
try:
data = http_get(
"https://discord.com/api/v10/users/@me",
headers={"Authorization": f"Bot {token}"},
proxy=proxy or None,
)
bot_id = str(data.get("id") or "")
checks.append(check("bot_token", "Bot token", "pass", "Discord accepted the bot token."))
+8 -4
View File
@@ -3,17 +3,21 @@ import { chatAppGuideUrl } from "@/components/settings/channels/catalog";
export default {
presentation: {
logoUrl: "https://discord.com/favicon.ico",
displayName: "Discord",
initials: "DC",
color: "#5865F2",
logoUrl: "https://discord.com/favicon.ico",
setup: {
mode: "credentials",
docsUrl: chatAppGuideUrl("discord"),
fields: [
{ key: "channels.discord.token" },
{ key: "channels.discord.allowChannels" },
{ key: "channels.discord.groupPolicy" },
{ key: "channels.discord.token", section: "credentials" },
{ key: "channels.discord.proxy", section: "connection" },
{ key: "channels.discord.proxyUsername", section: "connection" },
{ key: "channels.discord.proxyPassword", section: "connection" },
{ key: "channels.discord.allowFrom", section: "access" },
{ key: "channels.discord.allowChannels", section: "access" },
{ key: "channels.discord.groupPolicy", section: "behavior" },
],
},
},
+30 -13
View File
@@ -1,26 +1,15 @@
{
"description": "Use nanobot from Discord servers and DMs.",
"requirements": "Discord bot token, permissions, gateway",
"setup": {
"docsLabel": "Open Discord setup",
"officialLabel": "Open Discord portal",
"tryIt": "Mention the bot in a server or send it a direct message.",
"summary": "Connecting Discord requires a bot token and the appropriate server permissions.",
"steps": [
"Create a bot in Discord Developer Portal and copy its token.",
"Invite the bot to your server with message read/send and slash command permissions.",
"Save and enable Discord, then mention the bot or send a direct message."
],
"fields": {
"token": {
"label": "Bot token",
"placeholder": "Discord bot token",
"help": "Create it from the Bot page in Discord Developer Portal."
"placeholder": "Discord bot token"
},
"allowChannels": {
"label": "Allowed channels",
"placeholder": "Channel IDs, comma separated",
"help": "Leave empty to allow any channel the bot can read."
"placeholder": "Channel IDs, comma separated"
},
"groupPolicy": {
"label": "Group behavior",
@@ -33,6 +22,34 @@
"allowFrom": {
"label": "Allowed users",
"placeholder": "User IDs, comma separated"
},
"proxy": {
"label": "Network proxy"
},
"proxyUsername": {
"label": "Proxy username"
},
"proxyPassword": {
"label": "Proxy password"
},
"intents": {
"label": "Gateway intents"
},
"readReceiptEmoji": {
"label": "Read emoji"
},
"workingEmoji": {
"label": "Working emoji"
},
"workingEmojiDelay": {
"label": "Working emoji delay"
},
"streaming": {
"label": "Streaming",
"choices": {
"true": "On",
"false": "Off"
}
}
}
}
+30 -13
View File
@@ -1,26 +1,15 @@
{
"description": "Usa nanobot en servidores y mensajes directos de Discord.",
"requirements": "Token del bot de Discord, permisos y pasarela",
"setup": {
"docsLabel": "Abrir guía de Discord",
"officialLabel": "Abrir portal de Discord",
"tryIt": "Menciona al bot en un servidor o envíale un mensaje directo.",
"summary": "Para conectar Discord necesitas un token de bot y los permisos adecuados en el servidor.",
"steps": [
"Crea un bot en Discord Developer Portal y copia su token.",
"Invítalo al servidor con permisos para leer/enviar mensajes y usar comandos slash.",
"Guarda y activa Discord; después menciona al bot o envíale un mensaje directo."
],
"fields": {
"token": {
"label": "Token del bot",
"placeholder": "Token del bot de Discord",
"help": "Créalo desde la página Bot de Discord Developer Portal."
"placeholder": "Token del bot de Discord"
},
"allowChannels": {
"label": "Canales permitidos",
"placeholder": "ID de canal separados por comas",
"help": "Déjalo vacío para permitir cualquier canal que el bot pueda leer."
"placeholder": "ID de canal separados por comas"
},
"groupPolicy": {
"label": "Comportamiento en grupos",
@@ -33,6 +22,34 @@
"allowFrom": {
"label": "Usuarios permitidos",
"placeholder": "ID de usuario separados por comas"
},
"proxy": {
"label": "proxy de red"
},
"proxyUsername": {
"label": "Nombre de usuario proxy"
},
"proxyPassword": {
"label": "Contraseña de proxy"
},
"intents": {
"label": "Intentos de puerta de enlace"
},
"readReceiptEmoji": {
"label": "Leer emojis"
},
"workingEmoji": {
"label": "Emoji de trabajo"
},
"workingEmojiDelay": {
"label": "Retraso de emoji de trabajo"
},
"streaming": {
"label": "Transmisión",
"choices": {
"true": "encendido",
"false": "Apagado"
}
}
}
}
+30 -13
View File
@@ -1,26 +1,15 @@
{
"description": "Utilisez nanobot sur les serveurs Discord et en messages privés.",
"requirements": "Jeton du bot Discord, permissions et passerelle",
"setup": {
"docsLabel": "Ouvrir le guide Discord",
"officialLabel": "Ouvrir le portail Discord",
"tryIt": "Mentionnez le bot sur un serveur ou envoyez-lui un message privé.",
"summary": "La connexion à Discord nécessite un jeton de bot et les permissions appropriées sur le serveur.",
"steps": [
"Créez un bot dans le portail développeur Discord et copiez son jeton.",
"Invitez-le sur votre serveur avec les permissions de lecture, d’envoi et de commandes slash.",
"Enregistrez et activez Discord, puis mentionnez le bot ou envoyez-lui un message privé."
],
"fields": {
"token": {
"label": "Jeton du bot",
"placeholder": "Jeton du bot Discord",
"help": "Créez-le depuis la page Bot du portail développeur Discord."
"placeholder": "Jeton du bot Discord"
},
"allowChannels": {
"label": "Salons autorisés",
"placeholder": "ID de salon séparés par des virgules",
"help": "Laissez vide pour autoriser tous les salons lisibles par le bot."
"placeholder": "ID de salon séparés par des virgules"
},
"groupPolicy": {
"label": "Comportement en groupe",
@@ -33,6 +22,34 @@
"allowFrom": {
"label": "Utilisateurs autorisés",
"placeholder": "ID utilisateur séparés par des virgules"
},
"proxy": {
"label": "Mandataire réseau"
},
"proxyUsername": {
"label": "Nom d'utilisateur du proxy"
},
"proxyPassword": {
"label": "Mot de passe proxy"
},
"intents": {
"label": "Intentions de passerelle"
},
"readReceiptEmoji": {
"label": "Lire les emoji"
},
"workingEmoji": {
"label": "Emoji fonctionnel"
},
"workingEmojiDelay": {
"label": "Retard d'emoji fonctionnel"
},
"streaming": {
"label": "Diffusion en continu",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
}
}
}
+30 -13
View File
@@ -1,26 +1,15 @@
{
"description": "Gunakan nanobot dari server dan DM Discord.",
"requirements": "Token bot Discord, izin, dan gateway",
"setup": {
"docsLabel": "Buka panduan Discord",
"officialLabel": "Buka portal Discord",
"tryIt": "Sebut bot di server atau kirim pesan langsung.",
"summary": "Untuk menghubungkan Discord, Anda memerlukan token bot dan izin yang sesuai di server.",
"steps": [
"Buat bot di Discord Developer Portal dan salin tokennya.",
"Undang bot ke server dengan izin baca/kirim pesan dan perintah slash.",
"Simpan dan aktifkan Discord, lalu sebut bot atau kirim DM."
],
"fields": {
"token": {
"label": "Token bot",
"placeholder": "Token bot Discord",
"help": "Buat dari halaman Bot di Discord Developer Portal."
"placeholder": "Token bot Discord"
},
"allowChannels": {
"label": "Kanal yang diizinkan",
"placeholder": "ID kanal, dipisahkan koma",
"help": "Kosongkan untuk mengizinkan semua kanal yang dapat dibaca bot."
"placeholder": "ID kanal, dipisahkan koma"
},
"groupPolicy": {
"label": "Perilaku grup",
@@ -33,6 +22,34 @@
"allowFrom": {
"label": "Pengguna yang diizinkan",
"placeholder": "ID pengguna, dipisahkan koma"
},
"proxy": {
"label": "Proksi jaringan"
},
"proxyUsername": {
"label": "Nama pengguna proksi"
},
"proxyPassword": {
"label": "Kata sandi proksi"
},
"intents": {
"label": "Maksud gerbang"
},
"readReceiptEmoji": {
"label": "Baca emoji"
},
"workingEmoji": {
"label": "Emoji yang berfungsi"
},
"workingEmojiDelay": {
"label": "Penundaan emoji yang berfungsi"
},
"streaming": {
"label": "Streaming",
"choices": {
"true": "Aktif",
"false": "Mati"
}
}
}
}
+30 -13
View File
@@ -1,26 +1,15 @@
{
"description": "Discord サーバーと DM から nanobot を利用します。",
"requirements": "Discord ボットトークン、権限、ゲートウェイ",
"setup": {
"docsLabel": "Discord 設定ガイドを開く",
"officialLabel": "Discord ポータルを開く",
"tryIt": "サーバーでボットをメンションするか、DM を送信します。",
"summary": "Discord への接続には、ボットトークンとサーバー上の適切な権限が必要です。",
"steps": [
"Discord Developer Portal でボットを作成し、トークンをコピーします。",
"メッセージの読み書きとスラッシュコマンド権限を付けてサーバーに招待します。",
"保存して Discord を有効にし、メンションまたは DM を送信します。"
],
"fields": {
"token": {
"label": "ボットトークン",
"placeholder": "Discord ボットトークン",
"help": "Discord Developer Portal の Bot ページで作成します。"
"placeholder": "Discord ボットトークン"
},
"allowChannels": {
"label": "許可するチャンネル",
"placeholder": "チャンネル ID(カンマ区切り)",
"help": "空欄の場合、ボットが読めるすべてのチャンネルを許可します。"
"placeholder": "チャンネル ID(カンマ区切り)"
},
"groupPolicy": {
"label": "グループでの動作",
@@ -33,6 +22,34 @@
"allowFrom": {
"label": "許可するユーザー",
"placeholder": "ユーザー ID(カンマ区切り)"
},
"proxy": {
"label": "ネットワークプロキシ"
},
"proxyUsername": {
"label": "プロキシのユーザー名"
},
"proxyPassword": {
"label": "プロキシパスワード"
},
"intents": {
"label": "ゲートウェイの意図"
},
"readReceiptEmoji": {
"label": "絵文字を読む"
},
"workingEmoji": {
"label": "働く絵文字"
},
"workingEmojiDelay": {
"label": "絵文字の動作遅延"
},
"streaming": {
"label": "ストリーミング",
"choices": {
"true": "オン",
"false": "オフ"
}
}
}
}
+30 -13
View File
@@ -1,26 +1,15 @@
{
"description": "Discord 서버와 DM에서 nanobot을 사용합니다.",
"requirements": "Discord 봇 토큰, 권한 및 게이트웨이",
"setup": {
"docsLabel": "Discord 설정 가이드 열기",
"officialLabel": "Discord 포털 열기",
"tryIt": "서버에서 봇을 멘션하거나 DM을 보내세요.",
"summary": "Discord에 연결하려면 봇 토큰과 서버 내 접근 권한이 필요합니다.",
"steps": [
"Discord Developer Portal에서 봇을 만들고 토큰을 복사하세요.",
"메시지 읽기/보내기 및 슬래시 명령 권한으로 서버에 초대하세요.",
"저장하고 Discord를 활성화한 다음 봇을 멘션하거나 DM을 보내세요."
],
"fields": {
"token": {
"label": "봇 토큰",
"placeholder": "Discord 봇 토큰",
"help": "Discord Developer Portal의 Bot 페이지에서 생성하세요."
"placeholder": "Discord 봇 토큰"
},
"allowChannels": {
"label": "허용된 채널",
"placeholder": "채널 ID, 쉼표로 구분",
"help": "비워 두면 봇이 읽을 수 있는 모든 채널을 허용합니다."
"placeholder": "채널 ID, 쉼표로 구분"
},
"groupPolicy": {
"label": "그룹 동작",
@@ -33,6 +22,34 @@
"allowFrom": {
"label": "허용된 사용자",
"placeholder": "사용자 ID, 쉼표로 구분"
},
"proxy": {
"label": "네트워크 프록시"
},
"proxyUsername": {
"label": "프록시 사용자 이름"
},
"proxyPassword": {
"label": "프록시 비밀번호"
},
"intents": {
"label": "게이트웨이 인텐트"
},
"readReceiptEmoji": {
"label": "이모티콘 읽기"
},
"workingEmoji": {
"label": "일하는 이모티콘"
},
"workingEmojiDelay": {
"label": "작동하는 이모티콘 지연"
},
"streaming": {
"label": "스트리밍",
"choices": {
"true": "켜기",
"false": "끄기"
}
}
}
}
@@ -1,26 +1,15 @@
{
"description": "Use o nanobot em servidores e DMs do Discord.",
"requirements": "Token do bot Discord, permissões e gateway",
"setup": {
"docsLabel": "Abrir guia do Discord",
"officialLabel": "Abrir portal do Discord",
"tryIt": "Mencione o bot em um servidor ou envie uma mensagem direta.",
"summary": "Para conectar o Discord, você precisa de um token de bot e das permissões adequadas no servidor.",
"steps": [
"Crie um bot no Discord Developer Portal e copie o token.",
"Convide-o para o servidor com permissões de leitura/envio e comandos slash.",
"Salve e ative o Discord; depois, mencione o bot ou envie uma DM."
],
"fields": {
"token": {
"label": "Token do bot",
"placeholder": "Token do bot Discord",
"help": "Crie-o na página Bot do Discord Developer Portal."
"placeholder": "Token do bot Discord"
},
"allowChannels": {
"label": "Canais permitidos",
"placeholder": "IDs de canal separados por vírgulas",
"help": "Deixe vazio para permitir qualquer canal que o bot consiga ler."
"placeholder": "IDs de canal separados por vírgulas"
},
"groupPolicy": {
"label": "Comportamento em grupos",
@@ -33,6 +22,34 @@
"allowFrom": {
"label": "Usuários permitidos",
"placeholder": "IDs de usuário separados por vírgulas"
},
"proxy": {
"label": "Proxy de rede"
},
"proxyUsername": {
"label": "Nome de usuário proxy"
},
"proxyPassword": {
"label": "Senha proxy"
},
"intents": {
"label": "Intenções de gateway"
},
"readReceiptEmoji": {
"label": "Ler emoticons"
},
"workingEmoji": {
"label": "Emoji de trabalho"
},
"workingEmojiDelay": {
"label": "Atraso de emoji funcionando"
},
"streaming": {
"label": "Transmissão",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
}
}
}
+30 -13
View File
@@ -1,26 +1,15 @@
{
"description": "Sử dụng nanobot trong máy chủ và tin nhắn riêng Discord.",
"requirements": "Token bot Discord, quyền và gateway",
"setup": {
"docsLabel": "Mở hướng dẫn Discord",
"officialLabel": "Mở cổng nhà phát triển Discord",
"tryIt": "Nhắc bot trong máy chủ hoặc gửi tin nhắn riêng.",
"summary": "Để kết nối Discord, bạn cần token bot và các quyền phù hợp trên máy chủ.",
"steps": [
"Tạo bot trong Discord Developer Portal và sao chép token.",
"Mời bot vào máy chủ với quyền đọc/gửi tin nhắn và lệnh slash.",
"Lưu và bật Discord, sau đó nhắc bot hoặc gửi tin nhắn riêng."
],
"fields": {
"token": {
"label": "Token bot",
"placeholder": "Token bot Discord",
"help": "Tạo từ trang Bot trong Discord Developer Portal."
"placeholder": "Token bot Discord"
},
"allowChannels": {
"label": "Kênh được phép",
"placeholder": "ID kênh, phân tách bằng dấu phẩy",
"help": "Để trống để cho phép mọi kênh bot có thể đọc."
"placeholder": "ID kênh, phân tách bằng dấu phẩy"
},
"groupPolicy": {
"label": "Hành vi trong nhóm",
@@ -33,6 +22,34 @@
"allowFrom": {
"label": "Người dùng được phép",
"placeholder": "ID người dùng, phân tách bằng dấu phẩy"
},
"proxy": {
"label": "Proxy mạng"
},
"proxyUsername": {
"label": "Tên người dùng proxy"
},
"proxyPassword": {
"label": "Mật khẩu proxy"
},
"intents": {
"label": "Ý định của cổng"
},
"readReceiptEmoji": {
"label": "Đọc biểu tượng cảm xúc"
},
"workingEmoji": {
"label": "Biểu tượng cảm xúc đang hoạt động"
},
"workingEmojiDelay": {
"label": "Độ trễ biểu tượng cảm xúc đang hoạt động"
},
"streaming": {
"label": "Truyền phát",
"choices": {
"true": "Bật",
"false": "Tắt"
}
}
}
}
@@ -1,26 +1,15 @@
{
"description": "在 Discord 服务器和私信中使用 nanobot。",
"requirements": "Discord 机器人令牌、权限和网关",
"setup": {
"docsLabel": "打开 Discord 配置指南",
"officialLabel": "打开 Discord 开发者后台",
"tryIt": "在服务器中提及机器人,或向它发送私信。",
"summary": "连接 Discord 需要机器人令牌,以及机器人在服务器中的相应权限。",
"steps": [
"在 Discord Developer Portal 中创建机器人并复制令牌。",
"将机器人邀请到服务器,并授予读取/发送消息及斜杠命令权限。",
"保存并启用 Discord,然后提及机器人或发送私信。"
],
"fields": {
"token": {
"label": "机器人令牌",
"placeholder": "Discord 机器人令牌",
"help": "从 Discord Developer Portal 的 Bot 页面创建。"
"placeholder": "Discord 机器人令牌"
},
"allowChannels": {
"label": "允许的频道",
"placeholder": "频道 ID,用逗号分隔",
"help": "留空则允许机器人可读取的所有频道。"
"placeholder": "频道 ID,用逗号分隔"
},
"groupPolicy": {
"label": "群组行为",
@@ -33,6 +22,34 @@
"allowFrom": {
"label": "允许的用户",
"placeholder": "用户 ID,用逗号分隔"
},
"proxy": {
"label": "网络代理"
},
"proxyUsername": {
"label": "代理用户名"
},
"proxyPassword": {
"label": "代理密码"
},
"intents": {
"label": "Gateway Intents"
},
"readReceiptEmoji": {
"label": "已读表情"
},
"workingEmoji": {
"label": "处理中表情"
},
"workingEmojiDelay": {
"label": "处理中表情延迟"
},
"streaming": {
"label": "流式输出",
"choices": {
"true": "开启",
"false": "关闭"
}
}
}
}
@@ -1,26 +1,15 @@
{
"description": "在 Discord 伺服器和私訊中使用 nanobot。",
"requirements": "Discord 機器人權杖、權限和閘道",
"setup": {
"docsLabel": "開啟 Discord 設定指南",
"officialLabel": "開啟 Discord 開發者後台",
"tryIt": "在伺服器中提及機器人,或向它傳送私訊。",
"summary": "連接 Discord 需要機器人權杖,以及機器人在伺服器中的適當權限。",
"steps": [
"在 Discord Developer Portal 中建立機器人並複製權杖。",
"將機器人邀請到伺服器,並授予讀取/傳送訊息及斜線指令權限。",
"儲存並啟用 Discord,然後提及機器人或傳送私訊。"
],
"fields": {
"token": {
"label": "機器人權杖",
"placeholder": "Discord 機器人權杖",
"help": "從 Discord Developer Portal 的 Bot 頁面建立。"
"placeholder": "Discord 機器人權杖"
},
"allowChannels": {
"label": "允許的頻道",
"placeholder": "頻道 ID,以逗號分隔",
"help": "留空則允許機器人可讀取的所有頻道。"
"placeholder": "頻道 ID,以逗號分隔"
},
"groupPolicy": {
"label": "群組行為",
@@ -33,6 +22,34 @@
"allowFrom": {
"label": "允許的使用者",
"placeholder": "使用者 ID,以逗號分隔"
},
"proxy": {
"label": "網路代理"
},
"proxyUsername": {
"label": "代理用戶名"
},
"proxyPassword": {
"label": "代理密碼"
},
"intents": {
"label": "Gateway Intents"
},
"readReceiptEmoji": {
"label": "已讀表情"
},
"workingEmoji": {
"label": "處理中表情"
},
"workingEmojiDelay": {
"label": "處理中表情延遲"
},
"streaming": {
"label": "串流輸出",
"choices": {
"true": "開啟",
"false": "關閉"
}
}
}
}
+16
View File
@@ -21,6 +21,21 @@ SETUP_SPEC = ChannelSetupSpec(
"allowFrom": field("list"),
"verifyDkim": field("bool", default=True),
"verifySpf": field("bool", default=True),
"imapMailbox": field(default="INBOX"),
"imapUseSsl": field("bool", default=True),
"smtpUseTls": field("bool", default=True),
"smtpUseSsl": field("bool", default=False),
"autoReplyEnabled": field("bool", default=True),
"markSeen": field("bool", default=True),
"postAction": field("enum", choices={"delete", "move"}),
"postActionMoveMailbox": field(),
"postActionExpunge": field("bool", default=False),
"postActionIgnoreSkipped": field("bool", default=True),
"maxBodyChars": field("int", default=12000),
"subjectPrefix": field(default="Re: "),
"allowedAttachmentTypes": field("list"),
"maxAttachmentSize": field("int", default=2_000_000),
"maxAttachmentsPerEmail": field("int", default=5),
},
required=required_fields(
"consentGranted",
@@ -33,6 +48,7 @@ SETUP_SPEC = ChannelSetupSpec(
),
official_url="https://support.google.com/accounts/answer/185833",
validator=validate,
verifies_connection=True,
)
PLUGIN = ChannelPlugin(
@@ -1,13 +1,20 @@
from __future__ import annotations
import imaplib
import pytest
from nanobot.channels.email import validation as email_validation
from nanobot.channels.email.manifest import SETUP_SPEC
from nanobot.channels.validation import validate_channel_config
from nanobot.config.loader import save_config
from nanobot.config.schema import Config
def test_email_exposes_connection_checks_to_setup_clients() -> None:
assert SETUP_SPEC.verifies_connection is True
def test_validate_email_presets_are_checked_without_saving(
tmp_path,
monkeypatch: pytest.MonkeyPatch,
@@ -17,6 +24,17 @@ def test_validate_email_presets_are_checked_without_saving(
original_config = config_path.read_bytes()
monkeypatch.setattr("nanobot.config.loader._current_config_path", config_path)
monkeypatch.setattr(email_validation, "probe_tcp", lambda *_args, **_kwargs: None)
login_calls: list[tuple[str, tuple[object, ...], dict[str, object]]] = []
monkeypatch.setattr(
email_validation,
"_imap_login",
lambda *args, **kwargs: login_calls.append(("imap", args, kwargs)),
)
monkeypatch.setattr(
email_validation,
"_smtp_login",
lambda *args, **kwargs: login_calls.append(("smtp", args, kwargs)),
)
result = validate_channel_config(
"email",
@@ -33,9 +51,64 @@ def test_validate_email_presets_are_checked_without_saving(
assert result["status"] == "connected"
assert result["can_enable"] is True
assert [check["id"] for check in result["checks"]][-2:] == [
"smtp_reachability",
"smtp_account",
]
assert login_calls == [
(
"imap",
("imap.gmail.com", 993, "bot@example.com", "imap-secret"),
{"mailbox": "INBOX", "use_ssl": True},
),
(
"smtp",
("smtp.gmail.com", 587, "bot@example.com", "smtp-secret"),
{"use_ssl": False, "use_tls": True},
),
]
assert config_path.read_bytes() == original_config
def test_validate_email_rejects_invalid_account_credentials(
tmp_path,
monkeypatch: pytest.MonkeyPatch,
) -> None:
config_path = tmp_path / "config.json"
save_config(Config(), config_path)
monkeypatch.setattr("nanobot.config.loader._current_config_path", config_path)
monkeypatch.setattr(email_validation, "probe_tcp", lambda *_args, **_kwargs: None)
def reject_imap_login(*_args, **_kwargs) -> None:
raise imaplib.IMAP4.error("AUTH failed")
monkeypatch.setattr(email_validation, "_imap_login", reject_imap_login)
monkeypatch.setattr(email_validation, "_smtp_login", lambda *_args, **_kwargs: None)
result = validate_channel_config(
"email",
{
"channels.email.consentGranted": "true",
"channels.email.imapHost": "imap.example.com",
"channels.email.imapUsername": "bot@example.com",
"channels.email.imapPassword": "wrong-secret",
"channels.email.smtpHost": "smtp.example.com",
"channels.email.smtpUsername": "bot@example.com",
"channels.email.smtpPassword": "smtp-secret",
},
)
assert result["status"] == "invalid"
assert result["can_enable"] is False
assert {
check["id"]: (check["status"], check.get("message"))
for check in result["checks"]
}["imap_account"] == (
"fail",
"IMAP rejected the username or password.",
)
def test_validate_email_blocks_private_targets_when_local_access_is_disabled(
tmp_path,
monkeypatch: pytest.MonkeyPatch,
+145 -11
View File
@@ -1,5 +1,9 @@
"""Email setup validation owned by the channel package."""
import imaplib
import smtplib
import ssl
from contextlib import suppress
from typing import Any
from nanobot.channels.contracts import ChannelValidationContext
@@ -13,6 +17,84 @@ from nanobot.channels.validation import (
truthy,
)
_TIMEOUT_SECONDS = 4.0
class _MailboxSelectionError(Exception):
pass
def _resolved_string(values: dict[str, Any], field: str) -> str:
from nanobot.config.loader import resolve_env_refs
return string_value(resolve_env_refs(string_value(values.get(field))))
def _bool_value(values: dict[str, Any], field: str, *, default: bool) -> bool:
value = values.get(field)
return default if value in (None, "") else truthy(value)
def _imap_login(
host: str,
port: int,
username: str,
password: str,
*,
mailbox: str,
use_ssl: bool,
) -> None:
client: Any = (
imaplib.IMAP4_SSL(host, port, timeout=_TIMEOUT_SECONDS)
if use_ssl
else imaplib.IMAP4(host, port, timeout=_TIMEOUT_SECONDS)
)
try:
client.login(username, password)
try:
status, _ = client.select(mailbox, readonly=True)
except imaplib.IMAP4.error as exc:
raise _MailboxSelectionError from exc
if status != "OK":
raise _MailboxSelectionError
finally:
with suppress(Exception):
client.logout()
def _smtp_login(
host: str,
port: int,
username: str,
password: str,
*,
use_ssl: bool,
use_tls: bool,
) -> None:
client = (
smtplib.SMTP_SSL(host, port, timeout=_TIMEOUT_SECONDS)
if use_ssl
else smtplib.SMTP(host, port, timeout=_TIMEOUT_SECONDS)
)
with client:
if use_tls and not use_ssl:
client.starttls(context=ssl.create_default_context())
client.login(username, password)
def _connection_error_message(prefix: str, exc: Exception) -> tuple[str, str]:
if isinstance(exc, _MailboxSelectionError):
return "fail", "IMAP connected, but the selected mailbox could not be opened."
if isinstance(exc, (imaplib.IMAP4.error, smtplib.SMTPAuthenticationError)):
return "fail", f"{prefix} rejected the username or password."
if isinstance(exc, (ssl.SSLError, smtplib.SMTPNotSupportedError)):
return "fail", f"{prefix} security settings are not accepted by the server."
if isinstance(exc, smtplib.SMTPResponseException):
return "fail", f"{prefix} rejected the connection settings."
if isinstance(exc, (TimeoutError, OSError)):
return "warn", f"Could not reach {prefix} now. Try again later."
return "warn", f"Could not verify {prefix} now. Try again later."
def validate(
values: dict[str, Any],
@@ -32,15 +114,33 @@ def validate(
)
for prefix, default_port in (("imap", 993), ("smtp", 587)):
host = string_value(values.get(f"{prefix}Host"))
port = int_value(values.get(f"{prefix}Port")) or default_port
label = prefix.upper()
host = _resolved_string(values, f"{prefix}Host")
username = _resolved_string(values, f"{prefix}Username")
password = _resolved_string(values, f"{prefix}Password")
unresolved = any(
string_value(values.get(field)) and not _resolved_string(values, field)
for field in (f"{prefix}Host", f"{prefix}Username", f"{prefix}Password")
)
if unresolved:
checks.append(
check(
f"{prefix}_environment",
f"{label} account",
"fail",
f"Set every environment variable referenced by the {label} settings.",
)
)
continue
raw_port = values.get(f"{prefix}Port")
port = default_port if raw_port in (None, "") else int_value(raw_port)
if not host:
continue
if port <= 0 or port > 65535:
if port is None or port <= 0 or port > 65535:
checks.append(
check(
f"{prefix}_port",
f"{prefix.upper()} port",
f"{label} port",
"fail",
"Port must be between 1 and 65535.",
)
@@ -49,7 +149,7 @@ def validate(
checks.append(
check(
f"{prefix}_settings",
f"{prefix.upper()} settings",
f"{label} settings",
"pass",
f"{host}:{port} is set.",
)
@@ -63,7 +163,7 @@ def validate(
checks.append(
check(
f"{prefix}_reachability",
f"{prefix.upper()} reachability",
f"{label} reachability",
"pass",
"The server accepted a TCP connection.",
)
@@ -72,17 +172,51 @@ def validate(
checks.append(
check(
f"{prefix}_reachability",
f"{prefix.upper()} reachability",
f"{label} reachability",
"warn",
f"Could not verify network reachability now: {exc}",
)
)
continue
if not username or not password:
continue
try:
if prefix == "imap":
_imap_login(
host,
port,
username,
password,
mailbox=_resolved_string(values, "imapMailbox") or "INBOX",
use_ssl=_bool_value(values, "imapUseSsl", default=True),
)
else:
_smtp_login(
host,
port,
username,
password,
use_ssl=_bool_value(values, "smtpUseSsl", default=False),
use_tls=_bool_value(values, "smtpUseTls", default=True),
)
checks.append(
check(
f"{prefix}_account",
f"{label} account",
"pass",
f"{label} accepted the account credentials.",
)
)
except Exception as exc:
status, message = _connection_error_message(label, exc)
checks.append(check(f"{prefix}_account", f"{label} account", status, message))
identity = {
"account": string_value(
values.get("fromAddress")
or values.get("imapUsername")
or values.get("smtpUsername")
"account": (
_resolved_string(values, "fromAddress")
or _resolved_string(values, "imapUsername")
or _resolved_string(values, "smtpUsername")
)
}
return status_from_checks("email", checks, missing, identity=identity)
+15 -16
View File
@@ -32,34 +32,33 @@ const EMAIL_PROVIDER_PRESETS: ChannelProviderPresetDefinition[] = [
"channels.email.smtpPort": "587",
},
},
{ id: "custom", values: {} },
];
export default {
presentation: {
logoUrl: "https://gmail.com/favicon.ico",
displayName: "Email",
initials: "EM",
color: "#64748B",
logoUrl: "https://gmail.com/favicon.ico",
setup: {
mode: "credentials",
docsUrl: chatAppGuideUrl("email"),
presets: EMAIL_PROVIDER_PRESETS,
fields: [
{ key: "channels.email.consentGranted" },
{ key: "channels.email.imapHost" },
{ key: "channels.email.imapUsername" },
{ key: "channels.email.imapPassword" },
{ key: "channels.email.smtpHost" },
{ key: "channels.email.smtpUsername" },
{ key: "channels.email.smtpPassword" },
{ key: "channels.email.imapPort" },
{ key: "channels.email.smtpPort" },
{ key: "channels.email.fromAddress" },
{ key: "channels.email.pollIntervalSeconds" },
{ key: "channels.email.allowFrom" },
{ key: "channels.email.verifyDkim" },
{ key: "channels.email.verifySpf" },
{ key: "channels.email.consentGranted", section: "account" },
{ key: "channels.email.imapHost", section: "receiving" },
{ key: "channels.email.imapUsername", section: "receiving" },
{ key: "channels.email.imapPassword", section: "receiving" },
{ key: "channels.email.imapPort", section: "receiving" },
{ key: "channels.email.smtpHost", section: "sending" },
{ key: "channels.email.smtpUsername", section: "sending" },
{ key: "channels.email.smtpPassword", section: "sending" },
{ key: "channels.email.smtpPort", section: "sending" },
{ key: "channels.email.fromAddress", section: "sending" },
{ key: "channels.email.pollIntervalSeconds", section: "behavior" },
{ key: "channels.email.allowFrom", section: "access" },
{ key: "channels.email.verifyDkim", section: "security" },
{ key: "channels.email.verifySpf", section: "security" },
],
},
},
+86 -18
View File
@@ -1,26 +1,20 @@
{
"description": "Let nanobot receive and answer email messages.",
"requirements": "IMAP inbox, SMTP sender, app password, explicit consent",
"setup": {
"docsLabel": "Open Email setup",
"officialLabel": "Open app password guide",
"tryIt": "Send a test email to the connected mailbox.",
"summary": "Email reads messages over IMAP and replies over SMTP. Use a dedicated mailbox and grant consent before enabling it.",
"steps": [
"Create a dedicated mailbox and, when required, an app password.",
"Choose a provider preset or enter the IMAP and SMTP settings manually.",
"Grant consent, save and enable Email, then send a test message to the mailbox."
],
"presetLabel": "Quick fill",
"sections": {
"receiving": "Receiving mail",
"sending": "Sending mail"
},
"presets": {
"gmail": "Gmail",
"outlook": "Outlook",
"icloud": "iCloud",
"custom": "Custom"
"icloud": "iCloud"
},
"fields": {
"consentGranted": {
"label": "Allow nanobot to read and send email",
"help": "Turn on to give nanobot access to this mailbox. Make sure this is the dedicated mailbox you want the bot to use.",
"choices": {
"true": "Granted",
"false": "Not granted"
@@ -36,8 +30,7 @@
},
"imapPassword": {
"label": "IMAP password",
"placeholder": "App password",
"help": "Use an app password when your mail provider requires one."
"placeholder": "App password"
},
"smtpHost": {
"label": "SMTP host",
@@ -49,8 +42,7 @@
},
"smtpPassword": {
"label": "SMTP password",
"placeholder": "App password",
"help": "Usually the same app password used for IMAP."
"placeholder": "App password"
},
"imapPort": {
"label": "IMAP port",
@@ -70,8 +62,7 @@
},
"allowFrom": {
"label": "Allowed senders",
"placeholder": "Email addresses, comma separated",
"help": "Leave empty to require pairing before a sender can use email."
"placeholder": "Email addresses, comma separated"
},
"verifyDkim": {
"label": "Verify DKIM",
@@ -86,6 +77,83 @@
"true": "On",
"false": "Off"
}
},
"imapMailbox": {
"label": "IMAP mailbox"
},
"imapUseSsl": {
"label": "IMAP SSL",
"choices": {
"true": "On",
"false": "Off"
}
},
"smtpUseTls": {
"label": "SMTP TLS",
"choices": {
"true": "On",
"false": "Off"
}
},
"smtpUseSsl": {
"label": "SMTP SSL",
"choices": {
"true": "On",
"false": "Off"
}
},
"autoReplyEnabled": {
"label": "Automatic replies",
"choices": {
"true": "On",
"false": "Off"
}
},
"markSeen": {
"label": "Mark as read",
"choices": {
"true": "On",
"false": "Off"
}
},
"postAction": {
"label": "After processing",
"choices": {
"delete": "Delete",
"move": "Move"
}
},
"postActionMoveMailbox": {
"label": "Move to mailbox"
},
"postActionExpunge": {
"label": "Permanently apply action",
"choices": {
"true": "On",
"false": "Off"
}
},
"postActionIgnoreSkipped": {
"label": "Ignore skipped messages",
"choices": {
"true": "On",
"false": "Off"
}
},
"maxBodyChars": {
"label": "Maximum body length"
},
"subjectPrefix": {
"label": "Reply subject prefix"
},
"allowedAttachmentTypes": {
"label": "Allowed attachment types"
},
"maxAttachmentSize": {
"label": "Maximum attachment size"
},
"maxAttachmentsPerEmail": {
"label": "Maximum attachments"
}
}
}
+86 -18
View File
@@ -1,27 +1,21 @@
{
"displayName": "Correo electrónico",
"description": "Permite que nanobot reciba y responda correos.",
"requirements": "Bandeja IMAP, envío SMTP, contraseña de app y consentimiento explícito",
"setup": {
"docsLabel": "Abrir guía de Email",
"officialLabel": "Abrir guía de contraseñas de app",
"tryIt": "Envía un correo de prueba al buzón conectado.",
"summary": "Email lee mensajes por IMAP y responde por SMTP. Usa un buzón dedicado y da tu consentimiento antes de activarlo.",
"steps": [
"Crea un buzón dedicado y, si hace falta, una contraseña de app.",
"Elige un proveedor o introduce manualmente IMAP y SMTP.",
"Da tu consentimiento, guarda y activa Email; después envía un mensaje de prueba."
],
"presetLabel": "Relleno rápido",
"sections": {
"receiving": "Recepción de correo",
"sending": "Envío de correo"
},
"presets": {
"gmail": "Gmail",
"outlook": "Outlook",
"icloud": "iCloud",
"custom": "Personalizado"
"icloud": "iCloud"
},
"fields": {
"consentGranted": {
"label": "Permitir que nanobot lea y envíe correos",
"help": "Activa esta opción para permitir el acceso al buzón. Comprueba que sea el buzón dedicado al bot.",
"choices": {
"true": "Concedido",
"false": "No concedido"
@@ -37,8 +31,7 @@
},
"imapPassword": {
"label": "Contraseña IMAP",
"placeholder": "Contraseña de app",
"help": "Usa una contraseña de app si el proveedor la exige."
"placeholder": "Contraseña de app"
},
"smtpHost": {
"label": "Host SMTP",
@@ -50,8 +43,7 @@
},
"smtpPassword": {
"label": "Contraseña SMTP",
"placeholder": "Contraseña de app",
"help": "Normalmente es la misma que para IMAP."
"placeholder": "Contraseña de app"
},
"imapPort": {
"label": "Puerto IMAP",
@@ -71,8 +63,7 @@
},
"allowFrom": {
"label": "Remitentes permitidos",
"placeholder": "Correos separados por comas",
"help": "Déjalo vacío para exigir vinculación previa."
"placeholder": "Correos separados por comas"
},
"verifyDkim": {
"label": "Verificar DKIM",
@@ -87,6 +78,83 @@
"true": "Activado",
"false": "Desactivado"
}
},
"imapMailbox": {
"label": "buzón IMAP"
},
"imapUseSsl": {
"label": "SSL IMAP",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"smtpUseTls": {
"label": "TLS SMTP",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"smtpUseSsl": {
"label": "SSL SMTP",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"autoReplyEnabled": {
"label": "Respuestas automáticas",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"markSeen": {
"label": "Marcar como leído",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"postAction": {
"label": "Después del procesamiento",
"choices": {
"delete": "Eliminar",
"move": "Mover"
}
},
"postActionMoveMailbox": {
"label": "Mover al buzón"
},
"postActionExpunge": {
"label": "Aplicar permanentemente la acción",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"postActionIgnoreSkipped": {
"label": "Ignorar mensajes omitidos",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"maxBodyChars": {
"label": "Longitud máxima del cuerpo"
},
"subjectPrefix": {
"label": "Prefijo del asunto de respuesta"
},
"allowedAttachmentTypes": {
"label": "Tipos de archivos adjuntos permitidos"
},
"maxAttachmentSize": {
"label": "Tamaño máximo de archivo adjunto"
},
"maxAttachmentsPerEmail": {
"label": "Archivos adjuntos máximos"
}
}
}
+86 -18
View File
@@ -1,27 +1,21 @@
{
"displayName": "E-mail",
"description": "Permettez à nanobot de recevoir des e-mails et d’y répondre.",
"requirements": "Boîte IMAP, envoi SMTP, mot de passe d’application et consentement explicite",
"setup": {
"docsLabel": "Ouvrir le guide Email",
"officialLabel": "Ouvrir le guide des mots de passe d’application",
"tryIt": "Envoyez un e-mail test à la boîte connectée.",
"summary": "nanobot lit les messages via IMAP et répond via SMTP. Utilisez une boîte dédiée et autorisez l’accès avant d’activer le canal.",
"steps": [
"Créez une boîte dédiée et, si nécessaire, un mot de passe d’application.",
"Choisissez un fournisseur ou saisissez les paramètres IMAP et SMTP.",
"Accordez le consentement, enregistrez et activez Email, puis envoyez un message test."
],
"presetLabel": "Remplissage rapide",
"sections": {
"receiving": "Réception des e-mails",
"sending": "Envoi des e-mails"
},
"presets": {
"gmail": "Gmail",
"outlook": "Outlook",
"icloud": "iCloud",
"custom": "Personnalisé"
"icloud": "iCloud"
},
"fields": {
"consentGranted": {
"label": "Autoriser nanobot à lire et envoyer des e-mails",
"help": "Activez cette option pour autoriser l’accès à cette boîte. Vérifiez qu’il s’agit bien de la boîte dédiée au bot.",
"choices": {
"true": "Accordé",
"false": "Non accordé"
@@ -37,8 +31,7 @@
},
"imapPassword": {
"label": "Mot de passe IMAP",
"placeholder": "Mot de passe d’application",
"help": "Utilisez un mot de passe d’application si le fournisseur l’exige."
"placeholder": "Mot de passe d’application"
},
"smtpHost": {
"label": "Hôte SMTP",
@@ -50,8 +43,7 @@
},
"smtpPassword": {
"label": "Mot de passe SMTP",
"placeholder": "Mot de passe d’application",
"help": "Généralement identique à celui d’IMAP."
"placeholder": "Mot de passe d’application"
},
"imapPort": {
"label": "Port IMAP",
@@ -71,8 +63,7 @@
},
"allowFrom": {
"label": "Expéditeurs autorisés",
"placeholder": "Adresses séparées par des virgules",
"help": "Laissez vide pour que les expéditeurs doivent d’abord s’associer au bot."
"placeholder": "Adresses séparées par des virgules"
},
"verifyDkim": {
"label": "Vérifier DKIM",
@@ -87,6 +78,83 @@
"true": "Activé",
"false": "Désactivé"
}
},
"imapMailbox": {
"label": "Boîte aux lettres IMAP"
},
"imapUseSsl": {
"label": "SSL IMAP",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"smtpUseTls": {
"label": "SMTP-TLS",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"smtpUseSsl": {
"label": "SMTP-SSL",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"autoReplyEnabled": {
"label": "Réponses automatiques",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"markSeen": {
"label": "Marquer comme lu",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"postAction": {
"label": "Après traitement",
"choices": {
"delete": "Supprimer",
"move": "Déplacer"
}
},
"postActionMoveMailbox": {
"label": "Déplacer vers la boîte aux lettres"
},
"postActionExpunge": {
"label": "Appliquer l'action de manière permanente",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"postActionIgnoreSkipped": {
"label": "Ignorer les messages ignorés",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"maxBodyChars": {
"label": "Longueur maximale du corps"
},
"subjectPrefix": {
"label": "Préfixe du sujet de la réponse"
},
"allowedAttachmentTypes": {
"label": "Types de pièces jointes autorisés"
},
"maxAttachmentSize": {
"label": "Taille maximale des pièces jointes"
},
"maxAttachmentsPerEmail": {
"label": "Nombre maximal de pièces jointes"
}
}
}
+86 -18
View File
@@ -1,27 +1,21 @@
{
"displayName": "Email",
"description": "Izinkan nanobot menerima dan membalas email.",
"requirements": "Kotak masuk IMAP, pengirim SMTP, kata sandi aplikasi, dan persetujuan eksplisit",
"setup": {
"docsLabel": "Buka panduan Email",
"officialLabel": "Buka panduan kata sandi aplikasi",
"tryIt": "Kirim email uji ke kotak surat yang terhubung.",
"summary": "Email membaca pesan melalui IMAP dan membalas melalui SMTP. Gunakan kotak surat khusus dan berikan persetujuan sebelum mengaktifkan.",
"steps": [
"Buat kotak surat khusus dan kata sandi aplikasi bila diperlukan.",
"Pilih prasetel penyedia atau masukkan pengaturan IMAP dan SMTP secara manual.",
"Berikan persetujuan, simpan dan aktifkan Email, lalu kirim pesan uji."
],
"presetLabel": "Isi cepat",
"sections": {
"receiving": "Penerimaan email",
"sending": "Pengiriman email"
},
"presets": {
"gmail": "Gmail",
"outlook": "Outlook",
"icloud": "iCloud",
"custom": "Kustom"
"icloud": "iCloud"
},
"fields": {
"consentGranted": {
"label": "Izinkan nanobot membaca dan mengirim email",
"help": "Aktifkan untuk memberi nanobot akses ke kotak surat ini. Pastikan kotak surat tersebut memang dikhususkan untuk bot.",
"choices": {
"true": "Diberikan",
"false": "Belum diberikan"
@@ -37,8 +31,7 @@
},
"imapPassword": {
"label": "Kata sandi IMAP",
"placeholder": "Kata sandi aplikasi",
"help": "Gunakan kata sandi aplikasi jika diwajibkan penyedia."
"placeholder": "Kata sandi aplikasi"
},
"smtpHost": {
"label": "Host SMTP",
@@ -50,8 +43,7 @@
},
"smtpPassword": {
"label": "Kata sandi SMTP",
"placeholder": "Kata sandi aplikasi",
"help": "Biasanya sama dengan kata sandi aplikasi IMAP."
"placeholder": "Kata sandi aplikasi"
},
"imapPort": {
"label": "Port IMAP",
@@ -71,8 +63,7 @@
},
"allowFrom": {
"label": "Pengirim yang diizinkan",
"placeholder": "Alamat email, dipisahkan koma",
"help": "Kosongkan untuk mewajibkan pairing terlebih dahulu."
"placeholder": "Alamat email, dipisahkan koma"
},
"verifyDkim": {
"label": "Verifikasi DKIM",
@@ -87,6 +78,83 @@
"true": "Aktif",
"false": "Nonaktif"
}
},
"imapMailbox": {
"label": "kotak surat IMAP"
},
"imapUseSsl": {
"label": "SSL IMAP",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"smtpUseTls": {
"label": "TLS SMTP",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"smtpUseSsl": {
"label": "SSL SMTP",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"autoReplyEnabled": {
"label": "Balasan otomatis",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"markSeen": {
"label": "Tandai sebagai telah dibaca",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"postAction": {
"label": "Setelah diproses",
"choices": {
"delete": "Hapus",
"move": "Pindah"
}
},
"postActionMoveMailbox": {
"label": "Pindah ke kotak surat"
},
"postActionExpunge": {
"label": "Terapkan tindakan secara permanen",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"postActionIgnoreSkipped": {
"label": "Abaikan pesan yang dilewati",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"maxBodyChars": {
"label": "Panjang tubuh maksimal"
},
"subjectPrefix": {
"label": "Awalan subjek balasan"
},
"allowedAttachmentTypes": {
"label": "Jenis lampiran yang diizinkan"
},
"maxAttachmentSize": {
"label": "Ukuran lampiran maksimum"
},
"maxAttachmentsPerEmail": {
"label": "Lampiran maksimum"
}
}
}
+86 -18
View File
@@ -1,27 +1,21 @@
{
"displayName": "メール",
"description": "nanobot でメールを受信し、返信します。",
"requirements": "IMAP 受信箱、SMTP 送信、アプリパスワード、明示的な同意",
"setup": {
"docsLabel": "メール設定ガイドを開く",
"officialLabel": "アプリパスワードガイドを開く",
"tryIt": "接続したメールボックスにテストメールを送信します。",
"summary": "メールは IMAP で受信し SMTP で返信します。専用メールボックスを使い、有効化前に同意してください。",
"steps": [
"専用メールボックスを作成し、必要ならアプリパスワードを発行します。",
"プロバイダープリセットを選ぶか、IMAP と SMTP を手動入力します。",
"同意して保存し、メールを有効にしてテストメールを送信します。"
],
"presetLabel": "クイック入力",
"sections": {
"receiving": "メール受信",
"sending": "メール送信"
},
"presets": {
"gmail": "Gmail",
"outlook": "Outlook",
"icloud": "iCloud",
"custom": "カスタム"
"icloud": "iCloud"
},
"fields": {
"consentGranted": {
"label": "nanobot にメールの読み取りと送信を許可",
"help": "オンにすると nanobot がこのメールボックスにアクセスできます。ボット用の専用メールボックスであることを確認してください。",
"choices": {
"true": "同意済み",
"false": "未同意"
@@ -37,8 +31,7 @@
},
"imapPassword": {
"label": "IMAP パスワード",
"placeholder": "アプリパスワード",
"help": "プロバイダーが求める場合はアプリパスワードを使います。"
"placeholder": "アプリパスワード"
},
"smtpHost": {
"label": "SMTP ホスト",
@@ -50,8 +43,7 @@
},
"smtpPassword": {
"label": "SMTP パスワード",
"placeholder": "アプリパスワード",
"help": "通常は IMAP と同じアプリパスワードです。"
"placeholder": "アプリパスワード"
},
"imapPort": {
"label": "IMAP ポート",
@@ -71,8 +63,7 @@
},
"allowFrom": {
"label": "許可する送信者",
"placeholder": "メールアドレス(カンマ区切り)",
"help": "空欄の場合、送信者は先にペアリングが必要です。"
"placeholder": "メールアドレス(カンマ区切り)"
},
"verifyDkim": {
"label": "DKIM を検証",
@@ -87,6 +78,83 @@
"true": "オン",
"false": "オフ"
}
},
"imapMailbox": {
"label": "IMAPメールボックス"
},
"imapUseSsl": {
"label": "IMAP SSL",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"smtpUseTls": {
"label": "SMTP TLS",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"smtpUseSsl": {
"label": "SMTP SSL",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"autoReplyEnabled": {
"label": "自動応答",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"markSeen": {
"label": "既読としてマークする",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"postAction": {
"label": "加工後",
"choices": {
"delete": "削除",
"move": "移動"
}
},
"postActionMoveMailbox": {
"label": "メールボックスに移動"
},
"postActionExpunge": {
"label": "アクションを永続的に適用する",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"postActionIgnoreSkipped": {
"label": "スキップされたメッセージを無視する",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"maxBodyChars": {
"label": "最大体長"
},
"subjectPrefix": {
"label": "返信件名の接頭辞"
},
"allowedAttachmentTypes": {
"label": "許可される添付ファイルの種類"
},
"maxAttachmentSize": {
"label": "添付ファイルの最大サイズ"
},
"maxAttachmentsPerEmail": {
"label": "最大添付ファイル数"
}
}
}
+86 -18
View File
@@ -1,27 +1,21 @@
{
"displayName": "이메일",
"description": "nanobot이 이메일을 받고 답장하도록 합니다.",
"requirements": "IMAP 받은편지함, SMTP 발신, 앱 비밀번호 및 명시적 동의",
"setup": {
"docsLabel": "이메일 설정 가이드 열기",
"officialLabel": "앱 비밀번호 가이드 열기",
"tryIt": "연결된 사서함으로 테스트 이메일을 보내세요.",
"summary": "이메일은 IMAP으로 읽고 SMTP로 답장합니다. 전용 사서함을 사용하고 활성화 전에 동의하세요.",
"steps": [
"전용 사서함을 만들고 필요하면 앱 비밀번호를 생성하세요.",
"제공업체 프리셋을 선택하거나 IMAP 및 SMTP 설정을 직접 입력하세요.",
"동의하고 저장한 뒤 이메일을 활성화하고 테스트 메시지를 보내세요."
],
"presetLabel": "빠른 입력",
"sections": {
"receiving": "메일 수신",
"sending": "메일 발신"
},
"presets": {
"gmail": "Gmail",
"outlook": "Outlook",
"icloud": "iCloud",
"custom": "사용자 지정"
"icloud": "iCloud"
},
"fields": {
"consentGranted": {
"label": "nanobot의 이메일 읽기 및 보내기 허용",
"help": "켜면 nanobot이 이 사서함에 접근할 수 있습니다. 봇 전용 사서함이 맞는지 확인하세요.",
"choices": {
"true": "동의함",
"false": "동의하지 않음"
@@ -37,8 +31,7 @@
},
"imapPassword": {
"label": "IMAP 비밀번호",
"placeholder": "앱 비밀번호",
"help": "메일 제공업체가 요구하면 앱 비밀번호를 사용하세요."
"placeholder": "앱 비밀번호"
},
"smtpHost": {
"label": "SMTP 호스트",
@@ -50,8 +43,7 @@
},
"smtpPassword": {
"label": "SMTP 비밀번호",
"placeholder": "앱 비밀번호",
"help": "보통 IMAP과 같은 앱 비밀번호를 사용합니다."
"placeholder": "앱 비밀번호"
},
"imapPort": {
"label": "IMAP 포트",
@@ -71,8 +63,7 @@
},
"allowFrom": {
"label": "허용된 발신자",
"placeholder": "이메일 주소, 쉼표로 구분",
"help": "비워 두면 발신자가 먼저 페어링해야 합니다."
"placeholder": "이메일 주소, 쉼표로 구분"
},
"verifyDkim": {
"label": "DKIM 확인",
@@ -87,6 +78,83 @@
"true": "켜짐",
"false": "꺼짐"
}
},
"imapMailbox": {
"label": "IMAP 사서함"
},
"imapUseSsl": {
"label": "IMAP SSL",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"smtpUseTls": {
"label": "SMTP TLS",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"smtpUseSsl": {
"label": "SMTP SSL",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"autoReplyEnabled": {
"label": "자동 답장",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"markSeen": {
"label": "읽음으로 표시",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"postAction": {
"label": "처리 후",
"choices": {
"delete": "삭제",
"move": "이동"
}
},
"postActionMoveMailbox": {
"label": "사서함으로 이동"
},
"postActionExpunge": {
"label": "영구적으로 작업 적용",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"postActionIgnoreSkipped": {
"label": "건너뛴 메시지 무시",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"maxBodyChars": {
"label": "최대 몸체 길이"
},
"subjectPrefix": {
"label": "답장 제목 접두어"
},
"allowedAttachmentTypes": {
"label": "허용되는 첨부 파일 유형"
},
"maxAttachmentSize": {
"label": "최대 첨부 파일 크기"
},
"maxAttachmentsPerEmail": {
"label": "최대 첨부 파일"
}
}
}
+86 -18
View File
@@ -1,27 +1,21 @@
{
"displayName": "E-mail",
"description": "Permita que o nanobot receba e responda e-mails.",
"requirements": "Caixa IMAP, envio SMTP, senha de app e consentimento explícito",
"setup": {
"docsLabel": "Abrir guia de e-mail",
"officialLabel": "Abrir guia de senhas de app",
"tryIt": "Envie um e-mail de teste para a caixa conectada.",
"summary": "O nanobot lê e-mails por IMAP e responde por SMTP. Use uma caixa dedicada e autorize o acesso antes de ativar o canal.",
"steps": [
"Crie uma caixa dedicada e, quando necessário, uma senha de app.",
"Escolha um provedor ou informe IMAP e SMTP manualmente.",
"Autorize o acesso, salve e ative o canal de e-mail. Depois, envie uma mensagem de teste."
],
"presetLabel": "Preenchimento rápido",
"sections": {
"receiving": "Recebimento de e-mail",
"sending": "Envio de e-mail"
},
"presets": {
"gmail": "Gmail",
"outlook": "Outlook",
"icloud": "iCloud",
"custom": "Personalizado"
"icloud": "iCloud"
},
"fields": {
"consentGranted": {
"label": "Permitir que o nanobot leia e envie e-mails",
"help": "Ative para permitir o acesso a esta caixa de e-mail. Confirme que ela é dedicada ao bot.",
"choices": {
"true": "Concedido",
"false": "Não concedido"
@@ -37,8 +31,7 @@
},
"imapPassword": {
"label": "Senha IMAP",
"placeholder": "Senha de app",
"help": "Use uma senha de app quando o provedor exigir."
"placeholder": "Senha de app"
},
"smtpHost": {
"label": "Host SMTP",
@@ -50,8 +43,7 @@
},
"smtpPassword": {
"label": "Senha SMTP",
"placeholder": "Senha de app",
"help": "Normalmente é a mesma senha usada no IMAP."
"placeholder": "Senha de app"
},
"imapPort": {
"label": "Porta IMAP",
@@ -71,8 +63,7 @@
},
"allowFrom": {
"label": "Remetentes permitidos",
"placeholder": "E-mails separados por vírgulas",
"help": "Deixe vazio para exigir pareamento prévio."
"placeholder": "E-mails separados por vírgulas"
},
"verifyDkim": {
"label": "Verificar DKIM",
@@ -87,6 +78,83 @@
"true": "Ativado",
"false": "Desativado"
}
},
"imapMailbox": {
"label": "Caixa de correio IMAP"
},
"imapUseSsl": {
"label": "SSL IMAP",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"smtpUseTls": {
"label": "TLS SMTP",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"smtpUseSsl": {
"label": "SSL SMTP",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"autoReplyEnabled": {
"label": "Respostas automáticas",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"markSeen": {
"label": "Marcar como lido",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"postAction": {
"label": "Após o processamento",
"choices": {
"delete": "Excluir",
"move": "Mover"
}
},
"postActionMoveMailbox": {
"label": "Mover para caixa de correio"
},
"postActionExpunge": {
"label": "Aplicar ação permanentemente",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"postActionIgnoreSkipped": {
"label": "Ignorar mensagens ignoradas",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"maxBodyChars": {
"label": "Comprimento máximo do corpo"
},
"subjectPrefix": {
"label": "Prefixo do assunto da resposta"
},
"allowedAttachmentTypes": {
"label": "Tipos de anexos permitidos"
},
"maxAttachmentSize": {
"label": "Tamanho máximo do anexo"
},
"maxAttachmentsPerEmail": {
"label": "Máximo de anexos"
}
}
}
+86 -18
View File
@@ -1,27 +1,21 @@
{
"displayName": "Email",
"description": "Cho phép nanobot nhận và trả lời email.",
"requirements": "Hộp thư IMAP, gửi SMTP, mật khẩu ứng dụng và sự đồng ý rõ ràng",
"setup": {
"docsLabel": "Mở hướng dẫn Email",
"officialLabel": "Mở hướng dẫn mật khẩu ứng dụng",
"tryIt": "Gửi email thử đến hộp thư đã kết nối.",
"summary": "Email đọc thư qua IMAP và trả lời qua SMTP. Dùng hộp thư riêng và cấp quyền trước khi bật.",
"steps": [
"Tạo hộp thư riêng và mật khẩu ứng dụng nếu cần.",
"Chọn nhà cung cấp hoặc nhập thủ công cài đặt IMAP và SMTP.",
"Cấp quyền, lưu và bật Email, sau đó gửi tin nhắn thử."
],
"presetLabel": "Điền nhanh",
"sections": {
"receiving": "Nhận thư",
"sending": "Gửi thư"
},
"presets": {
"gmail": "Gmail",
"outlook": "Outlook",
"icloud": "iCloud",
"custom": "Tùy chỉnh"
"icloud": "iCloud"
},
"fields": {
"consentGranted": {
"label": "Cho phép nanobot đọc và gửi email",
"help": "Bật để cho phép nanobot truy cập hộp thư này. Hãy kiểm tra đây là hộp thư dành riêng cho bot.",
"choices": {
"true": "Đã đồng ý",
"false": "Chưa đồng ý"
@@ -37,8 +31,7 @@
},
"imapPassword": {
"label": "Mật khẩu IMAP",
"placeholder": "Mật khẩu ứng dụng",
"help": "Dùng mật khẩu ứng dụng khi nhà cung cấp yêu cầu."
"placeholder": "Mật khẩu ứng dụng"
},
"smtpHost": {
"label": "Máy chủ SMTP",
@@ -50,8 +43,7 @@
},
"smtpPassword": {
"label": "Mật khẩu SMTP",
"placeholder": "Mật khẩu ứng dụng",
"help": "Thường giống mật khẩu ứng dụng dùng cho IMAP."
"placeholder": "Mật khẩu ứng dụng"
},
"imapPort": {
"label": "Cổng IMAP",
@@ -71,8 +63,7 @@
},
"allowFrom": {
"label": "Người gửi được phép",
"placeholder": "Địa chỉ email, phân tách bằng dấu phẩy",
"help": "Để trống để yêu cầu ghép nối trước."
"placeholder": "Địa chỉ email, phân tách bằng dấu phẩy"
},
"verifyDkim": {
"label": "Xác minh DKIM",
@@ -87,6 +78,83 @@
"true": "Bật",
"false": "Tắt"
}
},
"imapMailbox": {
"label": "Hộp thư IMAP"
},
"imapUseSsl": {
"label": "SSL IMAP",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"smtpUseTls": {
"label": "TLS SMTP",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"smtpUseSsl": {
"label": "SSL SMTP",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"autoReplyEnabled": {
"label": "Trả lời tự động",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"markSeen": {
"label": "Đánh dấu là đã đọc",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"postAction": {
"label": "Sau khi xử lý",
"choices": {
"delete": "Xóa",
"move": "Di chuyển"
}
},
"postActionMoveMailbox": {
"label": "Di chuyển tới hộp thư"
},
"postActionExpunge": {
"label": "Áp dụng hành động vĩnh viễn",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"postActionIgnoreSkipped": {
"label": "Bỏ qua tin nhắn bị bỏ qua",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"maxBodyChars": {
"label": "Chiều dài cơ thể tối đa"
},
"subjectPrefix": {
"label": "Trả lời tiền tố chủ đề"
},
"allowedAttachmentTypes": {
"label": "Các loại tệp đính kèm được phép"
},
"maxAttachmentSize": {
"label": "Kích thước tệp đính kèm tối đa"
},
"maxAttachmentsPerEmail": {
"label": "Tệp đính kèm tối đa"
}
}
}
+86 -18
View File
@@ -1,26 +1,20 @@
{
"description": "让 nanobot 接收并回复电子邮件。",
"requirements": "IMAP 收件箱、SMTP 发件服务、应用专用密码和明确授权",
"setup": {
"docsLabel": "打开邮件配置指南",
"officialLabel": "打开应用专用密码指南",
"tryIt": "向已连接的邮箱发送一封测试邮件。",
"summary": "邮件渠道通过 IMAP 读取邮件并通过 SMTP 回复。请使用专用邮箱,并在启用前明确授权。",
"steps": [
"创建专用邮箱,并在服务商要求时创建应用专用密码。",
"选择服务商预设,或手动填写 IMAP 和 SMTP 设置。",
"授予授权,保存并启用邮件渠道,然后向邮箱发送一封测试邮件。"
],
"presetLabel": "快速填充",
"sections": {
"receiving": "接收邮件",
"sending": "发送邮件"
},
"presets": {
"gmail": "Gmail",
"outlook": "Outlook",
"icloud": "iCloud",
"custom": "自定义"
"icloud": "iCloud"
},
"fields": {
"consentGranted": {
"label": "允许 nanobot 读取和发送邮件",
"help": "开启即表示同意 nanobot 访问此邮箱。请确认这是你要连接的机器人专用邮箱。",
"choices": {
"true": "已授权",
"false": "未授权"
@@ -36,8 +30,7 @@
},
"imapPassword": {
"label": "IMAP 密码",
"placeholder": "应用专用密码",
"help": "如果邮件服务商要求,请使用应用专用密码。"
"placeholder": "应用专用密码"
},
"smtpHost": {
"label": "SMTP 主机",
@@ -49,8 +42,7 @@
},
"smtpPassword": {
"label": "SMTP 密码",
"placeholder": "应用专用密码",
"help": "通常与 IMAP 使用同一个应用专用密码。"
"placeholder": "应用专用密码"
},
"imapPort": {
"label": "IMAP 端口",
@@ -70,8 +62,7 @@
},
"allowFrom": {
"label": "允许的发件人",
"placeholder": "邮箱地址,用逗号分隔",
"help": "留空则要求发件人先完成配对。"
"placeholder": "邮箱地址,用逗号分隔"
},
"verifyDkim": {
"label": "验证 DKIM",
@@ -86,6 +77,83 @@
"true": "开启",
"false": "关闭"
}
},
"imapMailbox": {
"label": "IMAP 邮箱"
},
"imapUseSsl": {
"label": "IMAP SSL",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"smtpUseTls": {
"label": "SMTP TLS",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"smtpUseSsl": {
"label": "SMTP SSL",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"autoReplyEnabled": {
"label": "自动回复",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"markSeen": {
"label": "标为已读",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"postAction": {
"label": "处理后",
"choices": {
"delete": "删除",
"move": "移动"
}
},
"postActionMoveMailbox": {
"label": "移至邮箱"
},
"postActionExpunge": {
"label": "永久执行操作",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"postActionIgnoreSkipped": {
"label": "忽略未处理邮件",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"maxBodyChars": {
"label": "正文长度上限"
},
"subjectPrefix": {
"label": "回复主题前缀"
},
"allowedAttachmentTypes": {
"label": "允许的附件类型"
},
"maxAttachmentSize": {
"label": "附件大小上限"
},
"maxAttachmentsPerEmail": {
"label": "附件数量上限"
}
}
},
+86 -18
View File
@@ -1,27 +1,21 @@
{
"displayName": "電子郵件",
"description": "讓 nanobot 接收並回覆電子郵件。",
"requirements": "IMAP 收件匣、SMTP 寄件服務、應用程式密碼和明確授權",
"setup": {
"docsLabel": "開啟郵件設定指南",
"officialLabel": "開啟應用程式密碼指南",
"tryIt": "向已連接的信箱傳送一封測試郵件。",
"summary": "郵件管道透過 IMAP 讀取郵件並透過 SMTP 回覆。請使用專用信箱,並在啟用前明確授權。",
"steps": [
"建立專用信箱,並在服務商要求時建立應用程式密碼。",
"選擇服務商預設,或手動填入 IMAP 和 SMTP 設定。",
"授予權限,儲存並啟用郵件管道,然後向信箱傳送一封測試郵件。"
],
"presetLabel": "快速填入",
"sections": {
"receiving": "接收郵件",
"sending": "傳送郵件"
},
"presets": {
"gmail": "Gmail",
"outlook": "Outlook",
"icloud": "iCloud",
"custom": "自訂"
"icloud": "iCloud"
},
"fields": {
"consentGranted": {
"label": "允許 nanobot 讀取及傳送電子郵件",
"help": "開啟即表示同意 nanobot 存取此信箱。請確認這是要提供給機器人使用的專用信箱。",
"choices": {
"true": "已授權",
"false": "未授權"
@@ -37,8 +31,7 @@
},
"imapPassword": {
"label": "IMAP 密碼",
"placeholder": "應用程式密碼",
"help": "若郵件服務商要求,請使用應用程式密碼。"
"placeholder": "應用程式密碼"
},
"smtpHost": {
"label": "SMTP 主機",
@@ -50,8 +43,7 @@
},
"smtpPassword": {
"label": "SMTP 密碼",
"placeholder": "應用程式密碼",
"help": "通常與 IMAP 使用同一個應用程式密碼。"
"placeholder": "應用程式密碼"
},
"imapPort": {
"label": "IMAP 連接埠",
@@ -71,8 +63,7 @@
},
"allowFrom": {
"label": "允許的寄件者",
"placeholder": "電子郵件地址,以逗號分隔",
"help": "留空則要求寄件者先完成配對。"
"placeholder": "電子郵件地址,以逗號分隔"
},
"verifyDkim": {
"label": "驗證 DKIM",
@@ -87,6 +78,83 @@
"true": "開啟",
"false": "關閉"
}
},
"imapMailbox": {
"label": "IMAP 信箱"
},
"imapUseSsl": {
"label": "IMAP SSL",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"smtpUseTls": {
"label": "SMTP TLS",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"smtpUseSsl": {
"label": "SMTP SSL",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"autoReplyEnabled": {
"label": "自動回覆",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"markSeen": {
"label": "標為已讀",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"postAction": {
"label": "處理後",
"choices": {
"delete": "刪除",
"move": "移動"
}
},
"postActionMoveMailbox": {
"label": "移至信箱"
},
"postActionExpunge": {
"label": "永久執行操作",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"postActionIgnoreSkipped": {
"label": "忽略未處理郵件",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"maxBodyChars": {
"label": "正文長度上限"
},
"subjectPrefix": {
"label": "回覆主題前綴"
},
"allowedAttachmentTypes": {
"label": "允許的附件類型"
},
"maxAttachmentSize": {
"label": "附件大小上限"
},
"maxAttachmentsPerEmail": {
"label": "附件數量上限"
}
}
}
+10
View File
@@ -24,6 +24,16 @@ SETUP_SPEC = ChannelSetupSpec(
),
"allowFrom": field("list", snapshot=False),
"topicIsolation": field("bool", default=True, snapshot=False),
"name": field(default="nanobot", snapshot=False),
"encryptKey": field("secret", snapshot=False),
"verificationToken": field("secret", snapshot=False),
"reactEmoji": field(default="THUMBSUP", snapshot=False),
"doneEmoji": field(snapshot=False),
"toolHintPrefix": field(default="🔧", snapshot=False),
"replyToMessage": field("bool", default=False, snapshot=False),
"streaming": field("bool", default=True, snapshot=False),
"instanceId": field(writable=False, snapshot=False),
"identityKey": field(writable=False, snapshot=False),
},
required=required_fields("appId", "appSecret"),
official_url="https://open.feishu.cn/app",
@@ -1,29 +1,20 @@
import { useState } from "react";
import { Loader2, RotateCcw } from "lucide-react";
import { useTranslation } from "react-i18next";
import {
channelTranslator,
type ChannelTranslator,
} from "@/channel-plugins/i18n";
import type { ChannelPluginPanelProps } from "@/channel-plugins/types";
import { ChannelInstancesPanel } from "@/components/settings/channels/ChannelInstancesPanel";
import { Button } from "@/components/ui/button";
import { enableNanobotFeature } from "@/lib/api";
import type {
NanobotChannelInstanceInfo,
NanobotFeatureInfo,
NanobotFeaturesPayload,
} from "@/lib/types";
import { useClient } from "@/providers/ClientProvider";
import { FeishuConnectFlow } from "./FeishuConnectFlow";
export function FeishuAssistantsPanel({
token,
feature,
showBrandLogos,
chatAppsDocsUrl,
onFeaturesUpdate,
}: ChannelPluginPanelProps) {
const { t } = useTranslation();
@@ -36,122 +27,30 @@ export function FeishuAssistantsPanel({
<ChannelInstancesPanel
feature={feature}
showBrandLogos={showBrandLogos}
chatAppsDocsUrl={chatAppsDocsUrl}
instances={instances}
onFeaturesUpdate={onFeaturesUpdate}
customization={{
countLabel: (count) => feishuAssistantCountLabel(count, tx),
toggleAriaLabel: (instance) => tx("custom.toggleAssistant", "{{name}} assistant", {
name: instanceDisplayName(instance),
}),
configuredLabel: tx("custom.configured", "Connected"),
needsSetupLabel: tx("custom.needsSetup", "Needs authorization"),
renderInstanceSummary: (instance) => (
maskFeishuAppId(instance.config_values?.["channels.feishu.appId"])
|| tx("custom.noAppId", "No App ID")
),
renderInstanceAction: (instance) => (
<FeishuInstanceAction
renderInstanceSummary: () => null,
renderInstanceAction: (instance) => instance.configured ? null : (
<FeishuConnectFlow
key={instance.id}
token={token}
instance={instance}
instanceId={instance.id}
mode="replace"
idleLabel={t("settings.channels.connect", { defaultValue: "Connect" })}
onFeaturesUpdate={onFeaturesUpdate}
/>
),
footer: (
<div className="mt-4 overflow-hidden rounded-floating border border-border/70 bg-background px-4 py-4">
<div className="text-[13px] font-semibold text-foreground">
{tx("custom.createAnother", "Create another assistant")}
</div>
<p className="mt-1 text-[12.5px] leading-5 text-muted-foreground">
{tx(
"custom.createHint",
"Create a separate Feishu bot for another team, space, or workflow.",
)}
</p>
<FeishuConnectFlow
token={token}
instanceId="default"
mode="create"
idleLabel={tx("custom.createAssistant", "Create assistant")}
onFeaturesUpdate={onFeaturesUpdate}
/>
</div>
),
}}
/>
);
}
function FeishuInstanceAction({
token,
instance,
onFeaturesUpdate,
}: {
token: string;
instance: NanobotChannelInstanceInfo;
onFeaturesUpdate: (payload: NanobotFeaturesPayload) => void;
}) {
const { client } = useClient();
const { t } = useTranslation();
const tx = channelTranslator(t, "feishu");
const [busy, setBusy] = useState(false);
const [error, setError] = useState<string | null>(null);
if (!instance.configured) {
return (
<FeishuConnectFlow
token={token}
instanceId={instance.id}
mode="replace"
idleLabel={t("settings.channels.connect", { defaultValue: "Connect" })}
onFeaturesUpdate={onFeaturesUpdate}
/>
);
}
const reconnect = async () => {
setBusy(true);
setError(null);
try {
onFeaturesUpdate(
await enableNanobotFeature(client, "feishu", { instanceId: instance.id }),
);
} catch (err) {
setError((err as Error).message);
} finally {
setBusy(false);
}
};
return (
<>
<div className="mt-3 flex justify-end">
<Button
type="button"
size="sm"
variant="outline"
className="h-8 rounded-full border-border/65 bg-background/80 px-3 text-[12px] font-semibold hover:bg-muted/70"
onClick={() => void reconnect()}
disabled={busy || !instance.enabled}
>
{busy ? (
<Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" aria-hidden />
) : (
<RotateCcw className="mr-1.5 h-3.5 w-3.5" aria-hidden />
)}
{tx("custom.reconnect", "Reconnect")}
</Button>
</div>
{error ? (
<div className="mt-3 rounded-control border border-destructive/20 px-3 py-2 text-[12px] leading-5 text-destructive">
{error}
</div>
) : null}
</>
);
}
function defaultFeishuInstance(feature: NanobotFeatureInfo): NanobotChannelInstanceInfo {
return {
id: "default",
@@ -163,21 +62,6 @@ function defaultFeishuInstance(feature: NanobotFeatureInfo): NanobotChannelInsta
};
}
function feishuAssistantCountLabel(
count: number,
tx: ChannelTranslator,
): string {
if (count === 0) return tx("custom.countNone", "No assistant connected");
if (count === 1) return tx("custom.countOne", "1 assistant connected");
return tx("custom.countMany", "{{count}} assistants connected", { count });
}
function instanceDisplayName(instance: NanobotChannelInstanceInfo): string {
return instance.display_name?.trim() || instance.name.trim() || instance.id;
}
function maskFeishuAppId(appId: string | undefined): string {
if (!appId) return "";
if (appId.length <= 10) return appId;
return `${appId.slice(0, 7)}...${appId.slice(-4)}`;
}
@@ -25,7 +25,7 @@ export function FeishuConnectFlow({
<ChannelQrConnectFlow
token={token}
channelName="feishu"
startOptions={{ domain: "feishu", instanceId, mode }}
startParams={{ domain: "feishu", instance_id: instanceId, mode }}
idleLabel={idleLabel}
connectRequestId={connectRequestId}
onFeaturesUpdate={onFeaturesUpdate}
+1 -2
View File
@@ -15,14 +15,13 @@ export default {
lark: {
displayName: "Lark",
initials: "LK",
logoUrl: "https://www.larksuite.com/favicon.ico",
},
},
presentation: {
logoUrl: "https://www.larksuite.com/favicon.ico",
displayName: "Feishu",
initials: "FS",
color: "#3370FF",
logoUrl: "https://www.feishu.cn/favicon.ico",
setup: {
mode: "connect",
command: "nanobot channels login feishu",
+33 -19
View File
@@ -1,17 +1,8 @@
{
"description": "Use nanobot from Feishu chats and groups.",
"requirements": "Feishu app credentials, event subscription, gateway",
"setup": {
"primaryAction": "Connect with Feishu",
"docsLabel": "Open Feishu setup",
"officialLabel": "Open Feishu console",
"tryIt": "Send a DM or mention the Feishu assistant in a group.",
"summary": "Connect creates or links a Feishu app by QR code, then saves the app credentials for nanobot.",
"steps": [
"Click Connect and scan the QR code with Feishu or Lark on your phone.",
"Approve the app connection. nanobot saves the App ID and Secret automatically.",
"Send the bot a direct message or mention it in a Feishu group to test it."
],
"fields": {
"appId": {
"label": "App ID",
@@ -19,8 +10,7 @@
},
"appSecret": {
"label": "App Secret",
"placeholder": "Leave blank to keep current secret",
"help": "Paste a new App Secret only when rotating credentials."
"placeholder": "Leave blank to keep current secret"
},
"domain": {
"label": "Region",
@@ -47,6 +37,38 @@
"true": "Separate session for each topic",
"false": "One shared session for the group"
}
},
"name": {
"label": "Account name"
},
"encryptKey": {
"label": "Encryption key"
},
"verificationToken": {
"label": "Verification token"
},
"reactEmoji": {
"label": "Read emoji"
},
"doneEmoji": {
"label": "Done emoji"
},
"toolHintPrefix": {
"label": "Tool hint prefix"
},
"replyToMessage": {
"label": "Reply to message",
"choices": {
"true": "On",
"false": "Off"
}
},
"streaming": {
"label": "Streaming",
"choices": {
"true": "On",
"false": "Off"
}
}
}
},
@@ -54,14 +76,6 @@
"toggleAssistant": "{{name}} assistant",
"configured": "Connected",
"needsSetup": "Needs authorization",
"noAppId": "No App ID",
"createAnother": "Create another assistant",
"createHint": "Create a separate Feishu bot for another team, space, or workflow.",
"createAssistant": "Create assistant",
"reconnect": "Reconnect",
"countNone": "No assistant connected",
"countOne": "1 assistant connected",
"countMany": "{{count}} assistants connected",
"qrAlt": "Feishu connection QR code",
"scanTitle": "Scan with Feishu",
"scanDescription": "Use Feishu or Lark on your phone to scan this code. nanobot will finish setup automatically after authorization.",
+33 -19
View File
@@ -1,17 +1,8 @@
{
"description": "Usa nanobot en chats y grupos de Feishu.",
"requirements": "Credenciales de Feishu, suscripción a eventos y pasarela",
"setup": {
"primaryAction": "Conectar Feishu",
"docsLabel": "Abrir guía de Feishu",
"officialLabel": "Abrir consola de Feishu",
"tryIt": "Envía un DM o menciona al asistente en un grupo.",
"summary": "La conexión crea o vincula una app de Feishu por QR y guarda sus credenciales.",
"steps": [
"Haz clic en Conectar y escanea el QR con Feishu o Lark.",
"Aprueba la conexión. nanobot guarda el App ID y el Secret automáticamente.",
"Envía un DM al bot o menciónalo en un grupo de Feishu."
],
"fields": {
"appId": {
"label": "App ID",
@@ -19,8 +10,7 @@
},
"appSecret": {
"label": "App Secret",
"placeholder": "Déjalo vacío para conservar el secreto",
"help": "Pega un nuevo secreto solo si quieres sustituir el que está guardado."
"placeholder": "Déjalo vacío para conservar el secreto"
},
"domain": {
"label": "Región",
@@ -47,6 +37,38 @@
"true": "Una sesión separada por tema",
"false": "Una sesión compartida para el grupo"
}
},
"name": {
"label": "Nombre de cuenta"
},
"encryptKey": {
"label": "Clave de cifrado"
},
"verificationToken": {
"label": "Token de verificación"
},
"reactEmoji": {
"label": "Leer emojis"
},
"doneEmoji": {
"label": "emoji hecho"
},
"toolHintPrefix": {
"label": "Prefijo de sugerencia de herramienta"
},
"replyToMessage": {
"label": "Responder al mensaje",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"streaming": {
"label": "Transmisión",
"choices": {
"true": "encendido",
"false": "Apagado"
}
}
}
},
@@ -54,14 +76,6 @@
"toggleAssistant": "Activar el asistente {{name}}",
"configured": "Conectado",
"needsSetup": "Necesita autorización",
"noAppId": "Sin App ID",
"createAnother": "Crear otro asistente",
"createHint": "Crea un bot de Feishu independiente para otro equipo, espacio o flujo de trabajo.",
"createAssistant": "Crear asistente",
"reconnect": "Reconectar",
"countNone": "Ningún asistente conectado",
"countOne": "1 asistente conectado",
"countMany": "{{count}} asistentes conectados",
"qrAlt": "Código QR de conexión de Feishu",
"scanTitle": "Escanea con Feishu",
"scanDescription": "Escanea con Feishu o Lark en tu teléfono. nanobot completará la configuración tras la autorización.",
+33 -19
View File
@@ -1,17 +1,8 @@
{
"description": "Utilisez nanobot dans les conversations et groupes Feishu.",
"requirements": "Identifiants Feishu, abonnement aux événements et passerelle",
"setup": {
"primaryAction": "Connecter Feishu",
"docsLabel": "Ouvrir le guide Feishu",
"officialLabel": "Ouvrir la console Feishu",
"tryIt": "Envoyez un message privé ou mentionnez l’assistant dans un groupe.",
"summary": "La connexion crée ou associe une application Feishu par QR code et enregistre ses identifiants.",
"steps": [
"Cliquez sur Connecter et scannez le QR code avec Feishu ou Lark.",
"Approuvez la connexion. nanobot enregistre automatiquement l’App ID et le Secret.",
"Envoyez un message privé au bot ou mentionnez-le dans un groupe Feishu."
],
"fields": {
"appId": {
"label": "App ID",
@@ -19,8 +10,7 @@
},
"appSecret": {
"label": "App Secret",
"placeholder": "Laisser vide pour conserver le secret",
"help": "Collez un nouveau secret uniquement pour remplacer celui qui est enregistré."
"placeholder": "Laisser vide pour conserver le secret"
},
"domain": {
"label": "Région",
@@ -47,6 +37,38 @@
"true": "Une session séparée par sujet",
"false": "Une session partagée pour le groupe"
}
},
"name": {
"label": "Nom du compte"
},
"encryptKey": {
"label": "Clé de chiffrement"
},
"verificationToken": {
"label": "Jeton de vérification"
},
"reactEmoji": {
"label": "Lire les emoji"
},
"doneEmoji": {
"label": "Terminé emoji"
},
"toolHintPrefix": {
"label": "Préfixe d'indice d'outil"
},
"replyToMessage": {
"label": "Répondre au message",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"streaming": {
"label": "Diffusion en continu",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
}
}
},
@@ -54,14 +76,6 @@
"toggleAssistant": "Activer l’assistant {{name}}",
"configured": "Connecté",
"needsSetup": "Autorisation requise",
"noAppId": "Aucun App ID",
"createAnother": "Créer un autre assistant",
"createHint": "Créez un bot Feishu distinct pour une autre équipe, un autre espace ou un autre usage.",
"createAssistant": "Créer l’assistant",
"reconnect": "Reconnecter",
"countNone": "Aucun assistant connecté",
"countOne": "1 assistant connecté",
"countMany": "{{count}} assistants connectés",
"qrAlt": "QR code de connexion Feishu",
"scanTitle": "Scanner avec Feishu",
"scanDescription": "Utilisez Feishu ou Lark sur votre téléphone pour scanner ce code. nanobot terminera la configuration après autorisation.",
+33 -19
View File
@@ -1,17 +1,8 @@
{
"description": "Gunakan nanobot dari chat dan grup Feishu.",
"requirements": "Kredensial Feishu, langganan event, dan gateway",
"setup": {
"primaryAction": "Hubungkan Feishu",
"docsLabel": "Buka panduan Feishu",
"officialLabel": "Buka konsol Feishu",
"tryIt": "Kirim DM atau sebut asisten di grup.",
"summary": "Koneksi membuat atau menautkan aplikasi Feishu lewat QR dan menyimpan kredensialnya.",
"steps": [
"Klik Hubungkan dan pindai QR dengan Feishu atau Lark.",
"Setujui koneksi. nanobot menyimpan App ID dan Secret otomatis.",
"Kirim DM ke bot atau sebut di grup Feishu."
],
"fields": {
"appId": {
"label": "App ID",
@@ -19,8 +10,7 @@
},
"appSecret": {
"label": "App Secret",
"placeholder": "Kosongkan untuk mempertahankan secret",
"help": "Masukkan App Secret baru hanya untuk mengganti nilai yang tersimpan."
"placeholder": "Kosongkan untuk mempertahankan secret"
},
"domain": {
"label": "Wilayah",
@@ -47,6 +37,38 @@
"true": "Sesi terpisah untuk setiap topik",
"false": "Satu sesi bersama untuk grup"
}
},
"name": {
"label": "Nama akun"
},
"encryptKey": {
"label": "Kunci enkripsi"
},
"verificationToken": {
"label": "Token verifikasi"
},
"reactEmoji": {
"label": "Baca emoji"
},
"doneEmoji": {
"label": "Selesai emoji"
},
"toolHintPrefix": {
"label": "Awalan petunjuk alat"
},
"replyToMessage": {
"label": "Membalas pesan",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"streaming": {
"label": "Streaming",
"choices": {
"true": "Aktif",
"false": "Mati"
}
}
}
},
@@ -54,14 +76,6 @@
"toggleAssistant": "Aktifkan asisten {{name}}",
"configured": "Terhubung",
"needsSetup": "Perlu otorisasi",
"noAppId": "Tidak ada App ID",
"createAnother": "Buat asisten lain",
"createHint": "Buat bot Feishu terpisah untuk tim atau alur kerja lain.",
"createAssistant": "Buat asisten",
"reconnect": "Hubungkan ulang",
"countNone": "Belum ada asisten terhubung",
"countOne": "1 asisten terhubung",
"countMany": "{{count}} asisten terhubung",
"qrAlt": "Kode QR koneksi Feishu",
"scanTitle": "Pindai dengan Feishu",
"scanDescription": "Pindai kode ini dengan Feishu atau Lark di ponsel. nanobot akan menyelesaikan penyiapan setelah Anda menyetujui akses.",
+33 -19
View File
@@ -1,17 +1,8 @@
{
"description": "Feishu のチャットとグループから nanobot を利用します。",
"requirements": "Feishu アプリ認証情報、イベント購読、ゲートウェイ",
"setup": {
"primaryAction": "Feishu に接続",
"docsLabel": "Feishu 設定ガイドを開く",
"officialLabel": "Feishu コンソールを開く",
"tryIt": "DM を送るか、グループで Feishu アシスタントをメンションします。",
"summary": "QR コードで Feishu アプリを作成または連携し、認証情報を自動保存します。",
"steps": [
"接続をクリックし、スマートフォンの Feishu または Lark で QR コードを読み取ります。",
"アプリ接続を承認すると、nanobot が App ID と Secret を保存します。",
"ボットに DM を送るか Feishu グループでメンションします。"
],
"fields": {
"appId": {
"label": "App ID",
@@ -19,8 +10,7 @@
},
"appSecret": {
"label": "App Secret",
"placeholder": "現在のシークレットを保持するには空欄",
"help": "認証情報を更新するときだけ新しい App Secret を貼り付けます。"
"placeholder": "現在のシークレットを保持するには空欄"
},
"domain": {
"label": "地域",
@@ -47,6 +37,38 @@
"true": "トピックごとにセッションを分離",
"false": "グループでセッションを共有"
}
},
"name": {
"label": "アカウント名"
},
"encryptKey": {
"label": "暗号化キー"
},
"verificationToken": {
"label": "検証トークン"
},
"reactEmoji": {
"label": "絵文字を読む"
},
"doneEmoji": {
"label": "完了絵文字"
},
"toolHintPrefix": {
"label": "ツールヒントの接頭辞"
},
"replyToMessage": {
"label": "メッセージに返信する",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"streaming": {
"label": "ストリーミング",
"choices": {
"true": "オン",
"false": "オフ"
}
}
}
},
@@ -54,14 +76,6 @@
"toggleAssistant": "アシスタント {{name}} を有効にする",
"configured": "接続済み",
"needsSetup": "認可が必要",
"noAppId": "App ID なし",
"createAnother": "別のアシスタントを作成",
"createHint": "別のチームやワークフロー用に独立した Feishu ボットを作成します。",
"createAssistant": "アシスタントを作成",
"reconnect": "再接続",
"countNone": "接続済みアシスタントなし",
"countOne": "接続済みアシスタント:1 件",
"countMany": "接続済みアシスタント:{{count}} 件",
"qrAlt": "Feishu 接続 QR コード",
"scanTitle": "Feishu でスキャン",
"scanDescription": "スマートフォンの Feishu または Lark でスキャンしてください。認可後に nanobot が設定を完了します。",
+33 -19
View File
@@ -1,17 +1,8 @@
{
"description": "Feishu 채팅과 그룹에서 nanobot을 사용합니다.",
"requirements": "Feishu 앱 인증 정보, 이벤트 구독 및 게이트웨이",
"setup": {
"primaryAction": "Feishu 연결",
"docsLabel": "Feishu 설정 가이드 열기",
"officialLabel": "Feishu 콘솔 열기",
"tryIt": "DM을 보내거나 그룹에서 Feishu 어시스턴트를 멘션하세요.",
"summary": "QR 코드로 Feishu 앱을 만들거나 연결하고 인증 정보을 자동 저장합니다.",
"steps": [
"연결을 클릭하고 휴대폰의 Feishu 또는 Lark로 QR 코드를 스캔하세요.",
"앱 연결을 승인하면 nanobot이 App ID와 Secret을 자동 저장합니다.",
"봇에 DM을 보내거나 Feishu 그룹에서 멘션하세요."
],
"fields": {
"appId": {
"label": "App ID",
@@ -19,8 +10,7 @@
},
"appSecret": {
"label": "App Secret",
"placeholder": "현재 Secret을 유지하려면 비워 두세요",
"help": "인증 정보을 교체할 때만 새 App Secret을 붙여 넣으세요."
"placeholder": "현재 Secret을 유지하려면 비워 두세요"
},
"domain": {
"label": "지역",
@@ -47,6 +37,38 @@
"true": "주제별로 세션 분리",
"false": "그룹에서 하나의 세션 공유"
}
},
"name": {
"label": "계정 이름"
},
"encryptKey": {
"label": "암호화 키"
},
"verificationToken": {
"label": "인증 토큰"
},
"reactEmoji": {
"label": "이모티콘 읽기"
},
"doneEmoji": {
"label": "이모티콘 완료"
},
"toolHintPrefix": {
"label": "도구 힌트 접두사"
},
"replyToMessage": {
"label": "메시지에 답장하기",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"streaming": {
"label": "스트리밍",
"choices": {
"true": "켜기",
"false": "끄기"
}
}
}
},
@@ -54,14 +76,6 @@
"toggleAssistant": "{{name}} 어시스턴트 활성화",
"configured": "연결됨",
"needsSetup": "인증 필요",
"noAppId": "App ID 없음",
"createAnother": "다른 어시스턴트 만들기",
"createHint": "다른 팀이나 워크플로를 위한 별도 Feishu 봇을 만드세요.",
"createAssistant": "어시스턴트 만들기",
"reconnect": "다시 연결",
"countNone": "연결된 어시스턴트 없음",
"countOne": "어시스턴트 1개 연결됨",
"countMany": "어시스턴트 {{count}}개 연결됨",
"qrAlt": "Feishu 연결 QR 코드",
"scanTitle": "Feishu로 스캔",
"scanDescription": "휴대폰의 Feishu 또는 Lark로 스캔하세요. 승인 후 nanobot이 설정을 완료합니다.",
@@ -1,17 +1,8 @@
{
"description": "Use o nanobot em conversas e grupos do Feishu.",
"requirements": "Credenciais do Feishu, assinatura de eventos e gateway",
"setup": {
"primaryAction": "Conectar Feishu",
"docsLabel": "Abrir guia do Feishu",
"officialLabel": "Abrir console do Feishu",
"tryIt": "Envie uma DM ou mencione o assistente em um grupo.",
"summary": "A conexão cria ou vincula um app Feishu por QR e salva as credenciais.",
"steps": [
"Clique em Conectar e escaneie o QR com Feishu ou Lark.",
"Aprove a conexão. O nanobot salva App ID e Secret automaticamente.",
"Envie uma DM ao bot ou mencione-o em um grupo Feishu."
],
"fields": {
"appId": {
"label": "App ID",
@@ -19,8 +10,7 @@
},
"appSecret": {
"label": "App Secret",
"placeholder": "Deixe vazio para manter o segredo",
"help": "Cole um novo apenas ao trocar credenciais."
"placeholder": "Deixe vazio para manter o segredo"
},
"domain": {
"label": "Região",
@@ -47,6 +37,38 @@
"true": "Uma sessão separada por tópico",
"false": "Uma sessão compartilhada para o grupo"
}
},
"name": {
"label": "Nome da conta"
},
"encryptKey": {
"label": "Chave de criptografia"
},
"verificationToken": {
"label": "Token de verificação"
},
"reactEmoji": {
"label": "Ler emoticons"
},
"doneEmoji": {
"label": "Emoji pronto"
},
"toolHintPrefix": {
"label": "Prefixo de dica de ferramenta"
},
"replyToMessage": {
"label": "Responder à mensagem",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"streaming": {
"label": "Transmissão",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
}
}
},
@@ -54,14 +76,6 @@
"toggleAssistant": "Ativar assistente {{name}}",
"configured": "Conectado",
"needsSetup": "Precisa de autorização",
"noAppId": "Sem App ID",
"createAnother": "Criar outro assistente",
"createHint": "Crie um bot Feishu separado para outra equipe, espaço ou fluxo de trabalho.",
"createAssistant": "Criar assistente",
"reconnect": "Reconectar",
"countNone": "Nenhum assistente conectado",
"countOne": "1 assistente conectado",
"countMany": "{{count}} assistentes conectados",
"qrAlt": "QR code de conexão do Feishu",
"scanTitle": "Escaneie com o Feishu",
"scanDescription": "Escaneie com Feishu ou Lark no celular. O nanobot concluirá a configuração após a autorização.",
+33 -19
View File
@@ -1,17 +1,8 @@
{
"description": "Sử dụng nanobot trong cuộc trò chuyện và nhóm Feishu.",
"requirements": "Thông tin xác thực Feishu, đăng ký sự kiện và gateway",
"setup": {
"primaryAction": "Kết nối Feishu",
"docsLabel": "Mở hướng dẫn Feishu",
"officialLabel": "Mở bảng điều khiển Feishu",
"tryIt": "Gửi tin nhắn riêng hoặc nhắc trợ lý trong nhóm.",
"summary": "Kết nối tạo hoặc liên kết ứng dụng Feishu bằng QR và lưu thông tin xác thực.",
"steps": [
"Nhấn Kết nối và quét QR bằng Feishu hoặc Lark.",
"Phê duyệt kết nối. nanobot tự lưu App ID và Secret.",
"Gửi tin nhắn riêng cho bot hoặc nhắc bot trong nhóm Feishu."
],
"fields": {
"appId": {
"label": "App ID",
@@ -19,8 +10,7 @@
},
"appSecret": {
"label": "App Secret",
"placeholder": "Để trống để giữ khóa hiện tại",
"help": "Chỉ nhập App Secret mới khi muốn thay thế giá trị đã lưu."
"placeholder": "Để trống để giữ khóa hiện tại"
},
"domain": {
"label": "Khu vực",
@@ -47,6 +37,38 @@
"true": "Phiên riêng cho từng chủ đề",
"false": "Dùng chung một phiên cho nhóm"
}
},
"name": {
"label": "Tên tài khoản"
},
"encryptKey": {
"label": "Khóa mã hóa"
},
"verificationToken": {
"label": "Mã thông báo xác minh"
},
"reactEmoji": {
"label": "Đọc biểu tượng cảm xúc"
},
"doneEmoji": {
"label": "biểu tượng cảm xúc xong"
},
"toolHintPrefix": {
"label": "Tiền tố gợi ý công cụ"
},
"replyToMessage": {
"label": "Trả lời tin nhắn",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"streaming": {
"label": "Truyền phát",
"choices": {
"true": "Bật",
"false": "Tắt"
}
}
}
},
@@ -54,14 +76,6 @@
"toggleAssistant": "Bật trợ lý {{name}}",
"configured": "Đã kết nối",
"needsSetup": "Cần cấp quyền",
"noAppId": "Không có App ID",
"createAnother": "Tạo trợ lý khác",
"createHint": "Tạo bot Feishu riêng cho nhóm hoặc quy trình khác.",
"createAssistant": "Tạo trợ lý",
"reconnect": "Kết nối lại",
"countNone": "Chưa kết nối trợ lý",
"countOne": "Đã kết nối 1 trợ lý",
"countMany": "Đã kết nối {{count}} trợ lý",
"qrAlt": "Mã QR kết nối Feishu",
"scanTitle": "Quét bằng Feishu",
"scanDescription": "Quét bằng Feishu hoặc Lark trên điện thoại. nanobot sẽ hoàn tất cấu hình sau khi cấp quyền.",
@@ -1,18 +1,9 @@
{
"displayName": "飞书",
"description": "在飞书会话和群组中使用 nanobot。",
"requirements": "飞书应用凭据、事件订阅和网关",
"setup": {
"primaryAction": "连接飞书",
"docsLabel": "打开飞书配置指南",
"officialLabel": "打开飞书开发者后台",
"tryIt": "向飞书助手发送私信,或在群组中提及它。",
"summary": "连接流程会通过二维码创建或关联飞书应用,并自动为 nanobot 保存应用凭据。",
"steps": [
"点击连接,用手机飞书或 Lark 扫描二维码。",
"批准应用连接,nanobot 会自动保存 App ID 和 Secret。",
"向机器人发送私信,或在飞书群中提及它以完成测试。"
],
"fields": {
"appId": {
"label": "App ID",
@@ -20,8 +11,7 @@
},
"appSecret": {
"label": "App Secret",
"placeholder": "留空以保留现有密钥",
"help": "仅在轮换凭据时粘贴新的 App Secret。"
"placeholder": "留空以保留现有密钥"
},
"domain": {
"label": "区域",
@@ -48,6 +38,38 @@
"true": "每个话题使用独立会话",
"false": "群聊共用一个会话"
}
},
"name": {
"label": "账户名称"
},
"encryptKey": {
"label": "加密密钥"
},
"verificationToken": {
"label": "验证令牌"
},
"reactEmoji": {
"label": "已读表情"
},
"doneEmoji": {
"label": "完成表情"
},
"toolHintPrefix": {
"label": "工具提示前缀"
},
"replyToMessage": {
"label": "引用回复",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"streaming": {
"label": "流式输出",
"choices": {
"true": "开启",
"false": "关闭"
}
}
}
},
@@ -55,14 +77,6 @@
"toggleAssistant": "{{name}} 助手",
"configured": "已连接",
"needsSetup": "需要授权",
"noAppId": "没有 App ID",
"createAnother": "创建另一个助手",
"createHint": "为其他团队、空间或工作流创建独立的飞书机器人。",
"createAssistant": "创建助手",
"reconnect": "重新连接",
"countNone": "尚未连接助手",
"countOne": "已连接 1 个助手",
"countMany": "已连接 {{count}} 个助手",
"qrAlt": "飞书连接二维码",
"scanTitle": "使用飞书扫码",
"scanDescription": "用手机上的飞书或 Lark 扫描二维码。授权完成后,nanobot 会自动完成配置。",
@@ -1,18 +1,9 @@
{
"displayName": "飛書",
"description": "在飛書對話和群組中使用 nanobot。",
"requirements": "飛書應用程式憑證、事件訂閱和閘道",
"setup": {
"primaryAction": "連接飛書",
"docsLabel": "開啟飛書設定指南",
"officialLabel": "開啟飛書開發者後台",
"tryIt": "向飛書助手傳送私訊,或在群組中提及它。",
"summary": "連接流程會透過QR Code建立或關聯飛書應用程式,並自動為 nanobot 儲存應用程式憑證。",
"steps": [
"點選連接,用手機飛書或 Lark 掃描QR Code。",
"核准應用程式連接,nanobot 會自動儲存 App ID 和 Secret。",
"向機器人傳送私訊,或在飛書群組中提及它以完成測試。"
],
"fields": {
"appId": {
"label": "App ID",
@@ -20,8 +11,7 @@
},
"appSecret": {
"label": "App Secret",
"placeholder": "留空以保留現有金鑰",
"help": "僅在輪換憑證時貼上新的 App Secret。"
"placeholder": "留空以保留現有金鑰"
},
"domain": {
"label": "區域",
@@ -48,6 +38,38 @@
"true": "每個主題使用獨立工作階段",
"false": "群組共用一個工作階段"
}
},
"name": {
"label": "帳戶名稱"
},
"encryptKey": {
"label": "加密金鑰"
},
"verificationToken": {
"label": "驗證令牌"
},
"reactEmoji": {
"label": "已讀表情"
},
"doneEmoji": {
"label": "完成表情"
},
"toolHintPrefix": {
"label": "工具提示前綴"
},
"replyToMessage": {
"label": "引用回覆",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"streaming": {
"label": "串流輸出",
"choices": {
"true": "開啟",
"false": "關閉"
}
}
}
},
@@ -55,14 +77,6 @@
"toggleAssistant": "{{name}} 助手",
"configured": "已連接",
"needsSetup": "需要授權",
"noAppId": "沒有 App ID",
"createAnother": "建立另一個助手",
"createHint": "為其他團隊、空間或工作流程建立獨立的飛書機器人。",
"createAssistant": "建立助手",
"reconnect": "重新連線",
"countNone": "尚未連接助手",
"countOne": "已連接 1 個助手",
"countMany": "已連接 {{count}} 個助手",
"qrAlt": "飛書連線 QR Code",
"scanTitle": "使用飛書掃描",
"scanDescription": "請使用手機上的飛書或 Lark 掃描此 QR Code。完成授權後,nanobot 會自動完成設定。",
+10 -1
View File
@@ -13,7 +13,16 @@ SETUP_SPEC = ChannelSetupSpec(
"accessToken": field("secret"),
"deviceId": field(),
"groupPolicy": field("enum", choices=GROUP_POLICIES, default="open"),
"allowFrom": field("list", writable=False),
"allowFrom": field("list"),
"e2eeEnabled": field("bool", default=False),
"sasVerification": field("bool", default=False),
"syncStopGraceSeconds": field("int", default=2),
"maxMediaBytes": field("int", default=20 * 1024 * 1024),
"maxConcurrentMediaDownloads": field("int", default=2),
"groupAllowFrom": field("list"),
"allowRoomMentions": field("bool", default=False),
"streaming": field("bool", default=False),
"proxy": field(),
},
required=(
*required_fields("homeserver", "userId"),
+5
View File
@@ -301,6 +301,7 @@ class MatrixConfig(Base):
group_allow_from: list[str] = Field(default_factory=list)
allow_room_mentions: bool = False
streaming: bool = False
proxy: str | None = None
class MatrixChannel(BaseChannel):
@@ -356,10 +357,14 @@ class MatrixChannel(BaseChannel):
# Replace ':' with '_' to produce a Windows-safe filename
safe_store_name = self.config.user_id.replace(":", "_") + f"_{self.config.device_id}.db"
proxy = self.config.proxy.strip() if self.config.proxy else ""
if proxy and "://" not in proxy:
proxy = f"http://{proxy}"
self.client = AsyncClient(
homeserver=self.config.homeserver,
user=self.config.user_id,
store_path=str(self.store_path),
proxy=proxy or None,
config=AsyncClientConfig(
store_sync_tokens=True,
encryption_enabled=self.config.e2ee_enabled,
@@ -48,11 +48,12 @@ class _DummyTask:
class _FakeAsyncClient:
def __init__(self, homeserver, user, store_path, config) -> None:
def __init__(self, homeserver, user, store_path, config, proxy=None) -> None:
self.homeserver = homeserver
self.user = user
self.store_path = store_path
self.config = config
self.proxy = proxy
self.user_id: str | None = None
self.access_token: str | None = None
self.device_id: str | None = None
@@ -326,11 +327,15 @@ async def test_start_skips_load_store_when_device_id_missing(
"nanobot.channels.matrix.runtime.asyncio.create_task", _fake_create_task
)
channel = MatrixChannel(_make_config(device_id="", e2ee_enabled=True), MessageBus())
channel = MatrixChannel(
_make_config(device_id="", e2ee_enabled=True, proxy="127.0.0.1:7890"),
MessageBus(),
)
await channel.start()
assert len(clients) == 1
assert clients[0].config.encryption_enabled is True
assert clients[0].proxy == "http://127.0.0.1:7890"
assert clients[0].load_store_called is False
assert len(clients[0].callbacks) == 3
assert clients[0].to_device_callbacks == []
@@ -10,7 +10,7 @@ from nanobot.config.schema import Config
@pytest.mark.parametrize(
("credentials", "expected_status", "expected_missing"),
[
({}, "needs_setup", "password_or_accessToken"),
({}, "needs_setup", "password"),
({"channels.matrix.accessToken": "token"}, "needs_setup", "deviceId"),
({"channels.matrix.password": "secret"}, "configured", None),
(
@@ -49,3 +49,35 @@ def test_validate_matrix_requires_a_complete_login_method(
assert result["missing_fields"] == []
else:
assert expected_missing in result["missing_fields"]
def test_validate_matrix_can_replace_a_saved_password_with_a_token(
tmp_path,
monkeypatch: pytest.MonkeyPatch,
) -> None:
config_path = tmp_path / "config.json"
save_config(
Config.model_validate({
"channels": {
"matrix": {
"homeserver": "https://matrix.example",
"userId": "@nanobot:matrix.example",
"password": "saved-password",
},
},
}),
config_path,
)
monkeypatch.setattr("nanobot.config.loader._current_config_path", config_path)
result = validate_channel_config(
"matrix",
{
"channels.matrix.password": None,
"channels.matrix.accessToken": "replacement-token",
"channels.matrix.deviceId": "DEVICE",
},
)
assert result["status"] == "configured"
assert result["missing_fields"] == []
+1 -1
View File
@@ -25,7 +25,7 @@ def validate(values: dict[str, Any], _context: ChannelValidationContext) -> dict
)
else:
if not password and not access_token:
missing.append("password_or_accessToken")
missing.append("password")
message = "Add a password, or an access token with its device ID."
else:
missing.append("deviceId")
+7 -7
View File
@@ -3,20 +3,20 @@ import { chatAppGuideUrl } from "@/components/settings/channels/catalog";
export default {
presentation: {
logoUrl: "https://matrix.org/favicon.ico",
displayName: "Matrix",
initials: "MX",
color: "#0DBD8B",
logoUrl: "https://matrix.org/favicon.ico",
setup: {
mode: "credentials",
docsUrl: chatAppGuideUrl("matrix"),
fields: [
{ key: "channels.matrix.homeserver" },
{ key: "channels.matrix.userId" },
{ key: "channels.matrix.password" },
{ key: "channels.matrix.accessToken" },
{ key: "channels.matrix.deviceId" },
{ key: "channels.matrix.groupPolicy" },
{ key: "channels.matrix.homeserver", section: "connection" },
{ key: "channels.matrix.userId", section: "account" },
{ key: "channels.matrix.password", section: "credentials" },
{ key: "channels.matrix.accessToken", section: "credentials" },
{ key: "channels.matrix.deviceId", section: "credentials" },
{ key: "channels.matrix.groupPolicy", section: "behavior" },
],
},
},
+50 -15
View File
@@ -1,16 +1,7 @@
{
"description": "Use nanobot from Matrix rooms.",
"requirements": "Homeserver, account token, room access",
"setup": {
"docsLabel": "Open Matrix setup",
"officialLabel": "Open Matrix clients",
"tryIt": "Invite the Matrix account into a room and send a test message.",
"summary": "Enter your Matrix homeserver and sign in with a password or access token.",
"steps": [
"Create or choose a Matrix account for nanobot.",
"Enter the homeserver, user ID, and either password or access-token credentials.",
"Save and enable Matrix, invite the account to a room, and send a test message."
],
"fields": {
"homeserver": {
"label": "Homeserver",
@@ -22,18 +13,15 @@
},
"password": {
"label": "Password",
"placeholder": "••••••",
"help": "Use either password login or access token login."
"placeholder": "••••••"
},
"accessToken": {
"label": "Access token",
"placeholder": "Enter an access token",
"help": "Preferred when your Matrix client exposes an access token."
"placeholder": "Enter an access token"
},
"deviceId": {
"label": "Device ID",
"placeholder": "Required with an access token",
"help": "Copy the device ID associated with the access token. Password login does not need it."
"placeholder": "Required with an access token"
},
"groupPolicy": {
"label": "Group behavior",
@@ -42,6 +30,53 @@
"open": "All messages",
"allowlist": "Allowlist"
}
},
"allowFrom": {
"label": "Allowed users"
},
"e2eeEnabled": {
"label": "End-to-end encryption",
"choices": {
"true": "On",
"false": "Off"
}
},
"sasVerification": {
"label": "SAS verification",
"choices": {
"true": "On",
"false": "Off"
}
},
"syncStopGraceSeconds": {
"label": "Sync stop grace period"
},
"maxMediaBytes": {
"label": "Maximum media size"
},
"maxConcurrentMediaDownloads": {
"label": "Concurrent media downloads"
},
"groupAllowFrom": {
"label": "Allowed groups"
},
"allowRoomMentions": {
"label": "Allow room mentions",
"choices": {
"true": "On",
"false": "Off"
}
},
"streaming": {
"label": "Streaming",
"choices": {
"true": "On",
"false": "Off"
}
},
"proxy": {
"label": "Network proxy",
"placeholder": "http://127.0.0.1:7890"
}
}
}
+50 -15
View File
@@ -1,16 +1,7 @@
{
"description": "Usa nanobot desde salas de Matrix.",
"requirements": "Servidor de la cuenta, credenciales de acceso y permisos para las salas",
"setup": {
"docsLabel": "Abrir guía de Matrix",
"officialLabel": "Abrir lista de clientes Matrix",
"tryIt": "Invita la cuenta de Matrix a una sala y envía un mensaje de prueba.",
"summary": "Introduce el servidor de tu cuenta de Matrix e inicia sesión con una contraseña o un token de acceso.",
"steps": [
"Crea o elige una cuenta de Matrix para nanobot.",
"Introduce el servidor de tu cuenta, el ID de usuario y la contraseña o el token de acceso.",
"Guarda y activa Matrix, invita la cuenta a una sala y envía un mensaje de prueba."
],
"fields": {
"homeserver": {
"label": "Servidor de la cuenta",
@@ -22,18 +13,15 @@
},
"password": {
"label": "Contraseña",
"placeholder": "••••••",
"help": "Usa contraseña o token de acceso."
"placeholder": "••••••"
},
"accessToken": {
"label": "Token de acceso",
"placeholder": "Introduce un token de acceso",
"help": "Preferible si tu cliente Matrix muestra un token de acceso."
"placeholder": "Introduce un token de acceso"
},
"deviceId": {
"label": "ID del dispositivo",
"placeholder": "Obligatorio con token",
"help": "Copia el ID asociado al token. No se necesita con contraseña."
"placeholder": "Obligatorio con token"
},
"groupPolicy": {
"label": "Comportamiento en grupos",
@@ -42,6 +30,53 @@
"open": "Todos los mensajes",
"allowlist": "Lista de permitidos"
}
},
"allowFrom": {
"label": "Usuarios permitidos"
},
"e2eeEnabled": {
"label": "Cifrado de extremo a extremo",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"sasVerification": {
"label": "verificación SAS",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"syncStopGraceSeconds": {
"label": "Período de gracia para detener la sincronización"
},
"maxMediaBytes": {
"label": "Tamaño máximo de medios"
},
"maxConcurrentMediaDownloads": {
"label": "Descargas multimedia simultáneas"
},
"groupAllowFrom": {
"label": "Grupos permitidos"
},
"allowRoomMentions": {
"label": "Permitir menciones de sala",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"streaming": {
"label": "Transmisión",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"proxy": {
"label": "Proxy de red",
"placeholder": "http://127.0.0.1:7890"
}
}
}
+50 -15
View File
@@ -1,16 +1,7 @@
{
"description": "Utilisez nanobot depuis les salons Matrix.",
"requirements": "Serveur d’accueil, jeton de compte et accès aux salons",
"setup": {
"docsLabel": "Ouvrir le guide Matrix",
"officialLabel": "Ouvrir la liste des clients Matrix",
"tryIt": "Invitez le compte Matrix dans un salon et envoyez un message test.",
"summary": "Saisissez le serveur de votre compte Matrix et connectez-vous avec un mot de passe ou un jeton d’accès.",
"steps": [
"Créez ou choisissez un compte Matrix pour nanobot.",
"Saisissez le serveur, l’ID utilisateur et le mot de passe ou le jeton d’accès.",
"Enregistrez et activez Matrix, invitez le compte dans un salon et envoyez un message test."
],
"fields": {
"homeserver": {
"label": "Serveur d’accueil",
@@ -22,18 +13,15 @@
},
"password": {
"label": "Mot de passe",
"placeholder": "••••••",
"help": "Utilisez le mot de passe ou le jeton d’accès."
"placeholder": "••••••"
},
"accessToken": {
"label": "Jeton d’accès",
"placeholder": "Saisir un jeton d’accès",
"help": "À privilégier si votre client Matrix expose un jeton d’accès."
"placeholder": "Saisir un jeton d’accès"
},
"deviceId": {
"label": "ID de l’appareil",
"placeholder": "Requis avec un jeton d’accès",
"help": "Copiez l’ID d’appareil associé au jeton. Il n’est pas nécessaire avec un mot de passe."
"placeholder": "Requis avec un jeton d’accès"
},
"groupPolicy": {
"label": "Comportement en groupe",
@@ -42,6 +30,53 @@
"open": "Tous les messages",
"allowlist": "Liste d’autorisation"
}
},
"allowFrom": {
"label": "Utilisateurs autorisés"
},
"e2eeEnabled": {
"label": "Chiffrement de bout en bout",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"sasVerification": {
"label": "Vérification SAS",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"syncStopGraceSeconds": {
"label": "Délai de grâce pour l'arrêt de la synchronisation"
},
"maxMediaBytes": {
"label": "Taille maximale du support"
},
"maxConcurrentMediaDownloads": {
"label": "Téléchargements multimédias simultanés"
},
"groupAllowFrom": {
"label": "Groupes autorisés"
},
"allowRoomMentions": {
"label": "Autoriser les mentions de salles",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"streaming": {
"label": "Diffusion en continu",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"proxy": {
"label": "Proxy réseau",
"placeholder": "http://127.0.0.1:7890"
}
}
}
+50 -15
View File
@@ -1,16 +1,7 @@
{
"description": "Gunakan nanobot dari ruang Matrix.",
"requirements": "Server akun, kredensial, dan akses ruang",
"setup": {
"docsLabel": "Buka panduan Matrix",
"officialLabel": "Buka daftar klien Matrix",
"tryIt": "Undang akun Matrix ke ruang dan kirim pesan uji.",
"summary": "Masukkan server akun Matrix, lalu masuk dengan kata sandi atau token akses.",
"steps": [
"Buat atau pilih akun Matrix untuk nanobot.",
"Masukkan server akun, ID pengguna, serta kata sandi atau token akses.",
"Simpan dan aktifkan Matrix, undang akun ke ruang, lalu kirim pesan uji."
],
"fields": {
"homeserver": {
"label": "Server akun",
@@ -22,18 +13,15 @@
},
"password": {
"label": "Kata sandi",
"placeholder": "••••••",
"help": "Gunakan kata sandi atau token akses."
"placeholder": "••••••"
},
"accessToken": {
"label": "Token akses",
"placeholder": "Masukkan token akses",
"help": "Disarankan jika klien Matrix menyediakan token akses."
"placeholder": "Masukkan token akses"
},
"deviceId": {
"label": "ID perangkat",
"placeholder": "Wajib dengan token akses",
"help": "Salin ID perangkat yang terkait token. Login kata sandi tidak memerlukannya."
"placeholder": "Wajib dengan token akses"
},
"groupPolicy": {
"label": "Perilaku grup",
@@ -42,6 +30,53 @@
"open": "Semua pesan",
"allowlist": "Daftar izin"
}
},
"allowFrom": {
"label": "Pengguna yang diizinkan"
},
"e2eeEnabled": {
"label": "Enkripsi ujung ke ujung",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"sasVerification": {
"label": "verifikasi SAS",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"syncStopGraceSeconds": {
"label": "Sinkronisasi menghentikan masa tenggang"
},
"maxMediaBytes": {
"label": "Ukuran media maksimum"
},
"maxConcurrentMediaDownloads": {
"label": "Pengunduhan media secara bersamaan"
},
"groupAllowFrom": {
"label": "Grup yang diizinkan"
},
"allowRoomMentions": {
"label": "Izinkan penyebutan ruangan",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"streaming": {
"label": "Streaming",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"proxy": {
"label": "Proxy jaringan",
"placeholder": "http://127.0.0.1:7890"
}
}
}
+50 -15
View File
@@ -1,16 +1,7 @@
{
"description": "Matrix ルームから nanobot を利用します。",
"requirements": "ホームサーバー、アカウントトークン、ルームへのアクセス",
"setup": {
"docsLabel": "Matrix 設定ガイドを開く",
"officialLabel": "Matrix クライアント一覧を開く",
"tryIt": "Matrix アカウントをルームに招待し、テストメッセージを送信します。",
"summary": "Matrix アカウントのホームサーバーを入力し、パスワードまたはアクセストークンでログインします。",
"steps": [
"nanobot 用の Matrix アカウントを作成または選択します。",
"ホームサーバー、ユーザー ID、パスワードまたはアクセストークンを入力します。",
"保存して Matrix を有効にし、アカウントをルームに招待してテストメッセージを送信します。"
],
"fields": {
"homeserver": {
"label": "ホームサーバー",
@@ -22,18 +13,15 @@
},
"password": {
"label": "パスワード",
"placeholder": "••••••",
"help": "パスワードまたはアクセストークンのどちらかを使います。"
"placeholder": "••••••"
},
"accessToken": {
"label": "アクセストークン",
"placeholder": "アクセストークンを入力",
"help": "Matrix クライアントでアクセストークンを取得できる場合に推奨します。"
"placeholder": "アクセストークンを入力"
},
"deviceId": {
"label": "デバイス ID",
"placeholder": "アクセストークン使用時に必須",
"help": "トークンに関連付けられたデバイス ID をコピーします。パスワードログインでは不要です。"
"placeholder": "アクセストークン使用時に必須"
},
"groupPolicy": {
"label": "グループでの動作",
@@ -42,6 +30,53 @@
"open": "すべてのメッセージ",
"allowlist": "許可リスト"
}
},
"allowFrom": {
"label": "許可されたユーザー"
},
"e2eeEnabled": {
"label": "エンドツーエンドの暗号化",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"sasVerification": {
"label": "SAS 検証",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"syncStopGraceSeconds": {
"label": "同期停止猶予期間"
},
"maxMediaBytes": {
"label": "最大メディアサイズ"
},
"maxConcurrentMediaDownloads": {
"label": "メディアの同時ダウンロード"
},
"groupAllowFrom": {
"label": "許可されたグループ"
},
"allowRoomMentions": {
"label": "部屋のメンションを許可する",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"streaming": {
"label": "ストリーミング",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"proxy": {
"label": "ネットワークプロキシ",
"placeholder": "http://127.0.0.1:7890"
}
}
}
+50 -15
View File
@@ -1,16 +1,7 @@
{
"description": "Matrix 룸에서 nanobot을 사용합니다.",
"requirements": "홈서버, 계정 토큰 및 룸 접근 권한",
"setup": {
"docsLabel": "Matrix 설정 가이드 열기",
"officialLabel": "Matrix 클라이언트 목록 열기",
"tryIt": "Matrix 계정을 룸에 초대하고 테스트 메시지를 보내세요.",
"summary": "Matrix 계정의 홈서버를 입력하고 비밀번호 또는 액세스 토큰으로 로그인하세요.",
"steps": [
"nanobot용 Matrix 계정을 만들거나 선택하세요.",
"홈서버, 사용자 ID, 비밀번호 또는 액세스 토큰을 입력하세요.",
"저장하고 Matrix를 활성화한 다음 계정을 룸에 초대하고 테스트 메시지를 보내세요."
],
"fields": {
"homeserver": {
"label": "홈서버",
@@ -22,18 +13,15 @@
},
"password": {
"label": "비밀번호",
"placeholder": "••••••",
"help": "비밀번호 또는 액세스 토큰 중 하나를 사용하세요."
"placeholder": "••••••"
},
"accessToken": {
"label": "액세스 토큰",
"placeholder": "액세스 토큰 입력",
"help": "Matrix 클라이언트에서 토큰을 확인할 수 있다면 권장합니다."
"placeholder": "액세스 토큰 입력"
},
"deviceId": {
"label": "장치 ID",
"placeholder": "액세스 토큰 사용 시 필수",
"help": "토큰과 연결된 장치 ID를 복사하세요. 비밀번호 로그인에는 필요하지 않습니다."
"placeholder": "액세스 토큰 사용 시 필수"
},
"groupPolicy": {
"label": "그룹 동작",
@@ -42,6 +30,53 @@
"open": "모든 메시지",
"allowlist": "허용 목록"
}
},
"allowFrom": {
"label": "허용된 사용자"
},
"e2eeEnabled": {
"label": "엔드투엔드 암호화",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"sasVerification": {
"label": "SAS 검증",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"syncStopGraceSeconds": {
"label": "동기화 중지 유예 기간"
},
"maxMediaBytes": {
"label": "최대 미디어 크기"
},
"maxConcurrentMediaDownloads": {
"label": "동시 미디어 다운로드"
},
"groupAllowFrom": {
"label": "허용된 그룹"
},
"allowRoomMentions": {
"label": "회의실 언급 허용",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"streaming": {
"label": "스트리밍",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"proxy": {
"label": "네트워크 프록시",
"placeholder": "http://127.0.0.1:7890"
}
}
}
@@ -1,16 +1,7 @@
{
"description": "Use o nanobot em salas do Matrix.",
"requirements": "Servidor da conta, credenciais e acesso às salas",
"setup": {
"docsLabel": "Abrir guia do Matrix",
"officialLabel": "Abrir lista de clientes Matrix",
"tryIt": "Convide a conta Matrix para uma sala e envie uma mensagem de teste.",
"summary": "Informe o servidor da sua conta Matrix e entre com uma senha ou um token de acesso.",
"steps": [
"Crie ou escolha uma conta Matrix para o nanobot.",
"Informe o servidor da conta, o ID de usuário e a senha ou o token de acesso.",
"Salve e ative o Matrix, convide a conta para uma sala e envie uma mensagem de teste."
],
"fields": {
"homeserver": {
"label": "Servidor da conta",
@@ -22,18 +13,15 @@
},
"password": {
"label": "Senha",
"placeholder": "••••••",
"help": "Use senha ou token de acesso."
"placeholder": "••••••"
},
"accessToken": {
"label": "Token de acesso",
"placeholder": "Informe um token de acesso",
"help": "Preferível quando o cliente Matrix fornece um token."
"placeholder": "Informe um token de acesso"
},
"deviceId": {
"label": "ID do dispositivo",
"placeholder": "Obrigatório com token",
"help": "Copie o ID associado ao token. O login por senha não precisa dele."
"placeholder": "Obrigatório com token"
},
"groupPolicy": {
"label": "Comportamento em grupos",
@@ -42,6 +30,53 @@
"open": "Todas as mensagens",
"allowlist": "Lista de permissão"
}
},
"allowFrom": {
"label": "Usuários permitidos"
},
"e2eeEnabled": {
"label": "Criptografia ponta a ponta",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"sasVerification": {
"label": "Verificação SAS",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"syncStopGraceSeconds": {
"label": "Período de carência para interrupção da sincronização"
},
"maxMediaBytes": {
"label": "Tamanho máximo da mídia"
},
"maxConcurrentMediaDownloads": {
"label": "Downloads simultâneos de mídia"
},
"groupAllowFrom": {
"label": "Grupos permitidos"
},
"allowRoomMentions": {
"label": "Permitir menções à sala",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"streaming": {
"label": "Transmissão",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"proxy": {
"label": "Proxy de rede",
"placeholder": "http://127.0.0.1:7890"
}
}
}
+50 -15
View File
@@ -1,16 +1,7 @@
{
"description": "Sử dụng nanobot từ các phòng Matrix.",
"requirements": "Máy chủ tài khoản, thông tin đăng nhập và quyền truy cập phòng",
"setup": {
"docsLabel": "Mở hướng dẫn Matrix",
"officialLabel": "Mở danh sách ứng dụng Matrix",
"tryIt": "Mời tài khoản Matrix vào phòng và gửi tin nhắn thử.",
"summary": "Nhập máy chủ của tài khoản Matrix rồi đăng nhập bằng mật khẩu hoặc token truy cập.",
"steps": [
"Tạo hoặc chọn tài khoản Matrix cho nanobot.",
"Nhập máy chủ tài khoản, ID người dùng và mật khẩu hoặc token truy cập.",
"Lưu và bật Matrix, mời tài khoản vào phòng rồi gửi tin nhắn thử."
],
"fields": {
"homeserver": {
"label": "Máy chủ tài khoản",
@@ -22,18 +13,15 @@
},
"password": {
"label": "Mật khẩu",
"placeholder": "••••••",
"help": "Dùng mật khẩu hoặc token truy cập."
"placeholder": "••••••"
},
"accessToken": {
"label": "Token truy cập",
"placeholder": "Nhập token truy cập",
"help": "Nên dùng khi ứng dụng Matrix cung cấp token truy cập."
"placeholder": "Nhập token truy cập"
},
"deviceId": {
"label": "ID thiết bị",
"placeholder": "Bắt buộc khi dùng token",
"help": "Sao chép ID thiết bị gắn với token. Đăng nhập mật khẩu không cần."
"placeholder": "Bắt buộc khi dùng token"
},
"groupPolicy": {
"label": "Hành vi trong nhóm",
@@ -42,6 +30,53 @@
"open": "Mọi tin nhắn",
"allowlist": "Danh sách cho phép"
}
},
"allowFrom": {
"label": "Người dùng được phép"
},
"e2eeEnabled": {
"label": "Mã hóa đầu cuối",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"sasVerification": {
"label": "Xác minh SAS",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"syncStopGraceSeconds": {
"label": "Thời gian gia hạn dừng đồng bộ hóa"
},
"maxMediaBytes": {
"label": "Kích thước phương tiện tối đa"
},
"maxConcurrentMediaDownloads": {
"label": "Tải xuống phương tiện đồng thời"
},
"groupAllowFrom": {
"label": "Nhóm được phép"
},
"allowRoomMentions": {
"label": "Cho phép đề cập đến phòng",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"streaming": {
"label": "Truyền phát",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"proxy": {
"label": "Proxy mạng",
"placeholder": "http://127.0.0.1:7890"
}
}
}
@@ -1,16 +1,7 @@
{
"description": "在 Matrix 房间中使用 nanobot。",
"requirements": "主服务器、账户令牌和房间访问权限",
"setup": {
"docsLabel": "打开 Matrix 配置指南",
"officialLabel": "打开 Matrix 客户端列表",
"tryIt": "将 Matrix 账户邀请进房间并发送一条测试消息。",
"summary": "填写 Matrix 账户所在的服务器,并使用密码或访问令牌登录。",
"steps": [
"为 nanobot 创建或选择一个 Matrix 账户。",
"填写主服务器、用户 ID,以及密码或访问令牌凭据。",
"保存并启用 Matrix,将账户邀请进房间,然后发送一条测试消息。"
],
"fields": {
"homeserver": {
"label": "账户服务器",
@@ -22,18 +13,15 @@
},
"password": {
"label": "密码",
"placeholder": "••••••",
"help": "密码登录和访问令牌登录任选其一。"
"placeholder": "••••••"
},
"accessToken": {
"label": "访问令牌",
"placeholder": "输入访问令牌",
"help": "如果 Matrix 客户端可以显示访问令牌,建议使用该方式。"
"placeholder": "输入访问令牌"
},
"deviceId": {
"label": "设备 ID",
"placeholder": "使用访问令牌时必填",
"help": "复制与访问令牌关联的设备 ID;密码登录不需要。"
"placeholder": "使用访问令牌时必填"
},
"groupPolicy": {
"label": "群组行为",
@@ -42,6 +30,53 @@
"open": "所有消息",
"allowlist": "白名单"
}
},
"allowFrom": {
"label": "允许的用户"
},
"e2eeEnabled": {
"label": "端到端加密",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"sasVerification": {
"label": "SAS 验证",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"syncStopGraceSeconds": {
"label": "同步停止等待时间"
},
"maxMediaBytes": {
"label": "媒体大小上限"
},
"maxConcurrentMediaDownloads": {
"label": "并发媒体下载数"
},
"groupAllowFrom": {
"label": "允许的群组"
},
"allowRoomMentions": {
"label": "响应房间提及",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"streaming": {
"label": "流式输出",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"proxy": {
"label": "网络代理",
"placeholder": "http://127.0.0.1:7890"
}
}
}
@@ -1,16 +1,7 @@
{
"description": "在 Matrix 房間中使用 nanobot。",
"requirements": "主伺服器、帳戶權杖和房間存取權限",
"setup": {
"docsLabel": "開啟 Matrix 設定指南",
"officialLabel": "開啟 Matrix 用戶端列表",
"tryIt": "將 Matrix 帳戶邀請進房間並傳送一則測試訊息。",
"summary": "填入 Matrix 帳戶所在的伺服器,並使用密碼或存取權杖登入。",
"steps": [
"為 nanobot 建立或選擇一個 Matrix 帳戶。",
"填入主伺服器、使用者 ID,以及密碼或存取權杖憑證。",
"儲存並啟用 Matrix,將帳戶邀請進房間,然後傳送一則測試訊息。"
],
"fields": {
"homeserver": {
"label": "帳戶伺服器",
@@ -22,18 +13,15 @@
},
"password": {
"label": "密碼",
"placeholder": "••••••",
"help": "密碼登入和存取權杖登入任選其一。"
"placeholder": "••••••"
},
"accessToken": {
"label": "存取權杖",
"placeholder": "輸入存取權杖",
"help": "若 Matrix 用戶端可顯示存取權杖,建議使用此方式。"
"placeholder": "輸入存取權杖"
},
"deviceId": {
"label": "裝置 ID",
"placeholder": "使用存取權杖時必填",
"help": "複製與存取權杖關聯的裝置 ID;密碼登入不需要。"
"placeholder": "使用存取權杖時必填"
},
"groupPolicy": {
"label": "群組行為",
@@ -42,6 +30,53 @@
"open": "所有訊息",
"allowlist": "允許清單"
}
},
"allowFrom": {
"label": "允許的用戶"
},
"e2eeEnabled": {
"label": "端對端加密",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"sasVerification": {
"label": "SAS 驗證",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"syncStopGraceSeconds": {
"label": "同步停止等待時間"
},
"maxMediaBytes": {
"label": "媒體大小上限"
},
"maxConcurrentMediaDownloads": {
"label": "並發媒體下載數"
},
"groupAllowFrom": {
"label": "允許的群組"
},
"allowRoomMentions": {
"label": "響應房間提及",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"streaming": {
"label": "串流輸出",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"proxy": {
"label": "網路代理",
"placeholder": "http://127.0.0.1:7890"
}
}
}
+15
View File
@@ -12,6 +12,21 @@ SETUP_SPEC = ChannelSetupSpec(
"groupPolicy": field("enum", choices=GROUP_POLICIES, default="mention"),
"groupPolicyInThread": field("enum", choices=GROUP_POLICIES, default="mention"),
"allowFrom": field("list"),
"allowFromMatchMode": field(
"enum", choices={"id", "username", "email"}, default="id"
),
"groupAllowFrom": field("list"),
"replyInThread": field("bool", default=True),
"includeThreadContext": field("bool", default=True),
"threadContextLimit": field("int", default=20),
"streaming": field("bool", default=True),
"reactEmoji": field(default="eyes"),
"doneEmoji": field(default="white_check_mark"),
"sendProgress": field("bool", default=True),
"sendToolHints": field("bool", default=True),
"dm.enabled": field("bool", default=True),
"dm.policy": field("enum", choices={"open", "allowlist"}, default="open"),
"dm.allowFrom": field("list"),
},
required=required_fields("serverUrl", "token"),
official_url="https://developers.mattermost.com/integrate/reference/bot-accounts/",
+7 -6
View File
@@ -3,19 +3,20 @@ import { chatAppGuideUrl } from "@/components/settings/channels/catalog";
export default {
presentation: {
logoUrl: "https://mattermost.com/favicon.ico",
displayName: "Mattermost",
initials: "MM",
color: "#1C58D9",
logoUrl: "https://mattermost.com/favicon.ico",
setup: {
mode: "credentials",
docsUrl: chatAppGuideUrl("mattermost"),
fields: [
{ key: "channels.mattermost.serverUrl" },
{ key: "channels.mattermost.token" },
{ key: "channels.mattermost.teamId" },
{ key: "channels.mattermost.groupPolicy" },
{ key: "channels.mattermost.groupPolicyInThread" },
{ key: "channels.mattermost.serverUrl", section: "connection" },
{ key: "channels.mattermost.teamId", section: "account" },
{ key: "channels.mattermost.token", section: "credentials" },
{ key: "channels.mattermost.allowFrom", section: "access" },
{ key: "channels.mattermost.groupPolicy", section: "behavior" },
{ key: "channels.mattermost.groupPolicyInThread", section: "behavior" },
],
},
},
@@ -1,26 +1,15 @@
{
"description": "Use nanobot from Mattermost channels and DMs.",
"requirements": "Mattermost server URL, bot token, channel access",
"setup": {
"docsLabel": "Open Mattermost setup",
"officialLabel": "Open Mattermost bot guide",
"tryIt": "Mention the bot in a Mattermost channel or send it a direct message.",
"summary": "Mattermost connects through a bot account on your server and listens for channel and direct messages.",
"steps": [
"Create a Mattermost bot account and copy its access token.",
"Enter the server URL and grant the bot access to the target team and channels.",
"Save and enable Mattermost, then mention the bot or send a direct message."
],
"fields": {
"serverUrl": {
"label": "Server URL",
"placeholder": "https://mattermost.example.com",
"help": "Use the base URL of your Mattermost workspace."
"placeholder": "https://mattermost.example.com"
},
"token": {
"label": "Bot token",
"placeholder": "Mattermost bot token",
"help": "Create this from a Mattermost bot account."
"placeholder": "Mattermost bot token"
},
"teamId": {
"label": "Team ID",
@@ -45,6 +34,78 @@
"allowFrom": {
"label": "Allowed users",
"placeholder": "User IDs, comma separated"
},
"allowFromMatchMode": {
"label": "User matching",
"choices": {
"email": "Email",
"id": "User ID",
"username": "Username"
}
},
"groupAllowFrom": {
"label": "Allowed channels"
},
"replyInThread": {
"label": "Reply in thread",
"choices": {
"true": "On",
"false": "Off"
}
},
"includeThreadContext": {
"label": "Include thread context",
"choices": {
"true": "On",
"false": "Off"
}
},
"threadContextLimit": {
"label": "Thread context limit"
},
"streaming": {
"label": "Streaming",
"choices": {
"true": "On",
"false": "Off"
}
},
"reactEmoji": {
"label": "Read emoji"
},
"doneEmoji": {
"label": "Done emoji"
},
"sendProgress": {
"label": "Send progress",
"choices": {
"true": "On",
"false": "Off"
}
},
"sendToolHints": {
"label": "Send tool hints",
"choices": {
"true": "On",
"false": "Off"
}
},
"dm_enabled": {
"label": "Enable direct messages",
"choices": {
"true": "On",
"false": "Off"
}
},
"dm_policy": {
"label": "Direct message access",
"choices": {
"allowlist": "Allowlist",
"open": "Open"
}
},
"dm_allowFrom": {
"label": "Allowed direct-message users"
}
}
}
@@ -1,26 +1,15 @@
{
"description": "Usa nanobot en canales y mensajes directos de Mattermost.",
"requirements": "URL del servidor Mattermost, token del bot y acceso a canales",
"setup": {
"docsLabel": "Abrir guía de Mattermost",
"officialLabel": "Abrir guía de bots de Mattermost",
"tryIt": "Menciona al bot en un canal de Mattermost o envíale un mensaje directo.",
"summary": "Mattermost se conecta mediante una cuenta bot en tu servidor y escucha canales y mensajes directos.",
"steps": [
"Crea una cuenta bot de Mattermost y copia su token de acceso.",
"Introduce la URL del servidor y permite acceso al equipo y canales de destino.",
"Guarda y activa Mattermost; después menciona al bot o envíale un mensaje directo."
],
"fields": {
"serverUrl": {
"label": "URL del servidor",
"placeholder": "https://mattermost.example.com",
"help": "Usa la URL base de tu espacio Mattermost."
"placeholder": "https://mattermost.example.com"
},
"token": {
"label": "Token del bot",
"placeholder": "Token del bot Mattermost",
"help": "Créalo desde una cuenta bot de Mattermost."
"placeholder": "Token del bot Mattermost"
},
"teamId": {
"label": "ID del equipo",
@@ -45,6 +34,78 @@
"allowFrom": {
"label": "Usuarios permitidos",
"placeholder": "ID de usuario separados por comas"
},
"allowFromMatchMode": {
"label": "Coincidencia de usuarios",
"choices": {
"email": "Correo electrónico",
"id": "ID de usuario",
"username": "Nombre de usuario"
}
},
"groupAllowFrom": {
"label": "Canales permitidos"
},
"replyInThread": {
"label": "Responder en el hilo",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"includeThreadContext": {
"label": "Incluir contexto de hilo",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"threadContextLimit": {
"label": "Límite de contexto del hilo"
},
"streaming": {
"label": "Transmisión",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"reactEmoji": {
"label": "Leer emojis"
},
"doneEmoji": {
"label": "emoji hecho"
},
"sendProgress": {
"label": "Enviar progreso",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"sendToolHints": {
"label": "Enviar sugerencias de herramientas",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"dm_enabled": {
"label": "Habilitar mensajes directos",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"dm_policy": {
"label": "Acceso a mensajes directos",
"choices": {
"allowlist": "Lista de permitidos",
"open": "Abierto"
}
},
"dm_allowFrom": {
"label": "Usuarios permitidos de mensajes directos"
}
}
}
@@ -1,26 +1,15 @@
{
"description": "Utilisez nanobot dans les canaux et messages privés Mattermost.",
"requirements": "URL du serveur Mattermost, jeton du bot et accès aux canaux",
"setup": {
"docsLabel": "Ouvrir le guide Mattermost",
"officialLabel": "Ouvrir le guide des bots Mattermost",
"tryIt": "Mentionnez le bot dans un canal Mattermost ou envoyez-lui un message privé.",
"summary": "Mattermost se connecte via un compte bot sur votre serveur et écoute les canaux et messages privés.",
"steps": [
"Créez un compte bot Mattermost et copiez son jeton d’accès.",
"Saisissez l’URL du serveur et accordez l’accès à l’équipe et aux canaux cibles.",
"Enregistrez et activez Mattermost, puis mentionnez le bot ou envoyez-lui un message privé."
],
"fields": {
"serverUrl": {
"label": "URL du serveur",
"placeholder": "https://mattermost.example.com",
"help": "Utilisez l’URL de base de votre espace Mattermost."
"placeholder": "https://mattermost.example.com"
},
"token": {
"label": "Jeton du bot",
"placeholder": "Jeton du bot Mattermost",
"help": "Créez-le depuis un compte bot Mattermost."
"placeholder": "Jeton du bot Mattermost"
},
"teamId": {
"label": "ID de l’équipe",
@@ -45,6 +34,78 @@
"allowFrom": {
"label": "Utilisateurs autorisés",
"placeholder": "ID utilisateur séparés par des virgules"
},
"allowFromMatchMode": {
"label": "Correspondance des utilisateurs",
"choices": {
"email": "Courriel",
"id": "Identifiant utilisateur",
"username": "Nom d'utilisateur"
}
},
"groupAllowFrom": {
"label": "Chaînes autorisées"
},
"replyInThread": {
"label": "Répondre dans le fil de discussion",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"includeThreadContext": {
"label": "Inclure le contexte du fil de discussion",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"threadContextLimit": {
"label": "Limite du contexte du fil de discussion"
},
"streaming": {
"label": "Diffusion en continu",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"reactEmoji": {
"label": "Lire les emoji"
},
"doneEmoji": {
"label": "Terminé emoji"
},
"sendProgress": {
"label": "Envoyer la progression",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"sendToolHints": {
"label": "Envoyer des conseils sur les outils",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"dm_enabled": {
"label": "Activer les messages directs",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"dm_policy": {
"label": "Accès aux messages directs",
"choices": {
"allowlist": "Liste verte",
"open": "Ouvert"
}
},
"dm_allowFrom": {
"label": "Utilisateurs de messagerie directe autorisés"
}
}
}
@@ -1,26 +1,15 @@
{
"description": "Gunakan nanobot dari kanal dan DM Mattermost.",
"requirements": "URL server Mattermost, token bot, dan akses kanal",
"setup": {
"docsLabel": "Buka panduan Mattermost",
"officialLabel": "Buka panduan bot Mattermost",
"tryIt": "Sebut bot di kanal Mattermost atau kirim pesan langsung.",
"summary": "Mattermost terhubung melalui akun bot di server dan menerima pesan kanal serta pesan langsung.",
"steps": [
"Buat akun bot Mattermost dan salin token aksesnya.",
"Masukkan URL server dan berikan akses ke tim serta kanal tujuan.",
"Simpan dan aktifkan Mattermost, lalu sebut bot atau kirim DM."
],
"fields": {
"serverUrl": {
"label": "URL server",
"placeholder": "https://mattermost.example.com",
"help": "Gunakan URL dasar ruang kerja Mattermost."
"placeholder": "https://mattermost.example.com"
},
"token": {
"label": "Token bot",
"placeholder": "Token bot Mattermost",
"help": "Buat dari akun bot Mattermost."
"placeholder": "Token bot Mattermost"
},
"teamId": {
"label": "ID tim",
@@ -45,6 +34,78 @@
"allowFrom": {
"label": "Pengguna yang diizinkan",
"placeholder": "ID pengguna, dipisahkan koma"
},
"allowFromMatchMode": {
"label": "Pencocokan pengguna",
"choices": {
"email": "Surel",
"id": "ID Pengguna",
"username": "Nama pengguna"
}
},
"groupAllowFrom": {
"label": "Saluran yang diizinkan"
},
"replyInThread": {
"label": "Balas di thread",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"includeThreadContext": {
"label": "Sertakan konteks thread",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"threadContextLimit": {
"label": "Batas konteks thread"
},
"streaming": {
"label": "Streaming",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"reactEmoji": {
"label": "Baca emoji"
},
"doneEmoji": {
"label": "Selesai emoji"
},
"sendProgress": {
"label": "Kirim kemajuan",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"sendToolHints": {
"label": "Kirim petunjuk alat",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"dm_enabled": {
"label": "Aktifkan pesan langsung",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"dm_policy": {
"label": "Akses pesan langsung",
"choices": {
"allowlist": "Daftar yang diizinkan",
"open": "Buka"
}
},
"dm_allowFrom": {
"label": "Mengizinkan pengguna pesan langsung"
}
}
}
@@ -1,26 +1,15 @@
{
"description": "Mattermost のチャンネルと DM から nanobot を利用します。",
"requirements": "Mattermost サーバー URL、ボットトークン、チャンネルアクセス",
"setup": {
"docsLabel": "Mattermost 設定ガイドを開く",
"officialLabel": "Mattermost ボットガイドを開く",
"tryIt": "Mattermost チャンネルでボットをメンションするか、DM を送信します。",
"summary": "Mattermost はサーバー上のボットアカウントで接続し、チャンネルと DM を受信します。",
"steps": [
"Mattermost ボットアカウントを作成し、アクセストークンをコピーします。",
"サーバー URL を入力し、対象チームとチャンネルへのアクセスを許可します。",
"保存して Mattermost を有効にし、メンションまたは DM を送信します。"
],
"fields": {
"serverUrl": {
"label": "サーバー URL",
"placeholder": "https://mattermost.example.com",
"help": "Mattermost ワークスペースのベース URL を使います。"
"placeholder": "https://mattermost.example.com"
},
"token": {
"label": "ボットトークン",
"placeholder": "Mattermost ボットトークン",
"help": "Mattermost ボットアカウントから作成します。"
"placeholder": "Mattermost ボットトークン"
},
"teamId": {
"label": "チーム ID",
@@ -45,6 +34,78 @@
"allowFrom": {
"label": "許可するユーザー",
"placeholder": "ユーザー ID(カンマ区切り)"
},
"allowFromMatchMode": {
"label": "ユーザーマッチング",
"choices": {
"email": "電子メール",
"id": "ユーザーID",
"username": "ユーザー名"
}
},
"groupAllowFrom": {
"label": "許可されたチャネル"
},
"replyInThread": {
"label": "スレッド内で返信する",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"includeThreadContext": {
"label": "スレッドコンテキストを含める",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"threadContextLimit": {
"label": "スレッドコンテキストの制限"
},
"streaming": {
"label": "ストリーミング",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"reactEmoji": {
"label": "絵文字を読む"
},
"doneEmoji": {
"label": "完了絵文字"
},
"sendProgress": {
"label": "進捗状況の送信",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"sendToolHints": {
"label": "ツールヒントを送信する",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"dm_enabled": {
"label": "ダイレクトメッセージを有効にする",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"dm_policy": {
"label": "ダイレクトメッセージへのアクセス",
"choices": {
"allowlist": "ホワイトリスト",
"open": "開く"
}
},
"dm_allowFrom": {
"label": "許可されたダイレクトメッセージユーザー"
}
}
}
@@ -1,26 +1,15 @@
{
"description": "Mattermost 채널과 DM에서 nanobot을 사용합니다.",
"requirements": "Mattermost 서버 URL, 봇 토큰 및 채널 접근 권한",
"setup": {
"docsLabel": "Mattermost 설정 가이드 열기",
"officialLabel": "Mattermost 봇 가이드 열기",
"tryIt": "Mattermost 채널에서 봇을 멘션하거나 DM을 보내세요.",
"summary": "Mattermost는 서버의 봇 계정으로 연결해 채널과 DM을 수신합니다.",
"steps": [
"Mattermost 봇 계정을 만들고 액세스 토큰을 복사하세요.",
"서버 URL을 입력하고 대상 팀과 채널 접근 권한을 부여하세요.",
"저장하고 Mattermost를 활성화한 다음 봇을 멘션하거나 DM을 보내세요."
],
"fields": {
"serverUrl": {
"label": "서버 URL",
"placeholder": "https://mattermost.example.com",
"help": "Mattermost 작업 공간 기본 URL을 사용하세요."
"placeholder": "https://mattermost.example.com"
},
"token": {
"label": "봇 토큰",
"placeholder": "Mattermost 봇 토큰",
"help": "Mattermost 봇 계정에서 생성하세요."
"placeholder": "Mattermost 봇 토큰"
},
"teamId": {
"label": "팀 ID",
@@ -45,6 +34,78 @@
"allowFrom": {
"label": "허용된 사용자",
"placeholder": "사용자 ID, 쉼표로 구분"
},
"allowFromMatchMode": {
"label": "사용자 매칭",
"choices": {
"email": "이메일",
"id": "사용자 ID",
"username": "사용자 이름"
}
},
"groupAllowFrom": {
"label": "허용된 채널"
},
"replyInThread": {
"label": "스레드로 답장하기",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"includeThreadContext": {
"label": "스레드 컨텍스트 포함",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"threadContextLimit": {
"label": "스레드 컨텍스트 제한"
},
"streaming": {
"label": "스트리밍",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"reactEmoji": {
"label": "이모티콘 읽기"
},
"doneEmoji": {
"label": "이모티콘 완료"
},
"sendProgress": {
"label": "진행 상황 보내기",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"sendToolHints": {
"label": "도구 힌트 보내기",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"dm_enabled": {
"label": "다이렉트 메시지 활성화",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"dm_policy": {
"label": "다이렉트 메시지 액세스",
"choices": {
"allowlist": "허용 목록",
"open": "열기"
}
},
"dm_allowFrom": {
"label": "허용된 직접 메시지 사용자"
}
}
}
@@ -1,26 +1,15 @@
{
"description": "Use o nanobot em canais e DMs do Mattermost.",
"requirements": "URL do servidor Mattermost, token do bot e acesso aos canais",
"setup": {
"docsLabel": "Abrir guia do Mattermost",
"officialLabel": "Abrir guia de bots do Mattermost",
"tryIt": "Mencione o bot em um canal Mattermost ou envie uma mensagem direta.",
"summary": "O nanobot se conecta ao servidor Mattermost com uma conta de bot para receber mensagens de canais e mensagens diretas.",
"steps": [
"Crie uma conta de bot Mattermost e copie o token de acesso.",
"Informe a URL do servidor e conceda acesso à equipe e aos canais desejados.",
"Salve e ative o Mattermost; depois, mencione o bot ou envie uma DM."
],
"fields": {
"serverUrl": {
"label": "URL do servidor",
"placeholder": "https://mattermost.example.com",
"help": "Use a URL base do seu espaço de trabalho Mattermost."
"placeholder": "https://mattermost.example.com"
},
"token": {
"label": "Token do bot",
"placeholder": "Token do bot Mattermost",
"help": "Crie-o em uma conta de bot Mattermost."
"placeholder": "Token do bot Mattermost"
},
"teamId": {
"label": "ID da equipe",
@@ -45,6 +34,78 @@
"allowFrom": {
"label": "Usuários permitidos",
"placeholder": "IDs de usuário separados por vírgulas"
},
"allowFromMatchMode": {
"label": "Correspondência de usuário",
"choices": {
"email": "E-mail",
"id": "ID do usuário",
"username": "Nome de usuário"
}
},
"groupAllowFrom": {
"label": "Canais permitidos"
},
"replyInThread": {
"label": "Responder no tópico",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"includeThreadContext": {
"label": "Incluir contexto do thread",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"threadContextLimit": {
"label": "Limite de contexto do thread"
},
"streaming": {
"label": "Transmissão",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"reactEmoji": {
"label": "Ler emoticons"
},
"doneEmoji": {
"label": "Emoji pronto"
},
"sendProgress": {
"label": "Enviar progresso",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"sendToolHints": {
"label": "Envie dicas de ferramentas",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"dm_enabled": {
"label": "Habilitar mensagens diretas",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"dm_policy": {
"label": "Acesso direto a mensagens",
"choices": {
"allowlist": "Lista de permissões",
"open": "Abrir"
}
},
"dm_allowFrom": {
"label": "Usuários de mensagens diretas permitidos"
}
}
}
@@ -1,26 +1,15 @@
{
"description": "Sử dụng nanobot trong kênh và tin nhắn riêng Mattermost.",
"requirements": "URL máy chủ Mattermost, token bot và quyền truy cập kênh",
"setup": {
"docsLabel": "Mở hướng dẫn Mattermost",
"officialLabel": "Mở hướng dẫn bot Mattermost",
"tryIt": "Nhắc bot trong kênh Mattermost hoặc gửi tin nhắn riêng.",
"summary": "Mattermost kết nối qua tài khoản bot trên máy chủ và nhận tin nhắn kênh cùng tin nhắn riêng.",
"steps": [
"Tạo tài khoản bot Mattermost và sao chép token truy cập.",
"Nhập URL máy chủ và cấp quyền vào nhóm cùng các kênh đích.",
"Lưu và bật Mattermost, sau đó nhắc bot hoặc gửi tin nhắn riêng."
],
"fields": {
"serverUrl": {
"label": "URL máy chủ",
"placeholder": "https://mattermost.example.com",
"help": "Dùng URL gốc của không gian Mattermost."
"placeholder": "https://mattermost.example.com"
},
"token": {
"label": "Token bot",
"placeholder": "Token bot Mattermost",
"help": "Tạo từ tài khoản bot Mattermost."
"placeholder": "Token bot Mattermost"
},
"teamId": {
"label": "ID nhóm",
@@ -45,6 +34,78 @@
"allowFrom": {
"label": "Người dùng được phép",
"placeholder": "ID người dùng, phân tách bằng dấu phẩy"
},
"allowFromMatchMode": {
"label": "So khớp người dùng",
"choices": {
"email": "Email",
"id": "ID người dùng",
"username": "Tên người dùng"
}
},
"groupAllowFrom": {
"label": "Các kênh được phép"
},
"replyInThread": {
"label": "Trả lời trong chủ đề",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"includeThreadContext": {
"label": "Bao gồm bối cảnh chủ đề",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"threadContextLimit": {
"label": "Giới hạn bối cảnh của chủ đề"
},
"streaming": {
"label": "Truyền phát",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"reactEmoji": {
"label": "Đọc biểu tượng cảm xúc"
},
"doneEmoji": {
"label": "biểu tượng cảm xúc xong"
},
"sendProgress": {
"label": "Gửi tiến trình",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"sendToolHints": {
"label": "Gửi gợi ý công cụ",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"dm_enabled": {
"label": "Bật tin nhắn trực tiếp",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"dm_policy": {
"label": "Truy cập tin nhắn trực tiếp",
"choices": {
"allowlist": "Danh sách cho phép",
"open": "Mở"
}
},
"dm_allowFrom": {
"label": "Cho phép người dùng nhắn tin trực tiếp"
}
}
}
@@ -1,26 +1,15 @@
{
"description": "在 Mattermost 频道和私信中使用 nanobot。",
"requirements": "Mattermost 服务器地址、机器人令牌和频道权限",
"setup": {
"docsLabel": "打开 Mattermost 配置指南",
"officialLabel": "打开 Mattermost 机器人指南",
"tryIt": "在 Mattermost 频道中提及机器人,或向它发送私信。",
"summary": "Mattermost 通过服务器中的机器人账户连接,并监听频道和私信。",
"steps": [
"创建 Mattermost 机器人账户并复制访问令牌。",
"填写服务器地址,并授予机器人访问目标团队和频道的权限。",
"保存并启用 Mattermost,然后提及机器人或发送私信。"
],
"fields": {
"serverUrl": {
"label": "服务器地址",
"placeholder": "https://mattermost.example.com",
"help": "填写 Mattermost 工作区的基础地址。"
"placeholder": "https://mattermost.example.com"
},
"token": {
"label": "机器人令牌",
"placeholder": "Mattermost 机器人令牌",
"help": "从 Mattermost 机器人账户创建。"
"placeholder": "Mattermost 机器人令牌"
},
"teamId": {
"label": "团队 ID",
@@ -45,6 +34,78 @@
"allowFrom": {
"label": "允许的用户",
"placeholder": "用户 ID,用逗号分隔"
},
"allowFromMatchMode": {
"label": "用户匹配方式",
"choices": {
"email": "邮箱",
"id": "用户 ID",
"username": "用户名"
}
},
"groupAllowFrom": {
"label": "允许的频道"
},
"replyInThread": {
"label": "在话题中回复",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"includeThreadContext": {
"label": "包含话题上下文",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"threadContextLimit": {
"label": "话题上下文上限"
},
"streaming": {
"label": "流式输出",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"reactEmoji": {
"label": "已读表情"
},
"doneEmoji": {
"label": "完成表情"
},
"sendProgress": {
"label": "发送进度消息",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"sendToolHints": {
"label": "发送工具提示",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"dm_enabled": {
"label": "启用私聊",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"dm_policy": {
"label": "私聊权限",
"choices": {
"allowlist": "白名单",
"open": "全部"
}
},
"dm_allowFrom": {
"label": "允许私聊的用户"
}
}
}
@@ -1,26 +1,15 @@
{
"description": "在 Mattermost 頻道和私訊中使用 nanobot。",
"requirements": "Mattermost 伺服器網址、機器人權杖和頻道權限",
"setup": {
"docsLabel": "開啟 Mattermost 設定指南",
"officialLabel": "開啟 Mattermost 機器人指南",
"tryIt": "在 Mattermost 頻道中提及機器人,或向它傳送私訊。",
"summary": "Mattermost 透過伺服器中的機器人帳戶連線,並監聽頻道和私訊。",
"steps": [
"建立 Mattermost 機器人帳戶並複製存取權杖。",
"填入伺服器網址,並授予機器人存取目標團隊和頻道的權限。",
"儲存並啟用 Mattermost,然後提及機器人或傳送私訊。"
],
"fields": {
"serverUrl": {
"label": "伺服器網址",
"placeholder": "https://mattermost.example.com",
"help": "填入 Mattermost 工作區的基礎網址。"
"placeholder": "https://mattermost.example.com"
},
"token": {
"label": "機器人權杖",
"placeholder": "Mattermost 機器人權杖",
"help": "從 Mattermost 機器人帳戶建立。"
"placeholder": "Mattermost 機器人權杖"
},
"teamId": {
"label": "團隊 ID",
@@ -45,6 +34,78 @@
"allowFrom": {
"label": "允許的使用者",
"placeholder": "使用者 ID,以逗號分隔"
},
"allowFromMatchMode": {
"label": "用戶匹配方式",
"choices": {
"email": "信箱",
"id": "使用者 ID",
"username": "使用者名稱"
}
},
"groupAllowFrom": {
"label": "允許的頻道"
},
"replyInThread": {
"label": "在話題中回复",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"includeThreadContext": {
"label": "包含話題上下文",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"threadContextLimit": {
"label": "話題上下文上限"
},
"streaming": {
"label": "串流輸出",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"reactEmoji": {
"label": "已讀表情"
},
"doneEmoji": {
"label": "完成表情"
},
"sendProgress": {
"label": "發送進度訊息",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"sendToolHints": {
"label": "發送工具提示",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"dm_enabled": {
"label": "啟用私聊",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"dm_policy": {
"label": "私聊權限",
"choices": {
"allowlist": "白名單",
"open": "全部"
}
},
"dm_allowFrom": {
"label": "允許私聊的用戶"
}
}
}
+16 -1
View File
@@ -12,6 +12,21 @@ SETUP_SPEC = ChannelSetupSpec(
"sessions": field("list"),
"panels": field("list"),
"allowFrom": field("list"),
"socketUrl": field(),
"socketPath": field(default="/socket.io"),
"socketDisableMsgpack": field("bool", default=False),
"socketReconnectDelayMs": field("int", default=1000),
"socketMaxReconnectDelayMs": field("int", default=10000),
"socketConnectTimeoutMs": field("int", default=10000),
"refreshIntervalMs": field("int", default=30000),
"watchTimeoutMs": field("int", default=25000),
"watchLimit": field("int", default=100),
"retryDelayMs": field("int", default=500),
"maxRetryAttempts": field("int", default=0),
"mention.requireInGroups": field("bool", default=False),
"groups": field("json", default={}),
"replyDelayMode": field(default="non-mention"),
"replyDelayMs": field("int", default=120000),
},
required=(required("clawToken"),),
official_url="https://mochat.io/",
@@ -26,5 +41,5 @@ PLUGIN = ChannelPlugin(
"python-socketio>=5.16.0,<6.0.0",
"msgpack>=1.1.0,<2.0.0",
),
settings_visible=False,
webui="webui/index.ts",
)
+23
View File
@@ -0,0 +1,23 @@
import type { ChannelUiContribution } from "@/channel-plugins/types";
import { chatAppGuideUrl } from "@/components/settings/channels/catalog";
export default {
presentation: {
logoUrl: "https://mochat.io/favicon.ico",
displayName: "MoChat",
initials: "MC",
color: "#111827",
setup: {
mode: "credentials",
docsUrl: chatAppGuideUrl("mochat"),
fields: [
{ key: "channels.mochat.clawToken", section: "credentials" },
{ key: "channels.mochat.baseUrl", section: "connection" },
{ key: "channels.mochat.agentUserId", section: "account" },
{ key: "channels.mochat.sessions", section: "access" },
{ key: "channels.mochat.panels", section: "access" },
{ key: "channels.mochat.allowFrom", section: "access" },
],
},
},
} satisfies ChannelUiContribution;
@@ -0,0 +1,85 @@
{
"setup": {
"docsLabel": "Open MoChat setup guide",
"officialLabel": "Open MoChat",
"fields": {
"clawToken": {
"label": "Claw token",
"placeholder": "MoChat Claw token"
},
"baseUrl": {
"label": "Server URL",
"placeholder": "https://mochat.io"
},
"agentUserId": {
"label": "Agent user ID",
"placeholder": "Optional agent user ID"
},
"sessions": {
"label": "Sessions",
"placeholder": "Session IDs, comma separated"
},
"panels": {
"label": "Panels",
"placeholder": "Panel IDs, comma separated"
},
"allowFrom": {
"label": "Allowed users",
"placeholder": "User IDs, comma separated"
},
"socketUrl": {
"label": "Socket URL"
},
"socketPath": {
"label": "Socket path"
},
"socketDisableMsgpack": {
"label": "Disable MessagePack",
"choices": {
"true": "On",
"false": "Off"
}
},
"socketReconnectDelayMs": {
"label": "Reconnect delay"
},
"socketMaxReconnectDelayMs": {
"label": "Maximum reconnect delay"
},
"socketConnectTimeoutMs": {
"label": "Connection timeout"
},
"refreshIntervalMs": {
"label": "Refresh interval"
},
"watchTimeoutMs": {
"label": "Watch timeout"
},
"watchLimit": {
"label": "Watch batch size"
},
"retryDelayMs": {
"label": "Retry delay"
},
"maxRetryAttempts": {
"label": "Maximum retries"
},
"mention_requireInGroups": {
"label": "Require mentions in groups",
"choices": {
"true": "On",
"false": "Off"
}
},
"groups": {
"label": "Group rules (JSON)"
},
"replyDelayMode": {
"label": "Reply delay mode"
},
"replyDelayMs": {
"label": "Reply delay"
}
}
}
}
@@ -0,0 +1,85 @@
{
"setup": {
"docsLabel": "Abrir la guía de configuración de MoChat",
"officialLabel": "Abrir MoChat",
"fields": {
"clawToken": {
"label": "Token de Claw",
"placeholder": "Token de Claw de MoChat"
},
"baseUrl": {
"label": "URL del servidor",
"placeholder": "https://mochat.io"
},
"agentUserId": {
"label": "ID de usuario del agente",
"placeholder": "ID de usuario del agente opcional"
},
"sessions": {
"label": "Sesiones",
"placeholder": "IDs de sesión, separados por comas"
},
"panels": {
"label": "Paneles",
"placeholder": "IDs de panel, separados por comas"
},
"allowFrom": {
"label": "Usuarios permitidos",
"placeholder": "IDs de usuario, separados por comas"
},
"socketUrl": {
"label": "URL del conector"
},
"socketPath": {
"label": "Ruta del zócalo"
},
"socketDisableMsgpack": {
"label": "Deshabilitar paquete de mensajes",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"socketReconnectDelayMs": {
"label": "Retardo de reconexión"
},
"socketMaxReconnectDelayMs": {
"label": "Retardo máximo de reconexión"
},
"socketConnectTimeoutMs": {
"label": "Tiempo de espera de conexión"
},
"refreshIntervalMs": {
"label": "Intervalo de actualización"
},
"watchTimeoutMs": {
"label": "Ver tiempo de espera"
},
"watchLimit": {
"label": "Ver tamaño del lote"
},
"retryDelayMs": {
"label": "Retraso de reintento"
},
"maxRetryAttempts": {
"label": "Reintentos máximos"
},
"mention_requireInGroups": {
"label": "Requerir menciones en grupos",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"groups": {
"label": "Reglas de grupo (JSON)"
},
"replyDelayMode": {
"label": "Modo de retardo de respuesta"
},
"replyDelayMs": {
"label": "Retraso en la respuesta"
}
}
}
}
@@ -0,0 +1,85 @@
{
"setup": {
"docsLabel": "Ouvrir le guide de configuration MoChat",
"officialLabel": "Ouvrir MoChat",
"fields": {
"clawToken": {
"label": "Jeton Claw",
"placeholder": "Jeton Claw MoChat"
},
"baseUrl": {
"label": "URL du serveur",
"placeholder": "https://mochat.io"
},
"agentUserId": {
"label": "Identifiant utilisateur de l’agent",
"placeholder": "Identifiant utilisateur facultatif"
},
"sessions": {
"label": "Sessions",
"placeholder": "Identifiants de session, séparés par des virgules"
},
"panels": {
"label": "Panneaux",
"placeholder": "Identifiants de panneau, séparés par des virgules"
},
"allowFrom": {
"label": "Utilisateurs autorisés",
"placeholder": "Identifiants utilisateur, séparés par des virgules"
},
"socketUrl": {
"label": "URL de socket"
},
"socketPath": {
"label": "Chemin de prise"
},
"socketDisableMsgpack": {
"label": "Désactiver MessagePack",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"socketReconnectDelayMs": {
"label": "Délai de reconnexion"
},
"socketMaxReconnectDelayMs": {
"label": "Délai de reconnexion maximum"
},
"socketConnectTimeoutMs": {
"label": "Délai de connexion"
},
"refreshIntervalMs": {
"label": "Intervalle d'actualisation"
},
"watchTimeoutMs": {
"label": "Expiration du délai de visionnage"
},
"watchLimit": {
"label": "Surveiller la taille du lot"
},
"retryDelayMs": {
"label": "Délai de nouvelle tentative"
},
"maxRetryAttempts": {
"label": "Nombre maximal de tentatives"
},
"mention_requireInGroups": {
"label": "Exiger des mentions dans les groupes",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"groups": {
"label": "Règles de groupe (JSON)"
},
"replyDelayMode": {
"label": "Mode de délai de réponse"
},
"replyDelayMs": {
"label": "Délai de réponse"
}
}
}
}
@@ -0,0 +1,85 @@
{
"setup": {
"docsLabel": "Buka panduan penyiapan MoChat",
"officialLabel": "Buka MoChat",
"fields": {
"clawToken": {
"label": "Token Claw",
"placeholder": "Token Claw MoChat"
},
"baseUrl": {
"label": "URL server",
"placeholder": "https://mochat.io"
},
"agentUserId": {
"label": "ID pengguna agen",
"placeholder": "ID pengguna agen opsional"
},
"sessions": {
"label": "Sesi",
"placeholder": "ID sesi, pisahkan dengan koma"
},
"panels": {
"label": "Panel",
"placeholder": "ID panel, pisahkan dengan koma"
},
"allowFrom": {
"label": "Pengguna yang diizinkan",
"placeholder": "ID pengguna, pisahkan dengan koma"
},
"socketUrl": {
"label": "URL soket"
},
"socketPath": {
"label": "Jalur soket"
},
"socketDisableMsgpack": {
"label": "Nonaktifkan MessagePack",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"socketReconnectDelayMs": {
"label": "Sambungkan kembali penundaan"
},
"socketMaxReconnectDelayMs": {
"label": "Penundaan penyambungan kembali maksimum"
},
"socketConnectTimeoutMs": {
"label": "Batas waktu koneksi habis"
},
"refreshIntervalMs": {
"label": "Interval penyegaran"
},
"watchTimeoutMs": {
"label": "Waktu tunggu tonton habis"
},
"watchLimit": {
"label": "Perhatikan ukuran batch"
},
"retryDelayMs": {
"label": "Coba lagi penundaan"
},
"maxRetryAttempts": {
"label": "Percobaan ulang maksimum"
},
"mention_requireInGroups": {
"label": "Memerlukan penyebutan dalam kelompok",
"choices": {
"true": "Aktif",
"false": "Mati"
}
},
"groups": {
"label": "Aturan grup (JSON)"
},
"replyDelayMode": {
"label": "Mode penundaan balasan"
},
"replyDelayMs": {
"label": "Keterlambatan balasan"
}
}
}
}
@@ -0,0 +1,85 @@
{
"setup": {
"docsLabel": "MoChat 設定ガイドを開く",
"officialLabel": "MoChat を開く",
"fields": {
"clawToken": {
"label": "Claw トークン",
"placeholder": "MoChat Claw トークン"
},
"baseUrl": {
"label": "サーバー URL",
"placeholder": "https://mochat.io"
},
"agentUserId": {
"label": "エージェントのユーザー ID",
"placeholder": "任意のエージェントユーザー ID"
},
"sessions": {
"label": "セッション",
"placeholder": "セッション ID(カンマ区切り)"
},
"panels": {
"label": "パネル",
"placeholder": "パネル ID(カンマ区切り)"
},
"allowFrom": {
"label": "許可するユーザー",
"placeholder": "ユーザー ID(カンマ区切り)"
},
"socketUrl": {
"label": "ソケットURL"
},
"socketPath": {
"label": "ソケットパス"
},
"socketDisableMsgpack": {
"label": "メッセージパックを無効にする",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"socketReconnectDelayMs": {
"label": "再接続の遅延"
},
"socketMaxReconnectDelayMs": {
"label": "最大再接続遅延"
},
"socketConnectTimeoutMs": {
"label": "接続タイムアウト"
},
"refreshIntervalMs": {
"label": "リフレッシュ間隔"
},
"watchTimeoutMs": {
"label": "ウォッチタイムアウト"
},
"watchLimit": {
"label": "バッチサイズを監視する"
},
"retryDelayMs": {
"label": "再試行の遅延"
},
"maxRetryAttempts": {
"label": "最大再試行回数"
},
"mention_requireInGroups": {
"label": "グループでのメンションを必須にする",
"choices": {
"true": "オン",
"false": "オフ"
}
},
"groups": {
"label": "グループルール(JSON)"
},
"replyDelayMode": {
"label": "返信遅延モード"
},
"replyDelayMs": {
"label": "返信遅延"
}
}
}
}
@@ -0,0 +1,85 @@
{
"setup": {
"docsLabel": "MoChat 설정 가이드 열기",
"officialLabel": "MoChat 열기",
"fields": {
"clawToken": {
"label": "Claw 토큰",
"placeholder": "MoChat Claw 토큰"
},
"baseUrl": {
"label": "서버 URL",
"placeholder": "https://mochat.io"
},
"agentUserId": {
"label": "에이전트 사용자 ID",
"placeholder": "선택 사항인 에이전트 사용자 ID"
},
"sessions": {
"label": "세션",
"placeholder": "세션 ID, 쉼표로 구분"
},
"panels": {
"label": "패널",
"placeholder": "패널 ID, 쉼표로 구분"
},
"allowFrom": {
"label": "허용된 사용자",
"placeholder": "사용자 ID, 쉼표로 구분"
},
"socketUrl": {
"label": "소켓 URL"
},
"socketPath": {
"label": "소켓 경로"
},
"socketDisableMsgpack": {
"label": "MessagePack 비활성화",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"socketReconnectDelayMs": {
"label": "재연결 지연"
},
"socketMaxReconnectDelayMs": {
"label": "최대 재연결 지연"
},
"socketConnectTimeoutMs": {
"label": "연결 시간 초과"
},
"refreshIntervalMs": {
"label": "새로 고침 간격"
},
"watchTimeoutMs": {
"label": "시청 시간 초과"
},
"watchLimit": {
"label": "시계 배치 크기"
},
"retryDelayMs": {
"label": "재시도 지연"
},
"maxRetryAttempts": {
"label": "최대 재시도"
},
"mention_requireInGroups": {
"label": "그룹에서 멘션 필요",
"choices": {
"true": "켜기",
"false": "끄기"
}
},
"groups": {
"label": "그룹 규칙(JSON)"
},
"replyDelayMode": {
"label": "응답 지연 모드"
},
"replyDelayMs": {
"label": "답변 지연"
}
}
}
}
@@ -0,0 +1,85 @@
{
"setup": {
"docsLabel": "Abrir o guia de configuração do MoChat",
"officialLabel": "Abrir o MoChat",
"fields": {
"clawToken": {
"label": "Token Claw",
"placeholder": "Token Claw do MoChat"
},
"baseUrl": {
"label": "URL do servidor",
"placeholder": "https://mochat.io"
},
"agentUserId": {
"label": "ID de usuário do agente",
"placeholder": "ID de usuário opcional do agente"
},
"sessions": {
"label": "Sessões",
"placeholder": "IDs de sessão, separados por vírgulas"
},
"panels": {
"label": "Painéis",
"placeholder": "IDs de painel, separados por vírgulas"
},
"allowFrom": {
"label": "Usuários permitidos",
"placeholder": "IDs de usuário, separados por vírgulas"
},
"socketUrl": {
"label": "URL do soquete"
},
"socketPath": {
"label": "Caminho do soquete"
},
"socketDisableMsgpack": {
"label": "Desativar MessagePack",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"socketReconnectDelayMs": {
"label": "Atraso na reconexão"
},
"socketMaxReconnectDelayMs": {
"label": "Atraso máximo de reconexão"
},
"socketConnectTimeoutMs": {
"label": "Tempo limite de conexão"
},
"refreshIntervalMs": {
"label": "Intervalo de atualização"
},
"watchTimeoutMs": {
"label": "Tempo limite de exibição"
},
"watchLimit": {
"label": "Observe o tamanho do lote"
},
"retryDelayMs": {
"label": "Atraso na nova tentativa"
},
"maxRetryAttempts": {
"label": "Máximo de tentativas"
},
"mention_requireInGroups": {
"label": "Exigir menções em grupos",
"choices": {
"true": "Ligado",
"false": "Desligado"
}
},
"groups": {
"label": "Regras de grupo (JSON)"
},
"replyDelayMode": {
"label": "Modo de atraso de resposta"
},
"replyDelayMs": {
"label": "Atraso na resposta"
}
}
}
}
@@ -0,0 +1,85 @@
{
"setup": {
"docsLabel": "Mở hướng dẫn thiết lập MoChat",
"officialLabel": "Mở MoChat",
"fields": {
"clawToken": {
"label": "Mã Claw",
"placeholder": "Mã Claw của MoChat"
},
"baseUrl": {
"label": "URL máy chủ",
"placeholder": "https://mochat.io"
},
"agentUserId": {
"label": "ID người dùng của agent",
"placeholder": "ID người dùng agent không bắt buộc"
},
"sessions": {
"label": "Phiên",
"placeholder": "ID phiên, phân tách bằng dấu phẩy"
},
"panels": {
"label": "Bảng",
"placeholder": "ID bảng, phân tách bằng dấu phẩy"
},
"allowFrom": {
"label": "Người dùng được phép",
"placeholder": "ID người dùng, phân tách bằng dấu phẩy"
},
"socketUrl": {
"label": "URL ổ cắm"
},
"socketPath": {
"label": "Đường dẫn ổ cắm"
},
"socketDisableMsgpack": {
"label": "Tắt MessagePack",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"socketReconnectDelayMs": {
"label": "Độ trễ kết nối lại"
},
"socketMaxReconnectDelayMs": {
"label": "Độ trễ kết nối lại tối đa"
},
"socketConnectTimeoutMs": {
"label": "Hết thời gian kết nối"
},
"refreshIntervalMs": {
"label": "Khoảng thời gian làm mới"
},
"watchTimeoutMs": {
"label": "Hết thời gian xem"
},
"watchLimit": {
"label": "Kích thước lô đồng hồ"
},
"retryDelayMs": {
"label": "Trì hoãn thử lại"
},
"maxRetryAttempts": {
"label": "Số lần thử lại tối đa"
},
"mention_requireInGroups": {
"label": "Yêu cầu đề cập trong nhóm",
"choices": {
"true": "Bật",
"false": "Tắt"
}
},
"groups": {
"label": "Quy tắc nhóm (JSON)"
},
"replyDelayMode": {
"label": "Chế độ trì hoãn trả lời"
},
"replyDelayMs": {
"label": "Trả lời chậm trễ"
}
}
}
}
@@ -0,0 +1,85 @@
{
"setup": {
"docsLabel": "打开 MoChat 配置指南",
"officialLabel": "打开 MoChat",
"fields": {
"clawToken": {
"label": "Claw 令牌",
"placeholder": "MoChat Claw 令牌"
},
"baseUrl": {
"label": "服务地址",
"placeholder": "https://mochat.io"
},
"agentUserId": {
"label": "Agent 用户 ID",
"placeholder": "可选的 Agent 用户 ID"
},
"sessions": {
"label": "会话",
"placeholder": "会话 ID,用逗号分隔"
},
"panels": {
"label": "面板",
"placeholder": "面板 ID,用逗号分隔"
},
"allowFrom": {
"label": "允许的用户",
"placeholder": "用户 ID,用逗号分隔"
},
"socketUrl": {
"label": "Socket 地址"
},
"socketPath": {
"label": "Socket 路径"
},
"socketDisableMsgpack": {
"label": "禁用 MessagePack",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"socketReconnectDelayMs": {
"label": "重连延迟"
},
"socketMaxReconnectDelayMs": {
"label": "最大重连延迟"
},
"socketConnectTimeoutMs": {
"label": "连接超时"
},
"refreshIntervalMs": {
"label": "刷新间隔"
},
"watchTimeoutMs": {
"label": "拉取超时"
},
"watchLimit": {
"label": "单次拉取数量"
},
"retryDelayMs": {
"label": "重试延迟"
},
"maxRetryAttempts": {
"label": "最大重试次数"
},
"mention_requireInGroups": {
"label": "群组中需要提及",
"choices": {
"true": "开启",
"false": "关闭"
}
},
"groups": {
"label": "群组规则(JSON)"
},
"replyDelayMode": {
"label": "回复延迟方式"
},
"replyDelayMs": {
"label": "回复延迟"
}
}
}
}
@@ -0,0 +1,85 @@
{
"setup": {
"docsLabel": "開啟 MoChat 設定指南",
"officialLabel": "開啟 MoChat",
"fields": {
"clawToken": {
"label": "Claw 權杖",
"placeholder": "MoChat Claw 權杖"
},
"baseUrl": {
"label": "服務位址",
"placeholder": "https://mochat.io"
},
"agentUserId": {
"label": "Agent 使用者 ID",
"placeholder": "選填的 Agent 使用者 ID"
},
"sessions": {
"label": "工作階段",
"placeholder": "工作階段 ID,以逗號分隔"
},
"panels": {
"label": "面板",
"placeholder": "面板 ID,以逗號分隔"
},
"allowFrom": {
"label": "允許的使用者",
"placeholder": "使用者 ID,以逗號分隔"
},
"socketUrl": {
"label": "Socket 位址"
},
"socketPath": {
"label": "Socket 路徑"
},
"socketDisableMsgpack": {
"label": "禁用 MessagePack",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"socketReconnectDelayMs": {
"label": "重連延遲"
},
"socketMaxReconnectDelayMs": {
"label": "最大重連延遲"
},
"socketConnectTimeoutMs": {
"label": "連線逾時"
},
"refreshIntervalMs": {
"label": "刷新間隔"
},
"watchTimeoutMs": {
"label": "拉取超時"
},
"watchLimit": {
"label": "單次拉取數量"
},
"retryDelayMs": {
"label": "重試延遲"
},
"maxRetryAttempts": {
"label": "最大重試次數"
},
"mention_requireInGroups": {
"label": "群組需要提及",
"choices": {
"true": "開啟",
"false": "關閉"
}
},
"groups": {
"label": "群組規則(JSON)"
},
"replyDelayMode": {
"label": "回覆延遲方式"
},
"replyDelayMs": {
"label": "回覆延遲"
}
}
}
}
+10
View File
@@ -11,6 +11,16 @@ SETUP_SPEC = ChannelSetupSpec(
"tenantId": field(),
"path": field(default="/api/messages"),
"allowFrom": field("list"),
"host": field(default="0.0.0.0"),
"port": field("int", default=3978),
"replyInThread": field("bool", default=True),
"mentionOnlyResponse": field(default="Hi — what can I help with?"),
"validateInboundAuth": field("bool", default=True),
"refTtlDays": field("int", default=30),
"pruneWebChatRefs": field("bool", default=True),
"pruneNonPersonalRefs": field("bool", default=True),
"refTouchIntervalS": field("int", default=300),
"trustedServiceUrlHosts": field("list"),
},
required=required_fields("appId", "appPassword"),
official_url="https://dev.teams.microsoft.com/apps",
+6 -6
View File
@@ -3,19 +3,19 @@ import { chatAppGuideUrl } from "@/components/settings/channels/catalog";
export default {
presentation: {
logoUrl: "https://teams.public.onecdn.static.microsoft/evergreen-assets/icons/microsoft_teams_logo_refresh_v2025.ico",
displayName: "Microsoft Teams",
initials: "MS",
color: "#6264A7",
logoUrl: "https://www.microsoft.com/favicon.ico",
setup: {
mode: "credentials",
docsUrl: chatAppGuideUrl("msteams"),
fields: [
{ key: "channels.msteams.appId" },
{ key: "channels.msteams.appPassword" },
{ key: "channels.msteams.tenantId" },
{ key: "channels.msteams.path" },
{ key: "channels.msteams.allowFrom" },
{ key: "channels.msteams.appId", section: "credentials" },
{ key: "channels.msteams.appPassword", section: "credentials" },
{ key: "channels.msteams.tenantId", section: "account" },
{ key: "channels.msteams.path", section: "connection" },
{ key: "channels.msteams.allowFrom", section: "access" },
],
},
},
+48 -13
View File
@@ -1,26 +1,15 @@
{
"description": "Use nanobot from Microsoft Teams chats.",
"requirements": "Azure bot app credentials, public callback endpoint",
"setup": {
"docsLabel": "Open Teams setup",
"officialLabel": "Open Teams developer portal",
"tryIt": "Install the Teams app and send a test message.",
"summary": "Teams receives messages through the Bot Framework callback URL. It needs a reachable HTTPS endpoint in production.",
"steps": [
"Create an Azure Bot or Teams app and copy its App ID and client secret.",
"Expose the callback path over HTTPS and add it as the bot messaging endpoint.",
"Save and enable Teams, then install the app and send a test message."
],
"fields": {
"appId": {
"label": "App ID",
"placeholder": "Microsoft App ID",
"help": "Copy it from the Azure Bot or Teams app registration."
"placeholder": "Microsoft App ID"
},
"appPassword": {
"label": "Client secret",
"placeholder": "••••••",
"help": "Create a client secret for the Microsoft app."
"placeholder": "••••••"
},
"tenantId": {
"label": "Tenant ID",
@@ -33,6 +22,52 @@
"allowFrom": {
"label": "Allowed users",
"placeholder": "Teams user IDs, comma separated"
},
"host": {
"label": "Listen host"
},
"port": {
"label": "Listen port"
},
"replyInThread": {
"label": "Reply in thread",
"choices": {
"true": "On",
"false": "Off"
}
},
"mentionOnlyResponse": {
"label": "Mention-only reply"
},
"validateInboundAuth": {
"label": "Validate incoming requests",
"choices": {
"true": "On",
"false": "Off"
}
},
"refTtlDays": {
"label": "Conversation lifetime"
},
"pruneWebChatRefs": {
"label": "Remove Web Chat conversations",
"choices": {
"true": "On",
"false": "Off"
}
},
"pruneNonPersonalRefs": {
"label": "Remove non-personal conversations",
"choices": {
"true": "On",
"false": "Off"
}
},
"refTouchIntervalS": {
"label": "Conversation refresh interval"
},
"trustedServiceUrlHosts": {
"label": "Trusted service hosts"
}
}
}
+48 -13
View File
@@ -1,26 +1,15 @@
{
"description": "Usa nanobot desde chats de Microsoft Teams.",
"requirements": "Credenciales de la app bot de Azure y endpoint público de callback",
"setup": {
"docsLabel": "Abrir guía de Teams",
"officialLabel": "Abrir portal de desarrolladores de Teams",
"tryIt": "Instala la app de Teams y envía un mensaje de prueba.",
"summary": "Teams recibe mensajes mediante la URL de callback de Bot Framework. En producción necesita un endpoint HTTPS accesible.",
"steps": [
"Crea un Azure Bot o una app de Teams y copia el App ID y el secreto de cliente.",
"Expón la ruta de callback por HTTPS y añádela como endpoint de mensajería.",
"Guarda y activa Teams; después instala la app y envía un mensaje de prueba."
],
"fields": {
"appId": {
"label": "App ID",
"placeholder": "Microsoft App ID",
"help": "Cópialo del registro de Azure Bot o la app de Teams."
"placeholder": "Microsoft App ID"
},
"appPassword": {
"label": "Secreto de cliente",
"placeholder": "••••••",
"help": "Crea un secreto de cliente para la app de Microsoft."
"placeholder": "••••••"
},
"tenantId": {
"label": "ID del tenant",
@@ -33,6 +22,52 @@
"allowFrom": {
"label": "Usuarios permitidos",
"placeholder": "ID de usuario de Teams separados por comas"
},
"host": {
"label": "Escuchar anfitrión"
},
"port": {
"label": "Puerto de escucha"
},
"replyInThread": {
"label": "Responder en el hilo",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"mentionOnlyResponse": {
"label": "Respuesta de solo mención"
},
"validateInboundAuth": {
"label": "Validar solicitudes entrantes",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"refTtlDays": {
"label": "Duración de la conversación"
},
"pruneWebChatRefs": {
"label": "Eliminar conversaciones de chat web",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"pruneNonPersonalRefs": {
"label": "Eliminar conversaciones no personales",
"choices": {
"true": "encendido",
"false": "Apagado"
}
},
"refTouchIntervalS": {
"label": "Intervalo de actualización de la conversación"
},
"trustedServiceUrlHosts": {
"label": "Anfitriones de servicios confiables"
}
}
}
+48 -13
View File
@@ -1,26 +1,15 @@
{
"description": "Utilisez nanobot depuis les conversations Microsoft Teams.",
"requirements": "Identifiants de l’application bot Azure et endpoint de rappel public",
"setup": {
"docsLabel": "Ouvrir le guide Teams",
"officialLabel": "Ouvrir le portail développeur Teams",
"tryIt": "Installez l’application Teams et envoyez un message test.",
"summary": "Teams reçoit les messages via l’URL de rappel Bot Framework. Un endpoint HTTPS accessible est nécessaire en production.",
"steps": [
"Créez un bot Azure ou une application Teams et copiez l’App ID et le secret client.",
"Exposez le chemin de rappel en HTTPS et définissez-le comme endpoint de messagerie.",
"Enregistrez et activez Teams, puis installez l’application et envoyez un message test."
],
"fields": {
"appId": {
"label": "App ID",
"placeholder": "Microsoft App ID",
"help": "Copiez-le depuis l’inscription du bot Azure ou de l’application Teams."
"placeholder": "Microsoft App ID"
},
"appPassword": {
"label": "Secret client",
"placeholder": "••••••",
"help": "Créez un secret client pour l’application Microsoft."
"placeholder": "••••••"
},
"tenantId": {
"label": "ID du locataire",
@@ -33,6 +22,52 @@
"allowFrom": {
"label": "Utilisateurs autorisés",
"placeholder": "ID utilisateur Teams séparés par des virgules"
},
"host": {
"label": "Écouter l'hôte"
},
"port": {
"label": "Port d'écoute"
},
"replyInThread": {
"label": "Répondre dans le fil de discussion",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"mentionOnlyResponse": {
"label": "Réponse avec mention uniquement"
},
"validateInboundAuth": {
"label": "Valider les demandes entrantes",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"refTtlDays": {
"label": "Durée de vie des conversations"
},
"pruneWebChatRefs": {
"label": "Supprimer les conversations de chat Web",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"pruneNonPersonalRefs": {
"label": "Supprimer les conversations non personnelles",
"choices": {
"true": "Sur",
"false": "Désactivé"
}
},
"refTouchIntervalS": {
"label": "Intervalle d'actualisation des conversations"
},
"trustedServiceUrlHosts": {
"label": "Hôtes de services de confiance"
}
}
}
Loaded 100 of 291 files, more files were not shown because too many files have changed in this diff. Show more