refactor(channels): make built-in channels self-contained (#4908)
* refactor(channels): own setup and instance contracts * refactor(channels): isolate management contracts * refactor(channels): normalize activation contracts * fix(channels): enforce management contracts * refactor(channels): finish setup ownership migration * fix(channels): harden management contracts * fix(channels): enforce lazy loading and runtime ownership * fix(feishu): make multi-instance startup idempotent * fix(webui): render channel setup contracts cleanly * fix(feishu): stop websocket clients cleanly * fix(channels): enforce persistence and activation gates * fix(channels): preserve global feature action scope * fix(channels): apply defaults for single plugins * fix(channels): enforce management contract boundaries * refactor(feishu): remove identity helper indirection * fix(channels): preserve management setup contracts * refactor(channels): generalize instance settings UI * refactor(channels): package channel plugins with web UI metadata * refactor(channels): make built-ins self-contained packages * test(channels): colocate tests with channel packages * fix(dingtalk): use official brand icon * feat(channels): colocate webui translations * docs(channels): clarify plugin ownership * test(exec): remove output wait race * refactor(channels): unify plugin descriptors * fix(channels): enforce descriptor-owned contracts * refactor(channels): finish package-owned plugin setup * refactor(channels): use repository-owned packages only * fix(channels): self-describe dependencies and runtime state * fix(channels): warn about legacy entry points
This commit is contained in:
1 parent
7aaac37bca
commit
462a0dfb0f
388 files changed
+17093
-5110
No files matched your search
@@ -0,0 +1,182 @@
|
||||
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 { FeishuConnectFlow } from "./FeishuConnectFlow";
|
||||
|
||||
export function FeishuAssistantsPanel({
|
||||
token,
|
||||
feature,
|
||||
showBrandLogos,
|
||||
chatAppsDocsUrl,
|
||||
onFeaturesUpdate,
|
||||
}: ChannelPluginPanelProps) {
|
||||
const { t } = useTranslation();
|
||||
const tx = channelTranslator(t, "feishu");
|
||||
const instances = feature.instances?.length
|
||||
? feature.instances
|
||||
: [defaultFeishuInstance(feature)];
|
||||
|
||||
return (
|
||||
<ChannelInstancesPanel
|
||||
token={token}
|
||||
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
|
||||
key={instance.id}
|
||||
token={token}
|
||||
instance={instance}
|
||||
onFeaturesUpdate={onFeaturesUpdate}
|
||||
/>
|
||||
),
|
||||
footer: (
|
||||
<div className="mt-4 overflow-hidden rounded-[16px] 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 { 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(token, "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-[12px] 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",
|
||||
name: "nanobot",
|
||||
enabled: feature.enabled,
|
||||
configured: Boolean(feature.configured),
|
||||
config_values: feature.config_values ?? {},
|
||||
configured_fields: feature.configured_fields ?? [],
|
||||
};
|
||||
}
|
||||
|
||||
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)}`;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { channelTranslator } from "@/channel-plugins/i18n";
|
||||
import { ChannelQrConnectFlow } from "@/components/settings/channels/ChannelQrConnectFlow";
|
||||
import type { NanobotFeaturesPayload } from "@/lib/types";
|
||||
|
||||
export function FeishuConnectFlow({
|
||||
token,
|
||||
instanceId = "default",
|
||||
mode = "replace",
|
||||
idleLabel,
|
||||
connectRequestId,
|
||||
onFeaturesUpdate,
|
||||
}: {
|
||||
token: string;
|
||||
instanceId?: string;
|
||||
mode?: "replace" | "create";
|
||||
idleLabel?: string;
|
||||
connectRequestId?: number;
|
||||
onFeaturesUpdate: (payload: NanobotFeaturesPayload) => void;
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const tx = channelTranslator(t, "feishu");
|
||||
return (
|
||||
<ChannelQrConnectFlow
|
||||
token={token}
|
||||
channelName="feishu"
|
||||
startOptions={{ domain: "feishu", instanceId, mode }}
|
||||
idleLabel={idleLabel}
|
||||
connectRequestId={connectRequestId}
|
||||
onFeaturesUpdate={onFeaturesUpdate}
|
||||
labels={{
|
||||
qrAlt: tx("custom.qrAlt", "Feishu connection QR code"),
|
||||
scanTitle: tx("custom.scanTitle", "Scan with Feishu"),
|
||||
scanDescription: tx(
|
||||
"custom.scanDescription",
|
||||
"Use Feishu or Lark on your phone to scan this code. nanobot will finish setup automatically after authorization.",
|
||||
),
|
||||
waiting: tx("custom.waiting", "Waiting for authorization..."),
|
||||
connected: tx("custom.connected", "Feishu is connected."),
|
||||
stopped: tx("custom.stopped", "Connection stopped."),
|
||||
connecting: tx("custom.connecting", "Connecting..."),
|
||||
scanAgain: t("settings.channels.scanAgain", { defaultValue: "Scan again" }),
|
||||
connect: t("settings.channels.connect", { defaultValue: "Connect" }),
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import type { ChannelUiContribution } from "@/channel-plugins/types";
|
||||
import { chatAppGuideUrl } from "@/components/settings/channels/catalog";
|
||||
|
||||
import { FeishuAssistantsPanel } from "./FeishuAssistantsPanel";
|
||||
|
||||
export default {
|
||||
Panel: FeishuAssistantsPanel,
|
||||
aliases: {
|
||||
lark: {
|
||||
displayName: "Lark",
|
||||
initials: "LK",
|
||||
logoUrl: "https://www.larksuite.com/favicon.ico",
|
||||
},
|
||||
},
|
||||
presentation: {
|
||||
displayName: "Feishu",
|
||||
initials: "FS",
|
||||
color: "#3370FF",
|
||||
logoUrl: "https://www.feishu.cn/favicon.ico",
|
||||
setup: {
|
||||
mode: "connect",
|
||||
command: "nanobot channels login feishu",
|
||||
docsUrl: chatAppGuideUrl("feishu"),
|
||||
manualFields: [
|
||||
{ key: "channels.feishu.appId" },
|
||||
{ key: "channels.feishu.appSecret" },
|
||||
{ key: "channels.feishu.domain" },
|
||||
{ key: "channels.feishu.groupPolicy" },
|
||||
{ key: "channels.feishu.allowFrom" },
|
||||
],
|
||||
},
|
||||
},
|
||||
} satisfies ChannelUiContribution;
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"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",
|
||||
"placeholder": "cli_xxx"
|
||||
},
|
||||
"appSecret": {
|
||||
"label": "App Secret",
|
||||
"placeholder": "Leave blank to keep current secret",
|
||||
"help": "Paste a new App Secret only when rotating credentials."
|
||||
},
|
||||
"domain": {
|
||||
"label": "Region",
|
||||
"choices": {
|
||||
"feishu": "Feishu",
|
||||
"lark": "Lark"
|
||||
}
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "Group behavior",
|
||||
"choices": {
|
||||
"mention": "Mention only",
|
||||
"open": "All messages",
|
||||
"allowlist": "Allowlist"
|
||||
}
|
||||
},
|
||||
"allowFrom": {
|
||||
"label": "Allowed users",
|
||||
"placeholder": "User IDs, comma separated"
|
||||
},
|
||||
"topicIsolation": {
|
||||
"label": "Topic isolation",
|
||||
"choices": {
|
||||
"true": "Separate session for each topic",
|
||||
"false": "One shared session for the group"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"custom": {
|
||||
"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.",
|
||||
"waiting": "Waiting for authorization...",
|
||||
"connected": "Feishu is connected.",
|
||||
"stopped": "Connection stopped.",
|
||||
"connecting": "Connecting..."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"description": "Usa nanobot en chats y grupos de Feishu.",
|
||||
"requirements": "Credenciales de Feishu, suscripción a eventos y gateway",
|
||||
"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",
|
||||
"placeholder": "cli_xxx"
|
||||
},
|
||||
"appSecret": {
|
||||
"label": "App Secret",
|
||||
"placeholder": "Déjalo vacío para conservar el secreto",
|
||||
"help": "Pega uno nuevo solo al rotar credenciales."
|
||||
},
|
||||
"domain": {
|
||||
"label": "Región",
|
||||
"choices": {
|
||||
"feishu": "Feishu",
|
||||
"lark": "Lark"
|
||||
}
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "Comportamiento en grupos",
|
||||
"choices": {
|
||||
"mention": "Solo menciones",
|
||||
"open": "Todos los mensajes",
|
||||
"allowlist": "Lista permitida"
|
||||
}
|
||||
},
|
||||
"allowFrom": {
|
||||
"label": "Usuarios permitidos",
|
||||
"placeholder": "ID de usuario separados por comas"
|
||||
},
|
||||
"topicIsolation": {
|
||||
"label": "Aislamiento por tema",
|
||||
"choices": {
|
||||
"true": "Una sesión separada por tema",
|
||||
"false": "Una sesión compartida para el grupo"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"custom": {
|
||||
"toggleAssistant": "Asistente {{name}}",
|
||||
"configured": "Conectado",
|
||||
"needsSetup": "Necesita autorización",
|
||||
"noAppId": "Sin App ID",
|
||||
"createAnother": "Crear otro asistente",
|
||||
"createHint": "Crea un bot Feishu independiente para otro equipo o flujo.",
|
||||
"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.",
|
||||
"waiting": "Esperando autorización...",
|
||||
"connected": "Feishu está conectado.",
|
||||
"stopped": "Conexión detenida.",
|
||||
"connecting": "Conectando..."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"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",
|
||||
"placeholder": "cli_xxx"
|
||||
},
|
||||
"appSecret": {
|
||||
"label": "App Secret",
|
||||
"placeholder": "Laisser vide pour conserver le secret",
|
||||
"help": "Collez un nouveau secret uniquement lors d’une rotation."
|
||||
},
|
||||
"domain": {
|
||||
"label": "Région",
|
||||
"choices": {
|
||||
"feishu": "Feishu",
|
||||
"lark": "Lark"
|
||||
}
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "Comportement en groupe",
|
||||
"choices": {
|
||||
"mention": "Mentions uniquement",
|
||||
"open": "Tous les messages",
|
||||
"allowlist": "Liste d’autorisation"
|
||||
}
|
||||
},
|
||||
"allowFrom": {
|
||||
"label": "Utilisateurs autorisés",
|
||||
"placeholder": "ID utilisateur séparés par des virgules"
|
||||
},
|
||||
"topicIsolation": {
|
||||
"label": "Isolation par sujet",
|
||||
"choices": {
|
||||
"true": "Une session séparée par sujet",
|
||||
"false": "Une session partagée pour le groupe"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"custom": {
|
||||
"toggleAssistant": "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 ou un autre flux.",
|
||||
"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.",
|
||||
"waiting": "En attente d’autorisation...",
|
||||
"connected": "Feishu est connecté.",
|
||||
"stopped": "Connexion arrêtée.",
|
||||
"connecting": "Connexion..."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"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",
|
||||
"placeholder": "cli_xxx"
|
||||
},
|
||||
"appSecret": {
|
||||
"label": "App Secret",
|
||||
"placeholder": "Kosongkan untuk mempertahankan secret",
|
||||
"help": "Tempel secret baru hanya saat rotasi kredensial."
|
||||
},
|
||||
"domain": {
|
||||
"label": "Wilayah",
|
||||
"choices": {
|
||||
"feishu": "Feishu",
|
||||
"lark": "Lark"
|
||||
}
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "Perilaku grup",
|
||||
"choices": {
|
||||
"mention": "Hanya sebutan",
|
||||
"open": "Semua pesan",
|
||||
"allowlist": "Daftar izin"
|
||||
}
|
||||
},
|
||||
"allowFrom": {
|
||||
"label": "Pengguna yang diizinkan",
|
||||
"placeholder": "ID pengguna, dipisahkan koma"
|
||||
},
|
||||
"topicIsolation": {
|
||||
"label": "Isolasi topik",
|
||||
"choices": {
|
||||
"true": "Sesi terpisah untuk setiap topik",
|
||||
"false": "Satu sesi bersama untuk grup"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"custom": {
|
||||
"toggleAssistant": "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 dengan Feishu atau Lark di ponsel. nanobot akan menyelesaikan setup setelah otorisasi.",
|
||||
"waiting": "Menunggu otorisasi...",
|
||||
"connected": "Feishu sudah terhubung.",
|
||||
"stopped": "Koneksi dihentikan.",
|
||||
"connecting": "Menghubungkan..."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"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",
|
||||
"placeholder": "cli_xxx"
|
||||
},
|
||||
"appSecret": {
|
||||
"label": "App Secret",
|
||||
"placeholder": "現在のシークレットを保持するには空欄",
|
||||
"help": "認証情報を更新するときだけ新しい App Secret を貼り付けます。"
|
||||
},
|
||||
"domain": {
|
||||
"label": "地域",
|
||||
"choices": {
|
||||
"feishu": "Feishu",
|
||||
"lark": "Lark"
|
||||
}
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "グループでの動作",
|
||||
"choices": {
|
||||
"mention": "メンションのみ",
|
||||
"open": "すべてのメッセージ",
|
||||
"allowlist": "許可リスト"
|
||||
}
|
||||
},
|
||||
"allowFrom": {
|
||||
"label": "許可するユーザー",
|
||||
"placeholder": "ユーザー ID(カンマ区切り)"
|
||||
},
|
||||
"topicIsolation": {
|
||||
"label": "トピック分離",
|
||||
"choices": {
|
||||
"true": "トピックごとにセッションを分離",
|
||||
"false": "グループでセッションを共有"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"custom": {
|
||||
"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 が設定を完了します。",
|
||||
"waiting": "認可を待っています...",
|
||||
"connected": "Feishu に接続しました。",
|
||||
"stopped": "接続を停止しました。",
|
||||
"connecting": "接続中..."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"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",
|
||||
"placeholder": "cli_xxx"
|
||||
},
|
||||
"appSecret": {
|
||||
"label": "App Secret",
|
||||
"placeholder": "현재 Secret을 유지하려면 비워 두세요",
|
||||
"help": "자격 증명을 교체할 때만 새 App Secret을 붙여 넣으세요."
|
||||
},
|
||||
"domain": {
|
||||
"label": "지역",
|
||||
"choices": {
|
||||
"feishu": "Feishu",
|
||||
"lark": "Lark"
|
||||
}
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "그룹 동작",
|
||||
"choices": {
|
||||
"mention": "멘션만",
|
||||
"open": "모든 메시지",
|
||||
"allowlist": "허용 목록"
|
||||
}
|
||||
},
|
||||
"allowFrom": {
|
||||
"label": "허용된 사용자",
|
||||
"placeholder": "사용자 ID, 쉼표로 구분"
|
||||
},
|
||||
"topicIsolation": {
|
||||
"label": "주제 격리",
|
||||
"choices": {
|
||||
"true": "주제별로 세션 분리",
|
||||
"false": "그룹에서 하나의 세션 공유"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"custom": {
|
||||
"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이 설정을 완료합니다.",
|
||||
"waiting": "승인을 기다리는 중...",
|
||||
"connected": "Feishu가 연결되었습니다.",
|
||||
"stopped": "연결이 중지되었습니다.",
|
||||
"connecting": "연결 중..."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"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",
|
||||
"placeholder": "cli_xxx"
|
||||
},
|
||||
"appSecret": {
|
||||
"label": "App Secret",
|
||||
"placeholder": "Deixe vazio para manter o segredo",
|
||||
"help": "Cole um novo apenas ao trocar credenciais."
|
||||
},
|
||||
"domain": {
|
||||
"label": "Região",
|
||||
"choices": {
|
||||
"feishu": "Feishu",
|
||||
"lark": "Lark"
|
||||
}
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "Comportamento em grupos",
|
||||
"choices": {
|
||||
"mention": "Somente menções",
|
||||
"open": "Todas as mensagens",
|
||||
"allowlist": "Lista de permissão"
|
||||
}
|
||||
},
|
||||
"allowFrom": {
|
||||
"label": "Usuários permitidos",
|
||||
"placeholder": "IDs de usuário separados por vírgulas"
|
||||
},
|
||||
"topicIsolation": {
|
||||
"label": "Isolamento por tópico",
|
||||
"choices": {
|
||||
"true": "Uma sessão separada por tópico",
|
||||
"false": "Uma sessão compartilhada para o grupo"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"custom": {
|
||||
"toggleAssistant": "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 ou fluxo.",
|
||||
"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.",
|
||||
"waiting": "Aguardando autorização...",
|
||||
"connected": "Feishu está conectado.",
|
||||
"stopped": "Conexão interrompida.",
|
||||
"connecting": "Conectando..."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"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",
|
||||
"placeholder": "cli_xxx"
|
||||
},
|
||||
"appSecret": {
|
||||
"label": "App Secret",
|
||||
"placeholder": "Để trống để giữ secret hiện tại",
|
||||
"help": "Chỉ dán secret mới khi xoay vòng thông tin xác thực."
|
||||
},
|
||||
"domain": {
|
||||
"label": "Khu vực",
|
||||
"choices": {
|
||||
"feishu": "Feishu",
|
||||
"lark": "Lark"
|
||||
}
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "Hành vi trong nhóm",
|
||||
"choices": {
|
||||
"mention": "Chỉ khi được nhắc",
|
||||
"open": "Mọi tin nhắn",
|
||||
"allowlist": "Danh sách cho phép"
|
||||
}
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"topicIsolation": {
|
||||
"label": "Tách biệt chủ đề",
|
||||
"choices": {
|
||||
"true": "Phiên riêng cho từng chủ đề",
|
||||
"false": "Dùng chung một phiên cho nhóm"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"custom": {
|
||||
"toggleAssistant": "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.",
|
||||
"waiting": "Đang chờ cấp quyền...",
|
||||
"connected": "Feishu đã kết nối.",
|
||||
"stopped": "Kết nối đã dừng.",
|
||||
"connecting": "Đang kết nối..."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"displayName": "飞书",
|
||||
"description": "在飞书会话和群组中使用 nanobot。",
|
||||
"requirements": "飞书应用凭据、事件订阅和网关",
|
||||
"setup": {
|
||||
"primaryAction": "连接飞书",
|
||||
"docsLabel": "打开飞书配置指南",
|
||||
"officialLabel": "打开飞书开发者后台",
|
||||
"tryIt": "向飞书助手发送私信,或在群组中提及它。",
|
||||
"summary": "连接流程会通过二维码创建或关联飞书应用,并自动为 nanobot 保存应用凭据。",
|
||||
"steps": [
|
||||
"点击连接,用手机飞书或 Lark 扫描二维码。",
|
||||
"批准应用连接,nanobot 会自动保存 App ID 和 Secret。",
|
||||
"向机器人发送私信,或在飞书群中提及它以完成测试。"
|
||||
],
|
||||
"fields": {
|
||||
"appId": {
|
||||
"label": "App ID",
|
||||
"placeholder": "cli_xxx"
|
||||
},
|
||||
"appSecret": {
|
||||
"label": "App Secret",
|
||||
"placeholder": "留空以保留现有密钥",
|
||||
"help": "仅在轮换凭据时粘贴新的 App Secret。"
|
||||
},
|
||||
"domain": {
|
||||
"label": "区域",
|
||||
"choices": {
|
||||
"feishu": "飞书",
|
||||
"lark": "Lark"
|
||||
}
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "群组行为",
|
||||
"choices": {
|
||||
"mention": "仅提及时",
|
||||
"open": "所有消息",
|
||||
"allowlist": "白名单"
|
||||
}
|
||||
},
|
||||
"allowFrom": {
|
||||
"label": "允许的用户",
|
||||
"placeholder": "用户 ID,用逗号分隔"
|
||||
},
|
||||
"topicIsolation": {
|
||||
"label": "话题隔离",
|
||||
"choices": {
|
||||
"true": "每个话题使用独立会话",
|
||||
"false": "群聊共用一个会话"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"custom": {
|
||||
"toggleAssistant": "{{name}} 助手",
|
||||
"configured": "已连接",
|
||||
"needsSetup": "需要授权",
|
||||
"noAppId": "没有 App ID",
|
||||
"createAnother": "创建另一个助手",
|
||||
"createHint": "为其他团队、空间或工作流创建独立的飞书机器人。",
|
||||
"createAssistant": "创建助手",
|
||||
"reconnect": "重新连接",
|
||||
"countNone": "尚未连接助手",
|
||||
"countOne": "已连接 1 个助手",
|
||||
"countMany": "已连接 {{count}} 个助手",
|
||||
"qrAlt": "飞书连接二维码",
|
||||
"scanTitle": "使用飞书扫码",
|
||||
"scanDescription": "用手机上的飞书或 Lark 扫描二维码。授权完成后,nanobot 会自动完成配置。",
|
||||
"waiting": "正在等待授权...",
|
||||
"connected": "飞书已连接。",
|
||||
"stopped": "连接已停止。",
|
||||
"connecting": "正在连接..."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"displayName": "飛書",
|
||||
"description": "在飛書對話和群組中使用 nanobot。",
|
||||
"requirements": "飛書應用程式憑證、事件訂閱和閘道",
|
||||
"setup": {
|
||||
"primaryAction": "連接飛書",
|
||||
"docsLabel": "開啟飛書設定指南",
|
||||
"officialLabel": "開啟飛書開發者後台",
|
||||
"tryIt": "向飛書助手傳送私訊,或在群組中提及它。",
|
||||
"summary": "連接流程會透過二維碼建立或關聯飛書應用程式,並自動為 nanobot 儲存應用程式憑證。",
|
||||
"steps": [
|
||||
"點擊連接,用手機飛書或 Lark 掃描二維碼。",
|
||||
"批准應用程式連接,nanobot 會自動儲存 App ID 和 Secret。",
|
||||
"向機器人傳送私訊,或在飛書群組中提及它以完成測試。"
|
||||
],
|
||||
"fields": {
|
||||
"appId": {
|
||||
"label": "App ID",
|
||||
"placeholder": "cli_xxx"
|
||||
},
|
||||
"appSecret": {
|
||||
"label": "App Secret",
|
||||
"placeholder": "留空以保留現有密鑰",
|
||||
"help": "僅在輪換憑證時貼上新的 App Secret。"
|
||||
},
|
||||
"domain": {
|
||||
"label": "區域",
|
||||
"choices": {
|
||||
"feishu": "飛書",
|
||||
"lark": "Lark"
|
||||
}
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "群組行為",
|
||||
"choices": {
|
||||
"mention": "僅提及時",
|
||||
"open": "所有訊息",
|
||||
"allowlist": "允許清單"
|
||||
}
|
||||
},
|
||||
"allowFrom": {
|
||||
"label": "允許的使用者",
|
||||
"placeholder": "使用者 ID,以逗號分隔"
|
||||
},
|
||||
"topicIsolation": {
|
||||
"label": "主題隔離",
|
||||
"choices": {
|
||||
"true": "每個主題使用獨立工作階段",
|
||||
"false": "群組共用一個工作階段"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"custom": {
|
||||
"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 會自動完成設定。",
|
||||
"waiting": "正在等待授權…",
|
||||
"connected": "飛書已連線。",
|
||||
"stopped": "連線已停止。",
|
||||
"connecting": "正在連線…"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user