refactor: remove verified unused internals (#6460)

* refactor: remove verified unused internals

* test(linear): synchronize webhook shutdown with writer join
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-26 21:45:36 +08:00
1 parent 3230013963
commit f23a6d1485
105 files changed
+207 -1282

No files matched your search

+1 -1
View File
@@ -62,7 +62,7 @@ class FileEditActivityHook(AgentHook):
return
self._trackers_by_call[self._tool_call_key(tool_call)] = trackers
await self._emit([
build_file_edit_start_event(tracker, typed_params)
build_file_edit_start_event(tracker)
for tracker in trackers
])
@@ -62,7 +62,7 @@ def test_email_only_enables_final_reply_delivery() -> None:
manager.config = Config.model_validate({"channels": {"email": {"enabled": True}}})
manager.bus = MessageBus()
channel = manager._build_channel("email", EmailChannel, {"enabled": True})
channel = manager._build_channel(EmailChannel, {"enabled": True})
assert channel.send_progress is False
assert channel.send_tool_hints is False
+1 -2
View File
@@ -157,8 +157,7 @@
},
"trustedAuthservIds": {
"label": "Trusted authentication services",
"placeholder": "mx.google.com, comma separated",
"help": "Enter trusted authserv-id values.\n\nExact authserv-id values added by the receiving mail service. Required when SPF or DKIM verification is on."
"placeholder": "mx.google.com, comma separated"
}
}
}
+1 -2
View File
@@ -158,8 +158,7 @@
},
"trustedAuthservIds": {
"label": "Servicios de autenticación confiables",
"placeholder": "mx.google.com, separados por comas",
"help": "Introduce valores authserv-id de confianza.\n\nValores authserv-id exactos añadidos por el servicio receptor. Obligatorio al verificar SPF o DKIM."
"placeholder": "mx.google.com, separados por comas"
}
}
}
+1 -2
View File
@@ -158,8 +158,7 @@
},
"trustedAuthservIds": {
"label": "Services d’authentification approuvés",
"placeholder": "mx.google.com, séparés par des virgules",
"help": "Saisissez les valeurs authserv-id de confiance.\n\nValeurs authserv-id exactes ajoutées par le service de réception. Requis si SPF ou DKIM est vérifié."
"placeholder": "mx.google.com, séparés par des virgules"
}
}
}
+1 -2
View File
@@ -158,8 +158,7 @@
},
"trustedAuthservIds": {
"label": "Layanan autentikasi tepercaya",
"placeholder": "mx.google.com, pisahkan dengan koma",
"help": "Masukkan nilai authserv-id tepercaya.\n\nNilai authserv-id persis yang ditambahkan layanan penerima. Wajib saat verifikasi SPF atau DKIM aktif."
"placeholder": "mx.google.com, pisahkan dengan koma"
}
}
}
+1 -2
View File
@@ -158,8 +158,7 @@
},
"trustedAuthservIds": {
"label": "信頼する認証サービス",
"placeholder": "mx.google.com(カンマ区切り)",
"help": "信頼する authserv-id を入力します。\n\n受信メールサービスが追加する正確な authserv-id。SPF または DKIM 検証時は必須です。"
"placeholder": "mx.google.com(カンマ区切り)"
}
}
}
+1 -2
View File
@@ -158,8 +158,7 @@
},
"trustedAuthservIds": {
"label": "신뢰할 인증 서비스",
"placeholder": "mx.google.com, 쉼표로 구분",
"help": "신뢰하는 authserv-id를 입력하세요.\n\n수신 메일 서비스가 추가한 정확한 authserv-id입니다. SPF 또는 DKIM 확인 시 필수입니다."
"placeholder": "mx.google.com, 쉼표로 구분"
}
}
}
@@ -158,8 +158,7 @@
},
"trustedAuthservIds": {
"label": "Serviços de autenticação confiáveis",
"placeholder": "mx.google.com, separados por vírgulas",
"help": "Informe valores authserv-id confiáveis.\n\nValores authserv-id exatos adicionados pelo serviço receptor. Obrigatório ao verificar SPF ou DKIM."
"placeholder": "mx.google.com, separados por vírgulas"
}
}
}
+1 -2
View File
@@ -158,8 +158,7 @@
},
"trustedAuthservIds": {
"label": "Dịch vụ xác thực tin cậy",
"placeholder": "mx.google.com, phân tách bằng dấu phẩy",
"help": "Nhập các authserv-id đáng tin cậy.\n\nGiá trị authserv-id chính xác do dịch vụ nhận thư thêm vào. Bắt buộc khi xác minh SPF hoặc DKIM."
"placeholder": "mx.google.com, phân tách bằng dấu phẩy"
}
}
}
@@ -157,8 +157,7 @@
},
"trustedAuthservIds": {
"label": "可信邮件认证服务",
"placeholder": "mx.google.com,用逗号分隔",
"help": "填写可信的 authserv-id\n\n接收邮件服务添加的准确 authserv-id。启用 SPF 或 DKIM 验证时必填。"
"placeholder": "mx.google.com,用逗号分隔"
}
}
},
@@ -158,8 +158,7 @@
},
"trustedAuthservIds": {
"label": "可信郵件驗證服務",
"placeholder": "mx.google.com,以逗號分隔",
"help": "填寫可信的 authserv-id\n\n接收郵件服務新增的準確 authserv-id。啟用 SPF 或 DKIM 驗證時必填。"
"placeholder": "mx.google.com,以逗號分隔"
}
}
}
+1 -3
View File
@@ -31,7 +31,6 @@ class FeishuConnectSession:
expire_in: int
created_wall: float
deadline: float
last_error: str | None = None
class FeishuConnectStore:
@@ -141,8 +140,7 @@ class FeishuConnectStore:
device_code=session.device_code,
domain=session.domain,
)
except (RuntimeError, OSError, json.JSONDecodeError, httpx.HTTPError) as exc:
session.last_error = str(exc)
except (RuntimeError, OSError, json.JSONDecodeError, httpx.HTTPError):
return _pending_payload(session)
status = result.get("status")
@@ -4,7 +4,6 @@ import type { NanobotFeaturesPayload } from "@/lib/types";
import { FeishuConnectFlowView, useFeishuConnectLabels } from "./FeishuConnectFlowView";
export function FeishuConnectFlow({
token,
instanceId = "default",
mode = "replace",
idleLabel,
@@ -21,7 +20,6 @@ export function FeishuConnectFlow({
const labels = useFeishuConnectLabels();
return (
<ChannelQrConnectFlow
token={token}
channelName="feishu"
startParams={{ domain: "feishu", instance_id: instanceId, mode }}
idleLabel={idleLabel}
+47 -27
View File
@@ -353,46 +353,66 @@ async def test_successful_authorization_survives_repeated_polls(
async def test_connect_shutdown_joins_real_webhook_writer(tmp_path, monkeypatch) -> None:
port = _free_port()
state = LinearStateStore(tmp_path / "linear.sqlite3")
write_entered, allow_write, listener_stopped = threading.Event(), threading.Event(), threading.Event()
loop = asyncio.get_running_loop()
write_entered, writer_join_entered = asyncio.Event(), asyncio.Event()
allow_write = threading.Event()
writer_thread: threading.Thread | None = None
enqueue = state.enqueue_webhook
monkeypatch.setattr(linear_connect, "_load_linear_config", lambda: _config(port))
monkeypatch.setattr(linear_connect, "LinearStateStore", lambda: state)
def enqueue_after_release(delivery, payload):
write_entered.set()
assert allow_write.wait(3)
nonlocal writer_thread
writer_thread = threading.current_thread()
loop.call_soon_threadsafe(write_entered.set)
allow_write.wait()
return enqueue(delivery, payload)
monkeypatch.setattr(state, "enqueue_webhook", enqueue_after_release)
store = linear_connect.LinearConnectStore()
started = await store.start()
lease = store._sessions[started["session_id"]].server
server = lease._server._server
shutdown_listener = server.shutdown
await store.start()
raw = json.dumps(_agent_webhook(), separators=(",", ":")).encode()
signature = hmac.new(b"webhook-secret", raw, hashlib.sha256).hexdigest()
# The request must not expire while the test deliberately holds its writer.
async with httpx.AsyncClient(timeout=None, trust_env=False) as client:
request = asyncio.create_task(client.post(
f"http://127.0.0.1:{port}/linear/webhook",
content=raw,
headers={
"Content-Type": "application/json",
"Linear-Signature": signature,
"Linear-Delivery": "delivery-1",
},
))
closing = None
try:
async with asyncio.timeout(10):
await write_entered.wait()
assert writer_thread is not None
writer_join = writer_thread.join
def shutdown_and_signal():
shutdown_listener()
listener_stopped.set()
def join_and_signal(timeout=None):
loop.call_soon_threadsafe(writer_join_entered.set)
writer_join(timeout)
monkeypatch.setattr(server, "shutdown", shutdown_and_signal)
request = asyncio.create_task(asyncio.to_thread(_post_webhook, port, _agent_webhook()))
closing = None
try:
assert await asyncio.to_thread(write_entered.wait, 1)
closing = asyncio.create_task(store.close())
assert await asyncio.to_thread(listener_stopped.wait, 1)
assert not closing.done()
assert store.has_pending_work is True
finally:
allow_write.set()
response = await request
if closing is not None:
await closing
else:
await store.close()
assert response[0] == 200
monkeypatch.setattr(writer_thread, "join", join_and_signal)
closing = asyncio.create_task(store.close())
await writer_join_entered.wait()
assert not closing.done()
assert store.has_pending_work is True
finally:
allow_write.set()
try:
response = await asyncio.wait_for(request, timeout=10)
finally:
if closing is not None:
await closing
else:
await store.close()
assert response.status_code == 200
assert store.has_pending_work is False
assert not store._sessions
assert [event.delivery_id for event in state.claim_webhooks()] == ["delivery-1"]
@pytest.mark.asyncio
@@ -8,7 +8,6 @@ import type { ChannelPluginConnectFlowProps } from "@/channel-plugins/types";
import { LinearConnectFlowView, linearConnectLabels } from "./LinearConnectFlowView";
export function LinearConnectFlow({
token,
feature,
idleLabel,
connectRequestId,
@@ -23,7 +22,7 @@ export function LinearConnectFlow({
}) {
const { t } = useTranslation();
const tx = channelTranslator(t, "linear");
return <ChannelQrConnectFlow token={token} channelName="linear" idleLabel={idleLabel}
return <ChannelQrConnectFlow channelName="linear" idleLabel={idleLabel}
connectRequestId={connectRequestId} startParams={connectRequestId ? { force: true } : undefined}
forceOnRepeat showQrCode={false} connected={connected}
suppressSucceeded={feature.runtime_status === "running" || feature.runtime_status === "failed"}
+6 -26
View File
@@ -1,37 +1,23 @@
{
"description": "Work with nanobot from Linear issues through native Agent Sessions.",
"requirements": "A private Linear OAuth app and a stable public HTTPS callback URL",
"setup": {
"docsLabel": "Open Linear setup guide",
"officialLabel": "Create Linear OAuth app",
"tryIt": "Mention the app in an issue comment or delegate an issue to it. Follow-ups inside its Agent Session do not need another mention.",
"summary": "Create a private Linear OAuth app, save its credentials and public URL, then authorize each workspace. Start a session by mentioning the app or delegating an issue to it; ordinary comments are ignored.",
"steps": [
"Expose this nanobot instance through a stable HTTPS URL (a tunnel is fine).",
"Create a private OAuth app in Linear with read, write, app:mentionable, and app:assignable scopes.",
"Subscribe the app webhook to AgentSessionEvent, PermissionChange, and OAuthAuthorization using the generated webhook URL.",
"Connect the workspace with OAuth, then mention the app or delegate an issue to it."
],
"fields": {
"clientId": {
"label": "OAuth client ID",
"placeholder": "Linear OAuth client ID",
"help": "Copy from the private OAuth app.\n\nCopy it from the private OAuth app in Linear."
"placeholder": "Linear OAuth client ID"
},
"clientSecret": {
"label": "OAuth client secret",
"placeholder": "••••••",
"help": "Stored only by this nanobot instance."
"placeholder": "••••••"
},
"webhookSigningSecret": {
"label": "Webhook signing secret",
"placeholder": "••••••",
"help": "Verify the Webhook signature.\n\nUsed to verify Linear-Signature before any webhook body is parsed."
"placeholder": "••••••"
},
"publicBaseUrl": {
"label": "Public HTTPS URL",
"placeholder": "https://nanobot.example.com",
"help": "Enter an HTTPS URL without a path.\n\nA stable HTTPS origin routed to the listener below; do not include a path."
"placeholder": "https://nanobot.example.com"
},
"host": {
"label": "Listen host",
@@ -51,12 +37,10 @@
},
"allowFrom": {
"label": "Allowed Linear users",
"placeholder": "Linear user IDs, comma separated",
"help": "Choose who can use this connection.\n\nLeave empty to use nanobot pairing, or use * to allow every user in connected workspaces."
"placeholder": "Linear user IDs, comma separated"
},
"showReasoning": {
"label": "Show reasoning",
"help": "Post reasoning as thought activity.\n\nPost model reasoning as thought activities in Linear. Turn this off for a quieter session."
"label": "Show reasoning"
}
}
},
@@ -78,9 +62,6 @@
"savePublicUrl": "Enter a public HTTPS URL to create a Linear app.",
"retrySave": "Retry",
"channelRunning": "Channel running",
"accessAll": "Every member of an authorized workspace can run this agent.",
"accessRestricted": "Only the Linear user IDs listed in Advanced can run this agent.",
"accessPairing": "Pair on first use; connect Linear MCP to search or edit issues.",
"configureTools": "Configure Linear MCP",
"workspacesTitle": "Authorized workspaces",
"refreshWorkspaces": "Refresh workspaces",
@@ -128,7 +109,6 @@
"allow": "Allow {{name}} to use nanobot",
"saveUnconfirmed": "Access was not confirmed. Refresh members before trying again.",
"guide": "Use Member access to approve teammates without pairing codes. Existing approvals still work unless switched off. Connect Linear MCP to search or edit issues.",
"intro": "Choose who can use nanobot in Linear. No pairing codes needed.",
"details": "About member access",
"summary": "{{allowed}} enabled",
"loading": "Finding members…",
+6 -26
View File
@@ -1,37 +1,23 @@
{
"description": "Trabaja con nanobot desde incidencias de Linear mediante sesiones de agente nativas.",
"requirements": "Una aplicación OAuth privada de Linear y una URL HTTPS pública y estable para las devoluciones de llamada",
"setup": {
"docsLabel": "Abrir la guía de configuración de Linear",
"officialLabel": "Crear una aplicación OAuth de Linear",
"tryIt": "Menciona la aplicación o delégale una incidencia; no necesitas volver a mencionarla dentro de la sesión de agente.",
"summary": "Crea una aplicación OAuth privada de Linear, guarda sus credenciales y la URL pública y autoriza el espacio de trabajo. Inicia una sesión mencionando la aplicación o delegándole una incidencia; los comentarios normales se ignoran.",
"steps": [
"Expón esta instancia de nanobot mediante una URL HTTPS estable (puedes usar un túnel).",
"Crea una aplicación OAuth privada en Linear con los permisos read, write, app:mentionable y app:assignable.",
"Suscribe el webhook de la aplicación a AgentSessionEvent, PermissionChange y OAuthAuthorization con la URL generada.",
"Conecta el espacio de trabajo con OAuth y menciona la aplicación o delégale una incidencia."
],
"fields": {
"clientId": {
"label": "ID de cliente OAuth",
"placeholder": "ID de cliente OAuth de Linear",
"help": "Copia de la app OAuth privada.\n\nCópialo de la aplicación OAuth privada en Linear."
"placeholder": "ID de cliente OAuth de Linear"
},
"clientSecret": {
"label": "Secreto de cliente OAuth",
"placeholder": "••••••",
"help": "Solo se guarda en esta instancia de nanobot."
"placeholder": "••••••"
},
"webhookSigningSecret": {
"label": "Secreto de firma del webhook",
"placeholder": "••••••",
"help": "Verifica la firma Webhook.\n\nSe usa para verificar Linear-Signature antes de analizar el cuerpo del webhook."
"placeholder": "••••••"
},
"publicBaseUrl": {
"label": "URL HTTPS pública",
"placeholder": "https://nanobot.example.com",
"help": "Introduce una URL HTTPS sin ruta.\n\nUn origen HTTPS estable dirigido al listener indicado abajo; no incluyas una ruta."
"placeholder": "https://nanobot.example.com"
},
"host": {
"label": "Host de escucha",
@@ -51,12 +37,10 @@
},
"allowFrom": {
"label": "Usuarios de Linear permitidos",
"placeholder": "ID de usuarios de Linear separados por comas",
"help": "Elige quién puede usar esta conexión.\n\nDéjalo vacío para usar el emparejamiento de nanobot, o usa * para permitir a todos los usuarios de los espacios conectados."
"placeholder": "ID de usuarios de Linear separados por comas"
},
"showReasoning": {
"label": "Mostrar razonamiento",
"help": "Publica el razonamiento como actividad de pensamiento.\n\nPublica el razonamiento del modelo como actividades de pensamiento en Linear. Desactívalo para una sesión más limpia."
"label": "Mostrar razonamiento"
}
}
},
@@ -78,9 +62,6 @@
"savePublicUrl": "Introduce una URL HTTPS pública para crear una aplicación de Linear.",
"retrySave": "Reintentar",
"channelRunning": "Canal en ejecución",
"accessAll": "Todos los miembros de un espacio autorizado pueden ejecutar este agente.",
"accessRestricted": "Solo los ID de usuario de Linear indicados en Avanzado pueden ejecutar este agente.",
"accessPairing": "Empareja en el primer uso y conecta Linear MCP para buscar o editar issues.",
"configureTools": "Configurar Linear MCP",
"workspacesTitle": "Espacios autorizados",
"refreshWorkspaces": "Actualizar espacios",
@@ -128,7 +109,6 @@
"allow": "Permitir que {{name}} use nanobot",
"saveUnconfirmed": "No se confirmó el acceso. Actualiza los miembros antes de reintentar.",
"guide": "Usa Acceso de miembros para aprobar compañeros sin códigos. Las aprobaciones existentes siguen vigentes salvo que se desactiven. Conecta Linear MCP para buscar o editar issues.",
"intro": "Elige quién puede usar nanobot en Linear, sin códigos de vinculación.",
"details": "Acerca del acceso de miembros",
"summary": "{{allowed}} habilitados",
"loading": "Buscando miembros…",
+6 -26
View File
@@ -1,37 +1,23 @@
{
"description": "Utilisez nanobot depuis les tickets Linear grâce aux sessions d’agent natives.",
"requirements": "Une application OAuth Linear privée et une URL de rappel HTTPS publique et stable",
"setup": {
"docsLabel": "Ouvrir le guide de configuration Linear",
"officialLabel": "Créer une application OAuth Linear",
"tryIt": "Mentionnez l’application ou déléguez-lui un ticket ; aucune nouvelle mention n’est nécessaire dans la session d’agent.",
"summary": "Créez une application OAuth Linear privée, enregistrez ses identifiants et son URL publique, puis autorisez l’espace de travail. Lancez une session en mentionnant l’application ou en lui déléguant un ticket ; les commentaires ordinaires sont ignorés.",
"steps": [
"Exposez cette instance nanobot avec une URL HTTPS stable (un tunnel convient).",
"Créez une application OAuth privée dans Linear avec les autorisations read, write, app:mentionable et app:assignable.",
"Abonnez le webhook de l’application à AgentSessionEvent, PermissionChange et OAuthAuthorization avec l’URL générée.",
"Connectez l’espace de travail avec OAuth, puis mentionnez l’application ou déléguez-lui un ticket."
],
"fields": {
"clientId": {
"label": "ID client OAuth",
"placeholder": "ID client OAuth Linear",
"help": "Copiez depuis l’application OAuth privée.\n\nCopiez-le depuis l’application OAuth privée dans Linear."
"placeholder": "ID client OAuth Linear"
},
"clientSecret": {
"label": "Secret client OAuth",
"placeholder": "••••••",
"help": "Enregistré uniquement sur cette instance nanobot."
"placeholder": "••••••"
},
"webhookSigningSecret": {
"label": "Secret de signature du webhook",
"placeholder": "••••••",
"help": "Vérifiez la signature Webhook.\n\nUtilisé pour vérifier Linear-Signature avant toute analyse du contenu du webhook."
"placeholder": "••••••"
},
"publicBaseUrl": {
"label": "URL HTTPS publique",
"placeholder": "https://nanobot.example.com",
"help": "Saisissez une URL HTTPS sans chemin.\n\nUne origine HTTPS stable acheminée vers l’écouteur ci-dessous ; n’incluez pas de chemin."
"placeholder": "https://nanobot.example.com"
},
"host": {
"label": "Hôte d’écoute",
@@ -51,12 +37,10 @@
},
"allowFrom": {
"label": "Utilisateurs Linear autorisés",
"placeholder": "ID utilisateur Linear séparés par des virgules",
"help": "Choisissez qui peut utiliser cette connexion.\n\nLaissez vide pour utiliser l’association nanobot, ou saisissez * pour autoriser tous les utilisateurs des espaces connectés."
"placeholder": "ID utilisateur Linear séparés par des virgules"
},
"showReasoning": {
"label": "Afficher le raisonnement",
"help": "Publiez le raisonnement comme activité de réflexion.\n\nPublie le raisonnement du modèle comme activités de réflexion dans Linear. Désactivez cette option pour une session plus sobre."
"label": "Afficher le raisonnement"
}
}
},
@@ -78,9 +62,6 @@
"savePublicUrl": "Saisissez une URL HTTPS publique pour créer une application Linear.",
"retrySave": "Réessayer",
"channelRunning": "Canal en cours d’exécution",
"accessAll": "Tous les membres d’un espace autorisé peuvent exécuter cet agent.",
"accessRestricted": "Seuls les ID utilisateur Linear répertoriés dans Avancé peuvent exécuter cet agent.",
"accessPairing": "Associez au premier usage et connectez Linear MCP pour rechercher ou modifier des issues.",
"configureTools": "Configurer Linear MCP",
"workspacesTitle": "Espaces autorisés",
"refreshWorkspaces": "Actualiser les espaces",
@@ -128,7 +109,6 @@
"allow": "Autoriser {{name}} à utiliser nanobot",
"saveUnconfirmed": "L’accès n’a pas été confirmé. Actualisez les membres avant de réessayer.",
"guide": "Utilisez Accès des membres pour approuver vos collègues sans code. Les autorisations existantes restent valables sauf désactivation. Connectez Linear MCP pour rechercher ou modifier des issues.",
"intro": "Choisissez qui peut utiliser nanobot dans Linear, sans code d’association.",
"details": "À propos de l’accès des membres",
"summary": "{{allowed}} autorisés",
"loading": "Recherche des membres…",
+6 -26
View File
@@ -1,37 +1,23 @@
{
"description": "Gunakan nanobot dari issue Linear melalui Agent Session native.",
"requirements": "Aplikasi OAuth Linear privat dan URL callback HTTPS publik yang stabil",
"setup": {
"docsLabel": "Buka panduan penyiapan Linear",
"officialLabel": "Buat aplikasi OAuth Linear",
"tryIt": "Mention aplikasi atau delegasikan issue kepadanya; percakapan lanjutan di Agent Session tidak memerlukan mention lagi.",
"summary": "Buat aplikasi OAuth Linear privat, simpan kredensial dan URL publiknya, lalu otorisasi workspace. Mulai sesi dengan mention aplikasi atau mendelegasikan issue; komentar biasa diabaikan.",
"steps": [
"Ekspos instans nanobot ini melalui URL HTTPS yang stabil (tunnel dapat digunakan).",
"Buat aplikasi OAuth privat di Linear dengan scope read, write, app:mentionable, dan app:assignable.",
"Daftarkan webhook aplikasi untuk AgentSessionEvent, PermissionChange, dan OAuthAuthorization menggunakan URL yang dibuat.",
"Hubungkan workspace melalui OAuth, lalu mention aplikasi atau delegasikan issue kepadanya."
],
"fields": {
"clientId": {
"label": "ID klien OAuth",
"placeholder": "ID klien OAuth Linear",
"help": "Salin dari aplikasi OAuth privat.\n\nSalin dari aplikasi OAuth privat di Linear."
"placeholder": "ID klien OAuth Linear"
},
"clientSecret": {
"label": "Secret klien OAuth",
"placeholder": "••••••",
"help": "Hanya disimpan oleh instans nanobot ini."
"placeholder": "••••••"
},
"webhookSigningSecret": {
"label": "Secret penandatanganan webhook",
"placeholder": "••••••",
"help": "Verifikasi tanda tangan Webhook.\n\nDigunakan untuk memverifikasi Linear-Signature sebelum isi webhook diurai."
"placeholder": "••••••"
},
"publicBaseUrl": {
"label": "URL HTTPS publik",
"placeholder": "https://nanobot.example.com",
"help": "Masukkan URL HTTPS tanpa path.\n\nOrigin HTTPS stabil yang diarahkan ke listener di bawah; jangan sertakan path."
"placeholder": "https://nanobot.example.com"
},
"host": {
"label": "Host listener",
@@ -51,12 +37,10 @@
},
"allowFrom": {
"label": "Pengguna Linear yang diizinkan",
"placeholder": "ID pengguna Linear, dipisahkan koma",
"help": "Pilih siapa yang boleh memakai koneksi ini.\n\nBiarkan kosong untuk memakai pairing nanobot, atau gunakan * untuk mengizinkan semua pengguna di workspace yang terhubung."
"placeholder": "ID pengguna Linear, dipisahkan koma"
},
"showReasoning": {
"label": "Tampilkan penalaran",
"help": "Kirim penalaran sebagai aktivitas berpikir.\n\nKirim penalaran model sebagai aktivitas pemikiran di Linear. Nonaktifkan untuk sesi yang lebih ringkas."
"label": "Tampilkan penalaran"
}
}
},
@@ -78,9 +62,6 @@
"savePublicUrl": "Masukkan URL HTTPS publik untuk membuat aplikasi Linear.",
"retrySave": "Coba lagi",
"channelRunning": "Channel berjalan",
"accessAll": "Semua anggota workspace yang diotorisasi dapat menjalankan agen ini.",
"accessRestricted": "Hanya ID pengguna Linear yang tercantum di Lanjutan yang dapat menjalankan agen ini.",
"accessPairing": "Lakukan pairing saat pertama digunakan dan hubungkan Linear MCP untuk mencari atau mengedit issue.",
"configureTools": "Konfigurasi Linear MCP",
"workspacesTitle": "Workspace yang diotorisasi",
"refreshWorkspaces": "Muat ulang workspace",
@@ -128,7 +109,6 @@
"allow": "Izinkan {{name}} memakai nanobot",
"saveUnconfirmed": "Akses belum dikonfirmasi. Segarkan anggota sebelum mencoba lagi.",
"guide": "Gunakan Akses anggota untuk menyetujui rekan tanpa kode pairing. Persetujuan lama tetap berlaku kecuali dinonaktifkan. Hubungkan Linear MCP untuk mencari atau mengedit issue.",
"intro": "Pilih siapa yang boleh memakai nanobot di Linear, tanpa kode pairing.",
"details": "Tentang akses anggota",
"summary": "{{allowed}} diizinkan",
"loading": "Mencari anggota…",
+6 -26
View File
@@ -1,37 +1,23 @@
{
"description": "Linear の issue からネイティブ Agent Session を通じて nanobot を利用します。",
"requirements": "非公開の Linear OAuth アプリと、安定した公開 HTTPS コールバック URL",
"setup": {
"docsLabel": "Linear セットアップガイドを開く",
"officialLabel": "Linear OAuth アプリを作成",
"tryIt": "アプリをメンションするか issue を委任してください。Agent Session 内では再度メンションする必要はありません。",
"summary": "非公開の Linear OAuth アプリを作成し、認証情報と公開 URL を保存してからワークスペースを認証します。メンションまたは issue の委任でセッションを開始でき、通常のコメントは無視されます。",
"steps": [
"この nanobot インスタンスを安定した HTTPS URL で公開します(トンネルも利用できます)。",
"Linear で read、write、app:mentionable、app:assignable スコープを持つ非公開 OAuth アプリを作成します。",
"生成された URL を使い、アプリの webhook を AgentSessionEvent、PermissionChange、OAuthAuthorization に登録します。",
"OAuth でワークスペースを接続し、アプリをメンションするか issue を委任します。"
],
"fields": {
"clientId": {
"label": "OAuth クライアント ID",
"placeholder": "Linear OAuth クライアント ID",
"help": "非公開の OAuth アプリからコピーします。\n\nLinear の非公開 OAuth アプリからコピーします。"
"placeholder": "Linear OAuth クライアント ID"
},
"clientSecret": {
"label": "OAuth クライアントシークレット",
"placeholder": "••••••",
"help": "この nanobot インスタンス内にのみ保存されます。"
"placeholder": "••••••"
},
"webhookSigningSecret": {
"label": "Webhook 署名シークレット",
"placeholder": "••••••",
"help": "Webhook の署名を検証します。\n\nWebhook の本文を解析する前に Linear-Signature を検証するために使います。"
"placeholder": "••••••"
},
"publicBaseUrl": {
"label": "公開 HTTPS URL",
"placeholder": "https://nanobot.example.com",
"help": "パスを含まない HTTPS URL を入力します。\n\n下のリスナーへ転送される安定した HTTPS オリジンを指定します。パスは含めないでください。"
"placeholder": "https://nanobot.example.com"
},
"host": {
"label": "リッスンホスト",
@@ -51,12 +37,10 @@
},
"allowFrom": {
"label": "許可する Linear ユーザー",
"placeholder": "Linear ユーザー ID(カンマ区切り)",
"help": "この接続を使えるユーザーを選びます。\n\nnanobot のペアリングを使う場合は空欄にします。接続済みワークスペースの全ユーザーを許可する場合のみ * を指定してください。"
"placeholder": "Linear ユーザー ID(カンマ区切り)"
},
"showReasoning": {
"label": "推論を表示",
"help": "推論を思考の活動として公開します。\n\nモデルの推論を Linear の思考アクティビティとして投稿します。静かなセッションにするにはオフにします。"
"label": "推論を表示"
}
}
},
@@ -78,9 +62,6 @@
"savePublicUrl": "公開 HTTPS URL を入力してから Linear アプリを作成してください。",
"retrySave": "再試行",
"channelRunning": "チャンネル実行中",
"accessAll": "認証済みワークスペースの全メンバーがこのエージェントを実行できます。",
"accessRestricted": "詳細設定に記載された Linear ユーザー ID のみがこのエージェントを実行できます。",
"accessPairing": "初回にペアリングし、Linear MCP に接続すると issue を検索・編集できます。",
"configureTools": "Linear MCP を設定",
"workspacesTitle": "認証済みワークスペース",
"refreshWorkspaces": "ワークスペースを更新",
@@ -128,7 +109,6 @@
"allow": "{{name}} に nanobot の利用を許可",
"saveUnconfirmed": "保存を確認できませんでした。メンバーを更新してから再試行してください。",
"guide": "「メンバーのアクセス」でコードなしで同僚を承認できます。既存の承認はオフにしない限り有効です。Issue の検索・編集には Linear MCP を接続してください。",
"intro": "Linear で nanobot を使えるメンバーを選びます。ペアリングコードは不要です。",
"details": "メンバーのアクセスについて",
"summary": "{{allowed}} 人が利用可能",
"loading": "メンバーを検索中…",
+6 -26
View File
@@ -1,37 +1,23 @@
{
"description": "Linear 이슈에서 네이티브 Agent Session을 통해 nanobot을 사용합니다.",
"requirements": "비공개 Linear OAuth 앱과 안정적인 공개 HTTPS 콜백 URL",
"setup": {
"docsLabel": "Linear 설정 가이드 열기",
"officialLabel": "Linear OAuth 앱 만들기",
"tryIt": "앱을 멘션하거나 이슈를 위임하세요. Agent Session 안에서는 다시 멘션할 필요가 없습니다.",
"summary": "비공개 Linear OAuth 앱을 만들고 인증 정보와 공개 URL을 저장한 다음 워크스페이스를 승인하세요. 앱 멘션이나 이슈 위임으로 세션을 시작할 수 있으며 일반 댓글은 무시됩니다.",
"steps": [
"이 nanobot 인스턴스를 안정적인 HTTPS URL로 공개하세요(터널을 사용할 수 있습니다).",
"Linear에서 read, write, app:mentionable, app:assignable 범위가 있는 비공개 OAuth 앱을 만드세요.",
"생성된 URL로 앱 webhook을 AgentSessionEvent, PermissionChange, OAuthAuthorization에 구독하세요.",
"OAuth로 워크스페이스를 연결한 뒤 앱을 멘션하거나 이슈를 위임하세요."
],
"fields": {
"clientId": {
"label": "OAuth 클라이언트 ID",
"placeholder": "Linear OAuth 클라이언트 ID",
"help": "비공개 OAuth 앱에서 복사하세요.\n\nLinear의 비공개 OAuth 앱에서 복사하세요."
"placeholder": "Linear OAuth 클라이언트 ID"
},
"clientSecret": {
"label": "OAuth 클라이언트 시크릿",
"placeholder": "••••••",
"help": "이 nanobot 인스턴스에만 저장됩니다."
"placeholder": "••••••"
},
"webhookSigningSecret": {
"label": "Webhook 서명 시크릿",
"placeholder": "••••••",
"help": "Webhook 서명을 검증합니다.\n\nWebhook 본문을 파싱하기 전에 Linear-Signature를 검증하는 데 사용됩니다."
"placeholder": "••••••"
},
"publicBaseUrl": {
"label": "공개 HTTPS URL",
"placeholder": "https://nanobot.example.com",
"help": "경로가 없는 HTTPS URL을 입력하세요.\n\n아래 리스너로 연결되는 안정적인 HTTPS 오리진입니다. 경로는 포함하지 마세요."
"placeholder": "https://nanobot.example.com"
},
"host": {
"label": "수신 호스트",
@@ -51,12 +37,10 @@
},
"allowFrom": {
"label": "허용된 Linear 사용자",
"placeholder": "쉼표로 구분한 Linear 사용자 ID",
"help": "이 연결을 사용할 사용자를 선택하세요.\n\nnanobot 페어링을 사용하려면 비워 두세요. 연결된 워크스페이스의 모든 사용자를 허용하려면 *를 사용하세요."
"placeholder": "쉼표로 구분한 Linear 사용자 ID"
},
"showReasoning": {
"label": "추론 표시",
"help": "추론을 생각 활동으로 게시합니다.\n\n모델의 추론을 Linear에 생각 활동으로 게시합니다. 더 간결한 세션을 원하면 끄세요."
"label": "추론 표시"
}
}
},
@@ -78,9 +62,6 @@
"savePublicUrl": "공개 HTTPS URL을 입력한 후 Linear 앱을 만드세요.",
"retrySave": "다시 시도",
"channelRunning": "채널 실행 중",
"accessAll": "승인된 워크스페이스의 모든 멤버가 이 에이전트를 실행할 수 있습니다.",
"accessRestricted": "고급 설정에 나열된 Linear 사용자 ID만 이 에이전트를 실행할 수 있습니다.",
"accessPairing": "처음 사용 시 페어링하고, Linear MCP를 연결해 이슈를 검색하거나 수정하세요.",
"configureTools": "Linear MCP 설정",
"workspacesTitle": "승인된 워크스페이스",
"refreshWorkspaces": "워크스페이스 새로 고침",
@@ -128,7 +109,6 @@
"allow": "{{name}}의 nanobot 사용 허용",
"saveUnconfirmed": "권한 저장을 확인하지 못했습니다. 멤버를 새로고침한 후 다시 시도하세요.",
"guide": "멤버 접근 권한에서 코드 없이 동료를 승인하세요. 기존 승인은 끄지 않는 한 유지됩니다. Issue 검색이나 수정에는 Linear MCP를 연결하세요.",
"intro": "페어링 코드 없이 Linear에서 nanobot을 사용할 멤버를 선택하세요.",
"details": "멤버 접근 권한 안내",
"summary": "{{allowed}}명 사용 가능",
"loading": "멤버를 찾는 중…",
@@ -1,37 +1,23 @@
{
"description": "Use o nanobot em issues do Linear por meio de Agent Sessions nativas.",
"requirements": "Um aplicativo OAuth privado do Linear e uma URL pública HTTPS estável para callbacks",
"setup": {
"docsLabel": "Abrir o guia de configuração do Linear",
"officialLabel": "Criar aplicativo OAuth do Linear",
"tryIt": "Mencione o aplicativo ou delegue uma issue a ele; não é preciso mencioná-lo novamente dentro da Agent Session.",
"summary": "Crie um aplicativo OAuth privado do Linear, salve as credenciais e a URL pública e autorize o workspace. Inicie uma sessão mencionando o aplicativo ou delegando uma issue a ele; comentários comuns são ignorados.",
"steps": [
"Exponha esta instância do nanobot por uma URL HTTPS estável (um túnel pode ser usado).",
"Crie um aplicativo OAuth privado no Linear com os escopos read, write, app:mentionable e app:assignable.",
"Inscreva o webhook do aplicativo em AgentSessionEvent, PermissionChange e OAuthAuthorization usando a URL gerada.",
"Conecte o workspace com OAuth e mencione o aplicativo ou delegue uma issue a ele."
],
"fields": {
"clientId": {
"label": "ID do cliente OAuth",
"placeholder": "ID do cliente OAuth do Linear",
"help": "Copie do app OAuth privado.\n\nCopie do aplicativo OAuth privado no Linear."
"placeholder": "ID do cliente OAuth do Linear"
},
"clientSecret": {
"label": "Segredo do cliente OAuth",
"placeholder": "••••••",
"help": "Armazenado somente nesta instância do nanobot."
"placeholder": "••••••"
},
"webhookSigningSecret": {
"label": "Segredo de assinatura do webhook",
"placeholder": "••••••",
"help": "Verifique a assinatura Webhook.\n\nUsado para verificar Linear-Signature antes de interpretar o conteúdo do webhook."
"placeholder": "••••••"
},
"publicBaseUrl": {
"label": "URL HTTPS pública",
"placeholder": "https://nanobot.example.com",
"help": "Informe uma URL HTTPS sem caminho.\n\nUma origem HTTPS estável encaminhada ao listener abaixo; não inclua um caminho."
"placeholder": "https://nanobot.example.com"
},
"host": {
"label": "Host de escuta",
@@ -51,12 +37,10 @@
},
"allowFrom": {
"label": "Usuários do Linear permitidos",
"placeholder": "IDs de usuário do Linear separados por vírgulas",
"help": "Escolha quem pode usar esta conexão.\n\nDeixe vazio para usar o pareamento do nanobot ou use * para permitir todos os usuários dos workspaces conectados."
"placeholder": "IDs de usuário do Linear separados por vírgulas"
},
"showReasoning": {
"label": "Mostrar raciocínio",
"help": "Publique o raciocínio como atividade de pensamento.\n\nPublica o raciocínio do modelo como atividades de pensamento no Linear. Desative para uma sessão mais limpa."
"label": "Mostrar raciocínio"
}
}
},
@@ -78,9 +62,6 @@
"savePublicUrl": "Insira uma URL HTTPS pública para criar um aplicativo Linear.",
"retrySave": "Tentar novamente",
"channelRunning": "Canal em execução",
"accessAll": "Todos os membros de um workspace autorizado podem executar este agente.",
"accessRestricted": "Somente os IDs de usuário do Linear listados em Avançado podem executar este agente.",
"accessPairing": "Faça o pareamento no primeiro uso e conecte o Linear MCP para buscar ou editar issues.",
"configureTools": "Configurar Linear MCP",
"workspacesTitle": "Workspaces autorizados",
"refreshWorkspaces": "Atualizar workspaces",
@@ -128,7 +109,6 @@
"allow": "Permitir que {{name}} use nanobot",
"saveUnconfirmed": "O acesso não foi confirmado. Atualize os membros antes de tentar novamente.",
"guide": "Use Acesso de membros para aprovar colegas sem códigos. Aprovações existentes continuam válidas até serem desativadas. Conecte o Linear MCP para buscar ou editar issues.",
"intro": "Escolha quem pode usar o nanobot no Linear, sem códigos de pareamento.",
"details": "Sobre o acesso de membros",
"summary": "{{allowed}} habilitados",
"loading": "Buscando membros…",
+6 -26
View File
@@ -1,37 +1,23 @@
{
"description": "Sử dụng nanobot từ issue Linear thông qua Agent Session gốc.",
"requirements": "Ứng dụng OAuth Linear riêng tư và URL callback HTTPS công khai, ổn định",
"setup": {
"docsLabel": "Mở hướng dẫn thiết lập Linear",
"officialLabel": "Tạo ứng dụng OAuth Linear",
"tryIt": "Nhắc đến ứng dụng hoặc giao issue cho ứng dụng; không cần nhắc lại trong Agent Session.",
"summary": "Tạo ứng dụng OAuth Linear riêng tư, lưu thông tin xác thực và URL công khai, rồi cấp quyền cho workspace. Bắt đầu phiên bằng cách nhắc đến ứng dụng hoặc giao issue; bình luận thông thường sẽ bị bỏ qua.",
"steps": [
"Công khai phiên bản nanobot này qua URL HTTPS ổn định (có thể dùng tunnel).",
"Tạo ứng dụng OAuth riêng tư trong Linear với các scope read, write, app:mentionable và app:assignable.",
"Đăng ký webhook của ứng dụng cho AgentSessionEvent, PermissionChange và OAuthAuthorization bằng URL được tạo.",
"Kết nối workspace qua OAuth, rồi nhắc đến ứng dụng hoặc giao issue cho ứng dụng."
],
"fields": {
"clientId": {
"label": "ID máy khách OAuth",
"placeholder": "ID máy khách OAuth Linear",
"help": "Sao chép từ ứng dụng OAuth riêng.\n\nSao chép từ ứng dụng OAuth riêng tư trong Linear."
"placeholder": "ID máy khách OAuth Linear"
},
"clientSecret": {
"label": "Mã bí mật máy khách OAuth",
"placeholder": "••••••",
"help": "Chỉ được lưu trên phiên bản nanobot này."
"placeholder": "••••••"
},
"webhookSigningSecret": {
"label": "Mã bí mật ký webhook",
"placeholder": "••••••",
"help": "Xác minh chữ ký Webhook.\n\nDùng để xác minh Linear-Signature trước khi phân tích nội dung webhook."
"placeholder": "••••••"
},
"publicBaseUrl": {
"label": "URL HTTPS công khai",
"placeholder": "https://nanobot.example.com",
"help": "Nhập URL HTTPS không có đường dẫn.\n\nOrigin HTTPS ổn định được chuyển tiếp tới listener bên dưới; không bao gồm path."
"placeholder": "https://nanobot.example.com"
},
"host": {
"label": "Host lắng nghe",
@@ -51,12 +37,10 @@
},
"allowFrom": {
"label": "Người dùng Linear được phép",
"placeholder": "ID người dùng Linear, phân tách bằng dấu phẩy",
"help": "Chọn người được phép dùng kết nối này.\n\nĐể trống để dùng ghép đôi nanobot, hoặc dùng * để cho phép mọi người dùng trong các workspace đã kết nối."
"placeholder": "ID người dùng Linear, phân tách bằng dấu phẩy"
},
"showReasoning": {
"label": "Hiện suy luận",
"help": "Đăng suy luận dưới dạng hoạt động suy nghĩ.\n\nĐăng suy luận của mô hình dưới dạng hoạt động suy nghĩ trong Linear. Tắt để phiên gọn hơn."
"label": "Hiện suy luận"
}
}
},
@@ -78,9 +62,6 @@
"savePublicUrl": "Nhập URL HTTPS công khai để tạo ứng dụng Linear.",
"retrySave": "Thử lại",
"channelRunning": "Channel đang chạy",
"accessAll": "Mọi thành viên trong workspace được cấp quyền đều có thể chạy agent này.",
"accessRestricted": "Chỉ ID người dùng Linear được liệt kê trong Nâng cao mới có thể chạy agent này.",
"accessPairing": "Ghép đôi khi dùng lần đầu và kết nối Linear MCP để tìm kiếm hoặc chỉnh sửa issue.",
"configureTools": "Cấu hình Linear MCP",
"workspacesTitle": "Workspace được cấp quyền",
"refreshWorkspaces": "Làm mới workspace",
@@ -128,7 +109,6 @@
"allow": "Cho phép {{name}} dùng nanobot",
"saveUnconfirmed": "Chưa xác nhận được quyền. Hãy làm mới danh sách trước khi thử lại.",
"guide": "Dùng Quyền truy cập của thành viên để phê duyệt đồng nghiệp không cần mã. Phê duyệt cũ vẫn có hiệu lực trừ khi bị tắt. Kết nối Linear MCP để tìm hoặc sửa issue.",
"intro": "Chọn ai có thể dùng nanobot trong Linear mà không cần mã ghép nối.",
"details": "Về quyền truy cập của thành viên",
"summary": "{{allowed}} người được phép",
"loading": "Đang tìm thành viên…",
@@ -1,37 +1,23 @@
{
"description": "通过 Linear 原生 Agent Session 在 issue 中使用 nanobot。",
"requirements": "一个私有 Linear OAuth 应用和稳定的公网 HTTPS 回调地址",
"setup": {
"docsLabel": "打开 Linear 配置指南",
"officialLabel": "创建 Linear OAuth 应用",
"tryIt": "在 issue 评论中 @ 应用或把 issue 委派给它;进入 Agent Session 后,后续对话无需重复 @。",
"summary": "创建私有 Linear OAuth 应用,保存凭据和公网地址,再授权工作区。可通过 @ 应用或委派 issue 开启会话,普通评论会被忽略。",
"steps": [
"用稳定的 HTTPS 地址暴露此 nanobot 实例(可以使用隧道)。",
"在 Linear 创建私有 OAuth 应用,启用 read、write、app:mentionable 和 app:assignable。",
"将应用 webhook 订阅 AgentSessionEvent、PermissionChange 和 OAuthAuthorization,并填写生成的 webhook 地址。",
"通过 OAuth 连接工作区,然后 @ 应用或把 issue 委派给它。"
],
"fields": {
"clientId": {
"label": "OAuth Client ID",
"placeholder": "Linear OAuth Client ID",
"help": "从私有 OAuth 应用复制\n\n从 Linear 私有 OAuth 应用中复制。"
"placeholder": "Linear OAuth Client ID"
},
"clientSecret": {
"label": "OAuth Client Secret",
"placeholder": "••••••",
"help": "只保存在此 nanobot 实例中。"
"placeholder": "••••••"
},
"webhookSigningSecret": {
"label": "Webhook 签名密钥",
"placeholder": "••••••",
"help": "验证 Webhook 签名\n\n在解析 webhook 内容前验证 Linear-Signature。"
"placeholder": "••••••"
},
"publicBaseUrl": {
"label": "公网 HTTPS 地址",
"placeholder": "https://nanobot.example.com",
"help": "填写不含路径的 HTTPS 地址\n\n稳定且能转发到下方监听端口的 HTTPS 源地址,不要包含路径。"
"placeholder": "https://nanobot.example.com"
},
"host": {
"label": "监听地址",
@@ -51,12 +37,10 @@
},
"allowFrom": {
"label": "允许的 Linear 用户",
"placeholder": "用逗号分隔 Linear 用户 ID",
"help": "选择允许使用的用户\n\n留空使用 nanobot 配对;填写 * 允许已连接工作区内的所有用户。"
"placeholder": "用逗号分隔 Linear 用户 ID"
},
"showReasoning": {
"label": "显示推理",
"help": "将推理发布为思考动态\n\n把模型推理作为思考动态发布到 Linear;关闭后会话更简洁。"
"label": "显示推理"
}
}
},
@@ -73,9 +57,6 @@
"savePublicUrl": "请先填写公网 HTTPS 地址,再创建 Linear 应用。",
"retrySave": "重试",
"channelRunning": "Channel 正在运行",
"accessAll": "已授权工作区中的所有成员都可以运行此 Agent。",
"accessRestricted": "只有“高级”中列出的 Linear 用户 ID 可以运行此 Agent。",
"accessPairing": "首次使用需配对,连接 Linear MCP 后可搜索或修改 issue。",
"configureTools": "配置 Linear MCP",
"workspacesTitle": "已授权的工作区",
"refreshWorkspaces": "刷新工作区",
@@ -128,7 +109,6 @@
"allow": "允许 {{name}} 使用 nanobot",
"saveUnconfirmed": "未能确认权限已保存,请刷新成员列表后重试。",
"guide": "在「成员访问」中为同事开通免配对使用。已有授权仍然有效,除非手动关闭。连接 Linear MCP 后可搜索或修改 issue。",
"intro": "选择哪些成员可以在 Linear 中使用 nanobot,无需配对码。",
"details": "关于成员访问权限",
"summary": "{{allowed}} 人可用",
"loading": "正在查找成员…",
@@ -1,37 +1,23 @@
{
"description": "透過 Linear 原生 Agent Session 在 issue 中使用 nanobot。",
"requirements": "一個私有 Linear OAuth 應用程式和穩定的公網 HTTPS 回呼網址",
"setup": {
"docsLabel": "開啟 Linear 設定指南",
"officialLabel": "建立 Linear OAuth 應用程式",
"tryIt": "在 issue 評論中 @ 應用程式或將 issue 委派給它;進入 Agent Session 後,後續對話無需重複 @。",
"summary": "建立私有 Linear OAuth 應用程式,儲存憑證和公網網址,再授權工作區。可透過 @ 應用程式或委派 issue 開啟會話,普通評論會被忽略。",
"steps": [
"用穩定的 HTTPS 網址公開此 nanobot 實例(可以使用隧道)。",
"在 Linear 建立私有 OAuth 應用程式,啟用 read、write、app:mentionable 和 app:assignable。",
"將應用程式 webhook 訂閱 AgentSessionEvent、PermissionChange 和 OAuthAuthorization,並填入產生的 webhook 網址。",
"透過 OAuth 連接工作區,然後 @ 應用程式或將 issue 委派給它。"
],
"fields": {
"clientId": {
"label": "OAuth Client ID",
"placeholder": "Linear OAuth Client ID",
"help": "從私有 OAuth 應用複製\n\n從 Linear 私有 OAuth 應用中複製。"
"placeholder": "Linear OAuth Client ID"
},
"clientSecret": {
"label": "OAuth Client Secret",
"placeholder": "••••••",
"help": "只儲存在此 nanobot 實例中。"
"placeholder": "••••••"
},
"webhookSigningSecret": {
"label": "Webhook 簽署密鑰",
"placeholder": "••••••",
"help": "驗證 Webhook 簽名\n\n在解析 webhook 內容前驗證 Linear-Signature。"
"placeholder": "••••••"
},
"publicBaseUrl": {
"label": "公網 HTTPS 網址",
"placeholder": "https://nanobot.example.com",
"help": "填寫不含路徑的 HTTPS 地址\n\n穩定且能轉發到下方監聽埠的 HTTPS 源地址,不要包含路徑。"
"placeholder": "https://nanobot.example.com"
},
"host": {
"label": "監聽位址",
@@ -51,12 +37,10 @@
},
"allowFrom": {
"label": "允許的 Linear 使用者",
"placeholder": "以逗號分隔 Linear 使用者 ID",
"help": "選擇允許使用的使用者\n\n留空使用 nanobot 配對;填寫 * 允許已連線工作區內的所有使用者。"
"placeholder": "以逗號分隔 Linear 使用者 ID"
},
"showReasoning": {
"label": "顯示推理",
"help": "將推理釋出為思考動態\n\n把模型推理作為思考動態釋出到 Linear;關閉後會話更簡潔。"
"label": "顯示推理"
}
}
},
@@ -73,9 +57,6 @@
"savePublicUrl": "請先填寫公網 HTTPS 網址,再建立 Linear 應用程式。",
"retrySave": "重試",
"channelRunning": "Channel 正在執行",
"accessAll": "已授權工作區中的所有成員都可以執行此 Agent。",
"accessRestricted": "只有「進階」中列出的 Linear 使用者 ID 可以執行此 Agent。",
"accessPairing": "首次使用需配對,連接 Linear MCP 後可搜尋或修改 issue。",
"configureTools": "設定 Linear MCP",
"workspacesTitle": "已授權的工作區",
"refreshWorkspaces": "重新整理工作區",
@@ -128,7 +109,6 @@
"allow": "允許 {{name}} 使用 nanobot",
"saveUnconfirmed": "無法確認權限已儲存,請重新整理成員清單後再試。",
"guide": "在「成員存取」中為同事開通免配對使用。既有授權仍然有效,除非手動關閉。連接 Linear MCP 後可搜尋或修改 issue。",
"intro": "選擇哪些成員可以在 Linear 中使用 nanobot,無需配對碼。",
"details": "關於成員存取權限",
"summary": "{{allowed}} 人可用",
"loading": "正在尋找成員…",
-3
View File
@@ -195,7 +195,6 @@ class ChannelManager:
def _build_channel(
self,
name: str,
cls: type[BaseChannel],
section: Any,
*,
@@ -324,7 +323,6 @@ class ChannelManager:
(
runtime_name,
self._build_channel(
name,
cls,
spec.config,
runtime_name=runtime_name,
@@ -578,7 +576,6 @@ class ChannelManager:
(
runtime_name,
self._build_channel(
name,
cls,
spec.config,
runtime_name=runtime_name,
+2 -2
View File
@@ -1348,7 +1348,7 @@ class MatrixChannel(BaseChannel):
return None
async def _fetch_media_attachment(
self, room: MatrixRoom, event: MatrixMediaEvent,
self, event: MatrixMediaEvent,
) -> tuple[dict[str, Any] | None, str]:
"""Download, decrypt if needed, and persist a Matrix attachment."""
atype = self._event_attachment_type(event)
@@ -1437,7 +1437,7 @@ class MatrixChannel(BaseChannel):
or not self._should_process_message(room, event)
):
return
attachment, marker = await self._fetch_media_attachment(room, event)
attachment, marker = await self._fetch_media_attachment(event)
parts: list[str] = []
if isinstance(body := getattr(event, "body", None), str) and body.strip():
parts.append(body.strip())
@@ -2781,7 +2781,6 @@ async def test_fetch_media_rejects_missing_declared_size(monkeypatch, tmp_path)
)
attachment, marker = await channel._fetch_media_attachment(
SimpleNamespace(room_id="!room:matrix.org"),
event,
)
@@ -2809,7 +2808,6 @@ async def test_fetch_media_rejects_bool_declared_size(monkeypatch, tmp_path) ->
)
attachment, marker = await channel._fetch_media_attachment(
SimpleNamespace(room_id="!room:matrix.org"),
event,
)
@@ -2837,7 +2835,6 @@ async def test_fetch_media_rejects_declared_oversized_before_download(monkeypatc
)
attachment, marker = await channel._fetch_media_attachment(
SimpleNamespace(room_id="!room:matrix.org"),
event,
)
@@ -2865,7 +2862,6 @@ async def test_fetch_media_maps_streaming_cap_to_too_large(monkeypatch, tmp_path
)
attachment, marker = await channel._fetch_media_attachment(
SimpleNamespace(room_id="!room:matrix.org"),
event,
)
+4 -4
View File
@@ -278,7 +278,7 @@ class MattermostChannel(BaseChannel):
session_key = f"mattermost:{channel_id}:{thread_ts}" if thread_ts else None
try:
await self._add_reaction(channel_id, post_id, self.config.react_emoji)
await self._add_reaction(post_id, self.config.react_emoji)
except Exception:
self.logger.debug("add reaction failed")
@@ -537,7 +537,7 @@ class MattermostChannel(BaseChannel):
self.logger.debug("remove reaction failed")
if self.config.done_emoji:
try:
await self._add_reaction(chat_id, meta["message_id"], self.config.done_emoji)
await self._add_reaction(meta["message_id"], self.config.done_emoji)
except Exception:
self.logger.debug("done reaction failed")
@@ -612,7 +612,7 @@ class MattermostChannel(BaseChannel):
self.logger.debug("remove reaction failed")
if first_post_id and self.config.done_emoji:
try:
await self._add_reaction(chat_id, first_post_id, self.config.done_emoji)
await self._add_reaction(first_post_id, self.config.done_emoji)
except Exception:
self.logger.debug("done reaction failed")
@@ -721,7 +721,7 @@ class MattermostChannel(BaseChannel):
self.logger.warning("file download failed for {}: {}", file_id, e)
return None
async def _add_reaction(self, channel_id: str, post_id: str, emoji: str) -> None:
async def _add_reaction(self, post_id: str, emoji: str) -> None:
if not self._self_id or not emoji:
return
await self._api_post("/api/v4/reactions", {
@@ -784,7 +784,7 @@ async def test_coalesced_stream_end_posts_inline_content():
async def test_reaction_add_on_receipt():
channel, fake = _make_channel()
channel._self_id = "bot_id"
await channel._add_reaction("chan_1", "post_1", "eyes")
await channel._add_reaction("post_1", "eyes")
reactions = [c for c in fake.post_calls if c["path"] == "/api/v4/reactions"]
assert len(reactions) >= 1
assert reactions[-1]["json"]["emoji_name"] == "eyes"
@@ -7,7 +7,6 @@ import { channelStatusLabel } from "@/components/settings/channels/ChannelIdenti
import { QQConnectFlowView, useQQConnectLabels } from "./QQConnectFlowView";
export function QQConnectFlow({
token,
feature,
connectRequestId,
onOpenAdvanced,
@@ -20,7 +19,6 @@ export function QQConnectFlow({
: channelStatusLabel(feature, (key, fallback) => t(key, { defaultValue: fallback }));
return (
<ChannelQrConnectFlow
token={token}
channelName="qq"
connectRequestId={connectRequestId}
autoStart={!feature.configured}
-9
View File
@@ -662,10 +662,6 @@ class SignalChannel(BaseChannel):
# SSE spec: strip one optional leading space after "data:".
event_buffer.append(line[6:] if line[5:6] == " " else line[5:])
# "event:" line - just log it (we only care about data)
elif line.startswith("event:"):
pass # Ignore event type for now
if self._running:
raise ConnectionError("Signal SSE stream closed by remote endpoint")
@@ -723,7 +719,6 @@ class SignalChannel(BaseChannel):
# Check different message types
data_message = _as_json_object(envelope.get("dataMessage"))
sync_message = _as_json_object(envelope.get("syncMessage"))
typing_message = _as_json_object(envelope.get("typingMessage"))
receipt_message = _as_json_object(envelope.get("receiptMessage"))
# Ignore receipt messages (delivery/read receipts)
@@ -742,10 +737,6 @@ class SignalChannel(BaseChannel):
"Sync message sent to {}: {}", destination, sent_msg.get("message", "")[:50]
)
# Handle typing indicators (silently ignore)
elif typing_message:
pass # Ignore typing indicators
async def _handle_data_message(
self,
sender_id: str,
-3
View File
@@ -539,7 +539,6 @@ class SlackChannel(BaseChannel):
content = text if is_slash else await self._with_thread_context(
text,
chat_id=chat_id,
channel_type=channel_type,
thread_ts=thread_ts,
raw_thread_ts=raw_thread_ts,
current_ts=event_ts,
@@ -674,13 +673,11 @@ class SlackChannel(BaseChannel):
text: str,
*,
chat_id: str,
channel_type: str,
thread_ts: str | None,
raw_thread_ts: str | None,
current_ts: str | None,
) -> str:
"""Include thread history the first time the bot is pulled into a Slack thread."""
del channel_type # DM and channel threads are both fetched via conversations.replies
if (
not self.config.include_thread_context
or not self._web_client
@@ -464,7 +464,6 @@ async def test_with_thread_context_fetches_root_once() -> None:
content = await channel._with_thread_context(
"what did you see?",
chat_id="C123",
channel_type="channel",
thread_ts="111.000",
raw_thread_ts="111.000",
current_ts="113.000",
@@ -483,7 +482,6 @@ async def test_with_thread_context_fetches_root_once() -> None:
second = await channel._with_thread_context(
"again",
chat_id="C123",
channel_type="channel",
thread_ts="111.000",
raw_thread_ts="111.000",
current_ts="114.000",
@@ -509,7 +507,6 @@ async def test_with_thread_context_fetches_replies_in_dm_thread() -> None:
content = await channel._with_thread_context(
"what did you see?",
chat_id="D123",
channel_type="im",
thread_ts="211.000",
raw_thread_ts="211.000",
current_ts="213.000",
+8 -11
View File
@@ -485,7 +485,6 @@ class _QueuedTelegramUpdate:
kind: Literal["command", "message"]
update: Update
context: ContextTypes.DEFAULT_TYPE
sort_key: tuple[int, int]
@@ -1937,7 +1936,6 @@ class TelegramChannel(BaseChannel):
*,
kind: Literal["command", "message"],
update: Update,
context: ContextTypes.DEFAULT_TYPE,
) -> None:
"""Stage a Telegram update behind a short per-session reorder window."""
message = update.message
@@ -1948,7 +1946,6 @@ class TelegramChannel(BaseChannel):
_QueuedTelegramUpdate(
kind=kind,
update=update,
context=context,
sort_key=self._sort_key_for_update(update),
)
)
@@ -1970,9 +1967,9 @@ class TelegramChannel(BaseChannel):
for item in batch:
try:
if item.kind == "command":
await self._process_forward_command(item.update, item.context)
await self._process_forward_command(item.update)
else:
await self._process_message_update(item.update, item.context)
await self._process_message_update(item.update)
except Exception as e:
self.logger.warning(
"Telegram queued update handling failed for {}: {}",
@@ -1994,11 +1991,11 @@ class TelegramChannel(BaseChannel):
if not update.message or not update.effective_user:
return
if not self._running:
await self._process_forward_command(update, context)
await self._process_forward_command(update)
return
self._enqueue_ordered_update(kind="command", update=update, context=context)
self._enqueue_ordered_update(kind="command", update=update)
async def _process_forward_command(self, update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
async def _process_forward_command(self, update: Update) -> None:
"""Process a queued slash command."""
message = update.message
user = update.effective_user
@@ -2031,11 +2028,11 @@ class TelegramChannel(BaseChannel):
if not update.message or not update.effective_user:
return
if not self._running:
await self._process_message_update(update, context)
await self._process_message_update(update)
return
self._enqueue_ordered_update(kind="message", update=update, context=context)
self._enqueue_ordered_update(kind="message", update=update)
async def _process_message_update(self, update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
async def _process_message_update(self, update: Update) -> None:
"""Process a queued Telegram message update."""
message = update.message
@@ -794,7 +794,7 @@ async def test_running_message_handler_reorders_same_session_updates() -> None:
seen: list[int] = []
processed = asyncio.Event()
async def fake_process(update, context) -> None:
async def fake_process(update) -> None:
seen.append(update.message.message_id)
if len(seen) == 2:
processed.set()
+1 -1
View File
@@ -127,7 +127,7 @@ async def test_manager_keeps_shared_proxy_instance_scoped(monkeypatch) -> None:
manager = object.__new__(ChannelManager)
manager.config = Config(network=NetworkConfig(proxy=address))
manager.bus = MessageBus()
channel = manager._build_channel("whatsapp", WhatsAppChannel, {"useProxy": True})
channel = manager._build_channel(WhatsAppChannel, {"useProxy": True})
assert channel.network is manager.config.network
channels.append(channel)
-2
View File
@@ -92,7 +92,6 @@ class WecomChannel(BaseChannel):
self.config: WecomConfig = config
self._client: Any = None
self._processed_message_ids: OrderedDict[str, None] = OrderedDict()
self._loop: asyncio.AbstractEventLoop | None = None
self._generate_req_id: Callable[[str], str] | None = None
# Store frame headers for each chat to enable replies
self._chat_frames: dict[str, Any] = {}
@@ -114,7 +113,6 @@ class WecomChannel(BaseChannel):
from wecom_aibot_sdk import WSClient, generate_req_id
self._running = True
self._loop = asyncio.get_running_loop()
self._generate_req_id = generate_req_id
# Create WebSocket client
@@ -490,8 +490,6 @@ async def test_process_image_message() -> None:
assert msg.media[0].endswith("photo.png")
assert "[image:" in msg.content
finally:
if os.path.exists(saved):
pass # may have been overwritten; clean up if exists
# Clean up any photo.png in tempdir
p = os.path.join(os.path.dirname(saved), "photo.png")
if os.path.exists(p):
-2
View File
@@ -25,7 +25,6 @@ class WeixinConnectSession:
force: bool
created_wall: float
deadline: float
last_error: str | None = None
class WeixinConnectStore:
@@ -123,7 +122,6 @@ class WeixinConnectStore:
)
except Exception as exc:
if session.channel.connect_poll_error_is_retryable(exc):
session.last_error = str(exc)
return self._pending_payload(session)
self._sessions.pop(session_id, None)
await self._close_channel(session.channel)
@@ -107,7 +107,7 @@ def test_channel_manager_preserves_weixin_quota_defaults(
manager.config = Config.model_validate({"channels": {"weixin": section}})
manager.bus = MessageBus()
channel = manager._build_channel("weixin", WeixinChannel, section)
channel = manager._build_channel(WeixinChannel, section)
assert channel.send_progress is send_progress
assert channel.send_tool_hints is send_tool_hints
@@ -9,7 +9,6 @@ import { isVerificationChallenge, WEIXIN_AUTH_EXPIRED_MESSAGE } from "./presenta
export { WEIXIN_AUTH_EXPIRED_MESSAGE } from "./presentation";
export function WeixinConnectFlow({
token,
feature,
authRecoveryActive = false,
idleLabel,
@@ -27,7 +26,6 @@ export function WeixinConnectFlow({
return (
<ChannelQrConnectFlow
token={token}
channelName="weixin"
startParams={authExpired ? { force: true } : {}}
idleLabel={authExpired ? scanAgainLabel : idleLabel}
@@ -4,7 +4,6 @@ import { ChannelQrConnectFlow } from "@/components/settings/channels/ChannelQrCo
import { WhatsAppConnectFlowView, useWhatsAppConnectLabels } from "./WhatsAppConnectFlowView";
export function WhatsAppConnectFlow({
token,
idleLabel,
connectRequestId,
onFeaturesUpdate,
@@ -13,7 +12,6 @@ export function WhatsAppConnectFlow({
return (
<ChannelQrConnectFlow
token={token}
channelName="whatsapp"
idleLabel={idleLabel}
connectRequestId={connectRequestId}
@@ -26,7 +26,6 @@ RATE_LIMITS = {
"updates": 15,
"media": 12,
}
_RATE_WINDOW_SECONDS = 60.0
# error.code values that carry a specific recovery contract.
CODE_INVALID_TOKEN = 100
@@ -73,7 +73,6 @@ _RATE_WINDOW_SECONDS = 60.0
# 15 polls/minute is one per 4s even when traffic is continuous.
_MIN_POLL_GAP_SECONDS = 4.1
_MAX_POLL_LIMIT = 100
_DEFAULT_POLL_LIMIT = 50
# The typing indicator expires after 25s, so refresh inside that window.
_TYPING_REFRESH_SECONDS = 20.0
@@ -94,10 +94,6 @@ def _text_message(wamid: str, body: str = "hi", sender: str = "user:55") -> dict
}
def _json_response(status: int, payload: Any) -> httpx.Response:
return httpx.Response(status, json=payload)
# ----------------------------------------------------------------------
# Retry policy
# ----------------------------------------------------------------------
@@ -2,13 +2,11 @@
"setup": {
"docsLabel": "Open agent setup guide",
"officialLabel": "Open WhatsApp agent help",
"summary": "Connect nanobot through WhatsApp's Agent Platform API. Only you can chat with it, and it cannot access your other WhatsApp chats.",
"privacyNotice": "Agent chats are not end-to-end encrypted. Messages are processed by nanobot and your configured model provider.",
"fields": {
"token": {
"label": "API token",
"placeholder": "In WhatsApp, open Settings → Agents, create the agent, then copy the key from the agent chat → Chat info → API key.",
"help": "In WhatsApp, open Settings → Agents, create the agent, then copy the key from the agent chat → Chat info → API key."
"placeholder": "In WhatsApp, open Settings → Agents, create the agent, then copy the key from the agent chat → Chat info → API key."
},
"allowFrom": {
"label": "Allowed senders",
@@ -2,13 +2,11 @@
"setup": {
"docsLabel": "Abrir la guía de configuración del agente",
"officialLabel": "Abrir la ayuda de agentes de WhatsApp",
"summary": "Conecta nanobot mediante la API de WhatsApp Agent Platform. Solo tú puedes chatear con él y no puede acceder a tus otros chats de WhatsApp.",
"privacyNotice": "Los chats con el agente no están cifrados de extremo a extremo. nanobot y el proveedor de modelos que hayas configurado procesan los mensajes.",
"fields": {
"token": {
"label": "Token de API",
"placeholder": "En WhatsApp, abre Ajustes → Agentes, crea el agente y copia la clave desde el chat del agente → Info del chat → Clave de API.",
"help": "En WhatsApp, abre Ajustes → Agentes, crea el agente y copia la clave desde el chat del agente → Info del chat → Clave de API."
"placeholder": "En WhatsApp, abre Ajustes → Agentes, crea el agente y copia la clave desde el chat del agente → Info del chat → Clave de API."
},
"allowFrom": {
"label": "Remitentes permitidos",
@@ -2,13 +2,11 @@
"setup": {
"docsLabel": "Ouvrir le guide de configuration de l'agent",
"officialLabel": "Ouvrir l'aide des agents WhatsApp",
"summary": "Connectez nanobot via l'API WhatsApp Agent Platform. Vous seul pouvez lui écrire, et il ne peut pas accéder à vos autres conversations WhatsApp.",
"privacyNotice": "Les conversations avec l'agent ne sont pas chiffrées de bout en bout. Les messages sont traités par nanobot et le fournisseur de modèles que vous avez configuré.",
"fields": {
"token": {
"label": "Jeton d'API",
"placeholder": "Dans WhatsApp, ouvrez Réglages → Agents, créez l'agent, puis copiez la clé depuis la conversation de l'agent → Infos de la discussion → Clé API.",
"help": "Dans WhatsApp, ouvrez Réglages → Agents, créez l'agent, puis copiez la clé depuis la conversation de l'agent → Infos de la discussion → Clé API."
"placeholder": "Dans WhatsApp, ouvrez Réglages → Agents, créez l'agent, puis copiez la clé depuis la conversation de l'agent → Infos de la discussion → Clé API."
},
"allowFrom": {
"label": "Expéditeurs autorisés",
@@ -2,13 +2,11 @@
"setup": {
"docsLabel": "Buka panduan penyiapan agen",
"officialLabel": "Buka bantuan agen WhatsApp",
"summary": "Hubungkan nanobot melalui API WhatsApp Agent Platform. Hanya Anda yang dapat mengobrol dengannya, dan agen tidak dapat mengakses obrolan WhatsApp Anda yang lain.",
"privacyNotice": "Obrolan dengan agen tidak dienkripsi secara menyeluruh. Pesan diproses oleh nanobot dan penyedia model yang Anda konfigurasikan.",
"fields": {
"token": {
"label": "Token API",
"placeholder": "Di WhatsApp, buka Setelan → Agen, buat agen, lalu salin kunci dari obrolan agen → Info obrolan → Kunci API.",
"help": "Di WhatsApp, buka Setelan → Agen, buat agen, lalu salin kunci dari obrolan agen → Info obrolan → Kunci API."
"placeholder": "Di WhatsApp, buka Setelan → Agen, buat agen, lalu salin kunci dari obrolan agen → Info obrolan → Kunci API."
},
"allowFrom": {
"label": "Pengirim yang diizinkan",
@@ -2,13 +2,11 @@
"setup": {
"docsLabel": "エージェント設定ガイドを開く",
"officialLabel": "WhatsApp エージェントのヘルプを開く",
"summary": "WhatsApp Agent Platform API を通じて nanobot を接続します。会話できるのは本人だけで、他の WhatsApp チャットにはアクセスできません。",
"privacyNotice": "エージェントとのチャットはエンドツーエンド暗号化されません。メッセージは nanobot と設定したモデルプロバイダーによって処理されます。",
"fields": {
"token": {
"label": "API トークン",
"placeholder": "WhatsApp で 設定 → エージェント を開き、エージェントを作成して、エージェントのチャット → チャット情報 → API キー からキーをコピーします。",
"help": "WhatsApp で 設定 → エージェント を開き、エージェントを作成して、エージェントのチャット → チャット情報 → API キー からキーをコピーします。"
"placeholder": "WhatsApp で 設定 → エージェント を開き、エージェントを作成して、エージェントのチャット → チャット情報 → API キー からキーをコピーします。"
},
"allowFrom": {
"label": "許可する送信者",
@@ -2,13 +2,11 @@
"setup": {
"docsLabel": "에이전트 설정 가이드 열기",
"officialLabel": "WhatsApp 에이전트 도움말 열기",
"summary": "WhatsApp Agent Platform API를 통해 nanobot을 연결합니다. 나만 대화할 수 있으며 다른 WhatsApp 채팅에는 접근할 수 없습니다.",
"privacyNotice": "에이전트와의 채팅에는 종단간 암호화가 적용되지 않습니다. 메시지는 nanobot과 설정한 모델 제공업체가 처리합니다.",
"fields": {
"token": {
"label": "API 토큰",
"placeholder": "WhatsApp에서 설정 → 에이전트를 열고 에이전트를 만든 뒤 에이전트 채팅 → 채팅 정보 → API 키에서 키를 복사하세요.",
"help": "WhatsApp에서 설정 → 에이전트를 열고 에이전트를 만든 뒤 에이전트 채팅 → 채팅 정보 → API 키에서 키를 복사하세요."
"placeholder": "WhatsApp에서 설정 → 에이전트를 열고 에이전트를 만든 뒤 에이전트 채팅 → 채팅 정보 → API 키에서 키를 복사하세요."
},
"allowFrom": {
"label": "허용된 발신자",
@@ -2,13 +2,11 @@
"setup": {
"docsLabel": "Abrir o guia de configuração do agente",
"officialLabel": "Abrir a ajuda de agentes do WhatsApp",
"summary": "Conecte o nanobot pela API do WhatsApp Agent Platform. Só você pode conversar com ele, e ele não pode acessar suas outras conversas do WhatsApp.",
"privacyNotice": "As conversas com o agente não têm criptografia de ponta a ponta. As mensagens são processadas pelo nanobot e pelo provedor de modelos que você configurou.",
"fields": {
"token": {
"label": "Token de API",
"placeholder": "No WhatsApp, abra Configurações → Agentes, crie o agente e copie a chave em conversa do agente → Informações da conversa → Chave de API.",
"help": "No WhatsApp, abra Configurações → Agentes, crie o agente e copie a chave em conversa do agente → Informações da conversa → Chave de API."
"placeholder": "No WhatsApp, abra Configurações → Agentes, crie o agente e copie a chave em conversa do agente → Informações da conversa → Chave de API."
},
"allowFrom": {
"label": "Remetentes permitidos",
@@ -2,13 +2,11 @@
"setup": {
"docsLabel": "Mở hướng dẫn thiết lập tác nhân",
"officialLabel": "Mở trợ giúp tác nhân WhatsApp",
"summary": "Kết nối nanobot qua API WhatsApp Agent Platform. Chỉ bạn có thể trò chuyện với tác nhân và tác nhân không thể truy cập các cuộc trò chuyện WhatsApp khác của bạn.",
"privacyNotice": "Cuộc trò chuyện với tác nhân không được mã hóa đầu cuối. Tin nhắn được xử lý bởi nanobot và nhà cung cấp mô hình bạn đã cấu hình.",
"fields": {
"token": {
"label": "Mã thông báo API",
"placeholder": "Trong WhatsApp, mở Cài đặt → Tác nhân, tạo tác nhân, rồi sao chép khóa từ trò chuyện của tác nhân → Thông tin trò chuyện → Khóa API.",
"help": "Trong WhatsApp, mở Cài đặt → Tác nhân, tạo tác nhân, rồi sao chép khóa từ trò chuyện của tác nhân → Thông tin trò chuyện → Khóa API."
"placeholder": "Trong WhatsApp, mở Cài đặt → Tác nhân, tạo tác nhân, rồi sao chép khóa từ trò chuyện của tác nhân → Thông tin trò chuyện → Khóa API."
},
"allowFrom": {
"label": "Người gửi được phép",
@@ -2,13 +2,11 @@
"setup": {
"docsLabel": "打开智能体设置指南",
"officialLabel": "打开 WhatsApp 智能体帮助",
"summary": "通过 WhatsApp Agent Platform API 接入 nanobot。只有你可以与它对话,它无法访问你的其他 WhatsApp 聊天。",
"privacyNotice": "智能体对话不采用端到端加密。消息由 nanobot 和你配置的模型服务商处理。",
"fields": {
"token": {
"label": "API 令牌",
"placeholder": "在 WhatsApp 中打开 设置 → 智能体,创建智能体,然后从智能体聊天 → 聊天信息 → API 密钥 复制密钥。",
"help": "在 WhatsApp 中打开 设置 → 智能体,创建智能体,然后从智能体聊天 → 聊天信息 → API 密钥 复制密钥。"
"placeholder": "在 WhatsApp 中打开 设置 → 智能体,创建智能体,然后从智能体聊天 → 聊天信息 → API 密钥 复制密钥。"
},
"allowFrom": {
"label": "允许的发送者",
@@ -2,13 +2,11 @@
"setup": {
"docsLabel": "開啟代理設定指南",
"officialLabel": "開啟 WhatsApp 代理說明",
"summary": "透過 WhatsApp Agent Platform API 連接 nanobot。只有你可以與它對話,它無法存取你的其他 WhatsApp 聊天。",
"privacyNotice": "代理對話不採用端對端加密。訊息由 nanobot 和你設定的模型服務供應商處理。",
"fields": {
"token": {
"label": "API 權杖",
"placeholder": "在 WhatsApp 中開啟 設定 → 代理,建立代理,然後從代理聊天 → 聊天資訊 → API 金鑰 複製金鑰。",
"help": "在 WhatsApp 中開啟 設定 → 代理,建立代理,然後從代理聊天 → 聊天資訊 → API 金鑰 複製金鑰。"
"placeholder": "在 WhatsApp 中開啟 設定 → 代理,建立代理,然後從代理聊天 → 聊天資訊 → API 金鑰 複製金鑰。"
},
"allowFrom": {
"label": "允許的寄件者",
-1
View File
@@ -282,7 +282,6 @@ def webui(
try:
with run_webui_dev_server(
target_url=webui_dev_proxy_target(webui_url),
browser_url=dev_browser_url,
output=lambda message: console.print(message, style="dim", markup=False),
) as dev_server:
managed = not existing_gateway or runtime.status().running
+2 -3
View File
@@ -630,7 +630,7 @@ def _build_codex_http_error(status_code: int, headers: httpx.Headers, raw: str)
for marker in ("context_management", "compact_threshold", "compaction_trigger")
)
return _CodexHTTPError(
_friendly_error(status_code, raw), status_code=status_code,
_friendly_error(status_code), status_code=status_code,
retry_after=retry_after, error_type=error_type, error_code=error_code,
should_retry=_should_retry_status(status_code, error_type, error_code, raw),
compaction_unsupported=compaction_unsupported,
@@ -643,8 +643,7 @@ def _prompt_cache_key(session_id: str) -> str:
return hashlib.sha256(session_id.encode("utf-8")).hexdigest()
def _friendly_error(status_code: int, raw: str) -> str:
_ = raw
def _friendly_error(status_code: int) -> str:
if status_code == 429:
return "ChatGPT usage quota exceeded or rate limit triggered. Please try again later."
return f"HTTP {status_code}: Codex API request failed"
-3
View File
@@ -111,9 +111,6 @@ class HistoryReader:
):
yield HistoryTurn(*row)
def read_turn(self, ordinal: int) -> list[HistoryFact]:
return [fact for _, fact in self.read_entries(ordinal)]
def read_entries(
self, ordinal: int, *, max_records: int | None = None, max_bytes: int | None = None,
) -> list[tuple[int, HistoryFact]]:
-7
View File
@@ -40,8 +40,6 @@ _MESSAGE_TIME_PREFIX_RE = re.compile(r"^\[Message Time: [^\]]+\]\n?")
_LOCAL_IMAGE_BREADCRUMB_RE = re.compile(r"^\[image: (?:/|~)[^\]]+\]\s*$")
_TOOL_CALL_ECHO_RE = re.compile(r'^\s*(?:generate_image|message)\([^)]*\)\s*$')
_SESSION_PREVIEW_MAX_CHARS = 120
_SESSION_LIST_PREVIEW_MAX_RECORDS = 200
_SESSION_LIST_PREVIEW_MAX_CHARS = 1_000_000
_FORK_VOLATILE_METADATA_KEYS = {
"_stopped_at_iteration_limit",
PARENT_SESSION_KEY,
@@ -484,11 +482,6 @@ class SessionManager:
"""Public decoder for components that inspect canonical session filenames."""
return SessionManager._decode_storage_key(stem)
@classmethod
def _session_key_from_path(cls, path: Path) -> str | None:
"""Decode a session key only from a canonical collision-resistant filename."""
return SessionLocation.session_key_from_path(path)
def _require_offline_mutation(self) -> None:
if self._state is not None and self._state.is_bound:
raise RuntimeError(
+1 -5
View File
@@ -434,10 +434,7 @@ def _display_workspace(tool: Any, fallback: Path | None) -> Path | None:
return fallback
def build_file_edit_start_event(
tracker: FileEditTracker,
params: dict[str, Any] | None = None,
) -> dict[str, Any]:
def build_file_edit_start_event(tracker: FileEditTracker) -> dict[str, Any]:
return _event_payload(
tracker,
phase="start",
@@ -450,7 +447,6 @@ def build_file_edit_start_event(
def build_file_edit_end_event(
tracker: FileEditTracker,
params: dict[str, Any] | None = None,
*,
diff: FileDiff | None = None,
) -> dict[str, Any]:
-11
View File
@@ -45,14 +45,11 @@ class WebUIBundleStatus:
source_dir: Path
dist_dir: Path
index_html: Path
source_available: bool
dist_available: bool
stale: bool
reason: str
newest_source: Path | None = None
newest_source_mtime_ns: int | None = None
dist_mtime_ns: int | None = None
@property
def needs_build(self) -> bool:
@@ -116,7 +113,6 @@ def inspect_webui_bundle(
return WebUIBundleStatus(
source_dir=resolved_source,
dist_dir=resolved_dist,
index_html=index_html,
source_available=False,
dist_available=index_html.is_file(),
stale=False,
@@ -127,7 +123,6 @@ def inspect_webui_bundle(
return WebUIBundleStatus(
source_dir=resolved_source,
dist_dir=resolved_dist,
index_html=index_html,
source_available=True,
dist_available=False,
stale=True,
@@ -150,27 +145,21 @@ def inspect_webui_bundle(
return WebUIBundleStatus(
source_dir=resolved_source,
dist_dir=resolved_dist,
index_html=index_html,
source_available=True,
dist_available=True,
stale=True,
reason="source_newer",
newest_source=newest_source,
newest_source_mtime_ns=newest_source_mtime_ns,
dist_mtime_ns=dist_mtime_ns,
)
return WebUIBundleStatus(
source_dir=resolved_source,
dist_dir=resolved_dist,
index_html=index_html,
source_available=True,
dist_available=True,
stale=False,
reason="fresh",
newest_source=newest_source,
newest_source_mtime_ns=newest_source_mtime_ns,
dist_mtime_ns=dist_mtime_ns,
)
-3
View File
@@ -124,7 +124,6 @@ def _vite_command(runner: str, vite_cli: Path) -> list[str]:
def start_webui_dev_server(
*,
target_url: str,
browser_url: str,
source_dir: Path | None = None,
runner: str | None = None,
environ: Mapping[str, str] | None = None,
@@ -190,13 +189,11 @@ def start_webui_dev_server(
def run_webui_dev_server(
*,
target_url: str,
browser_url: str,
output: Callable[[str], None] | None = None,
) -> Generator[WebUIDevServer, None, None]:
"""Run a Vite sidecar for the duration of a foreground WebUI command."""
server = start_webui_dev_server(
target_url=target_url,
browser_url=browser_url,
output=output,
)
try:
-1
View File
@@ -361,7 +361,6 @@ def login_oauth_provider(
query,
oauth_flows=oauth_flows,
config_path=config_path,
settings_payload=settings_payload,
)
+1 -10
View File
@@ -178,19 +178,11 @@ def mask_secret_hint(secret: str | None) -> str | None:
def _resolve_env_placeholders(value: str | None) -> str | None:
if not value:
return None
missing = False
def replace(match: re.Match[str]) -> str:
nonlocal missing
env_value = os.environ.get(match.group(1))
if env_value is None:
missing = True
return ""
return env_value
return os.environ.get(match.group(1), "")
resolved = _ENV_REF_RE.sub(replace, value).strip()
if missing and not resolved:
return None
return resolved or None
@@ -1729,7 +1721,6 @@ def login_oauth_provider(
*,
oauth_flows: WebUIOAuthFlowRegistry,
config_path: Path | None,
settings_payload: SettingsPayloadBuilder,
) -> dict[str, Any]:
provider_name = (query_first(query, "provider") or "").strip()
if not provider_name:
+4 -6
View File
@@ -389,13 +389,13 @@ def _coerce_page_limit(limit: int | None) -> int:
def _transcript_turn_at_ordinal(
session_key: str, ordinal: int, *, history: HistoryReader,
ordinal: int, *, history: HistoryReader,
) -> list[dict[str, Any]] | None:
return turn_records(history, ordinal) or None
def _select_transcript_page(
session_key: str, *, history: HistoryReader, limit: int | None,
*, history: HistoryReader, limit: int | None,
before: str | None, after: str | None = None, stats: TranscriptReplayStats | None = None,
) -> tuple[list[dict[str, Any]], dict[str, Any]]:
stats = stats or TranscriptReplayStats()
@@ -1302,7 +1302,7 @@ def build_webui_trace_detail_response(
return None
ordinal = int(match.group("turn"))
message_id = match.group("message")
turn = _transcript_turn_at_ordinal(session_key, ordinal, history=history)
turn = _transcript_turn_at_ordinal(ordinal, history=history)
if turn is None:
return None
turn, _ = _compact_completed_stream_deltas(turn, include_projection_receipts=True)
@@ -1762,7 +1762,6 @@ def build_webui_thread_response(
"""Return canonical transcript events for the WebUI projector."""
replay_stats = stats or TranscriptReplayStats()
lines, page = _select_transcript_page(
session_key,
history=history,
limit=limit,
before=before,
@@ -1919,7 +1918,6 @@ def _history_prompt_summaries(history: HistoryReader) -> _ChunkPromptView:
def _build_prompt_view(
session_key: str,
*,
history: HistoryReader,
session_turns_loader: Callable[[], list[_SessionBackfillTurn]] | None = None,
@@ -2009,7 +2007,7 @@ def _prompt_view_snapshot(
if cached is not None and (not cached.needs_canonical or session_version_loader is not None):
_PROMPT_SNAPSHOTS.move_to_end(cache_key)
return cached, revision
view = _build_prompt_view(session_key, history=history, session_turns_loader=session_turns_loader)
view = _build_prompt_view(history=history, session_turns_loader=session_turns_loader)
# A caller supplying only messages cannot validate canonical changes, so a
# recovered view needs a version loader before it can be reused.
if (view.needs_canonical and session_version_loader is None) or revision != read_revision():