diff --git a/apps/mobile/src/i18n/translations/de.json b/apps/mobile/src/i18n/translations/de.json index c9d43d96b3eb8..6d2621005b290 100644 --- a/apps/mobile/src/i18n/translations/de.json +++ b/apps/mobile/src/i18n/translations/de.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, one {Versucht, den Aufgabenstatus {count}-mal zu prüfen} other {Versucht, den Aufgabenstatus {count}-mal zu prüfen}}", "9e410f60344c6772": "{count, plural, one {Hintergrund-Wartevorgänge {count}-mal aktualisiert} other {Hintergrund-Wartevorgänge {count}-mal aktualisiert}}", "5ca35b5a769eadcd": "{count, plural, one {Versucht, Hintergrund-Wartevorgänge {count}-mal zu aktualisieren} other {Versucht, Hintergrund-Wartevorgänge {count}-mal zu aktualisieren}}", + "c65ba57f9f9e3ad3": "{count, plural, one {MCP-Server-Anmeldung {count}-mal verwaltet} other {MCP-Server-Anmeldung {count}-mal verwaltet}}", + "9966bfa08a1d5cb2": "{count, plural, one {MCP-Server-Anmeldung {count}-mal zu verwalten versucht} other {MCP-Server-Anmeldung {count}-mal zu verwalten versucht}}", "7f78d45ac7d49ffa": "{count, plural, one {Geplante Aufgaben {count}-mal aufgelistet} other {Geplante Aufgaben {count}-mal aufgelistet}}", "5cf841526acd9494": "{count, plural, one {Versucht, geplante Aufgaben {count}-mal aufzulisten} other {Versucht, geplante Aufgaben {count}-mal aufzulisten}}", "a0239a5f1e8f49dc": "{count, plural, one {Thread-Konfiguration {count}-mal geprüft} other {Thread-Konfiguration {count}-mal geprüft}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {Integration {names} verwendet} other {Integrationen {names} verwendet}}", "7ed2bff150997c76": "{names} verwendet", "7136ebec3019a2ed": "{count, plural, one {{count} weitere Aktion ausgeführt} other {{count} weitere Aktionen ausgeführt}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {MCP-Server-Anmeldung wird verwaltet} completed {MCP-Server-Anmeldung verwaltet} failed {MCP-Server-Anmeldung konnte nicht verwaltet werden} declined {Verwaltung der MCP-Server-Anmeldung abgelehnt} stopped {Verwaltung der MCP-Server-Anmeldung gestoppt} other {MCP-Server-Anmeldung wird verwaltet}}", "551df12aeaf5ba83": "{status, select, inProgress {Pull Request wird verknüpft} completed {Pull Request verknüpft} failed {Pull Request konnte nicht verknüpft werden} declined {Verknüpfen eines Pull Requests abgelehnt} stopped {Verknüpfen eines Pull Requests abgebrochen} other {Pull Request wird verknüpft}}", "cbb12c435f68cb2f": "{status, select, inProgress {{changeRequest} #{number} wird verknüpft} completed {{changeRequest} #{number} verknüpft} failed {{changeRequest} #{number} konnte nicht verknüpft werden} declined {Verknüpfen von {changeRequest} #{number} abgelehnt} stopped {Verknüpfen von {changeRequest} #{number} abgebrochen} other {{changeRequest} #{number} wird verknüpft}}", "2f2917c28f02a36e": "{status, select, inProgress {Pull Requests werden verknüpft} completed {Pull Requests verknüpft} failed {Pull Requests konnten nicht verknüpft werden} declined {Verknüpfen von Pull Requests abgelehnt} stopped {Verknüpfen von Pull Requests abgebrochen} other {Pull Requests werden verknüpft}}", diff --git a/apps/mobile/src/i18n/translations/en.json b/apps/mobile/src/i18n/translations/en.json index 7a89a1cf37c22..1ae633f1d748b 100644 --- a/apps/mobile/src/i18n/translations/en.json +++ b/apps/mobile/src/i18n/translations/en.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, one {Tried to check task status {count} time} other {Tried to check task status {count} times}}", "9e410f60344c6772": "{count, plural, one {Updated background waits {count} time} other {Updated background waits {count} times}}", "5ca35b5a769eadcd": "{count, plural, one {Tried to update background waits {count} time} other {Tried to update background waits {count} times}}", + "c65ba57f9f9e3ad3": "{count, plural, one {Managed MCP server sign-in {count} time} other {Managed MCP server sign-in {count} times}}", + "9966bfa08a1d5cb2": "{count, plural, one {Tried to manage MCP server sign-in {count} time} other {Tried to manage MCP server sign-in {count} times}}", "7f78d45ac7d49ffa": "{count, plural, one {Listed scheduled tasks {count} time} other {Listed scheduled tasks {count} times}}", "5cf841526acd9494": "{count, plural, one {Tried to list scheduled tasks {count} time} other {Tried to list scheduled tasks {count} times}}", "a0239a5f1e8f49dc": "{count, plural, one {Checked thread configuration {count} time} other {Checked thread configuration {count} times}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {Used {names} integration} other {Used {names} integrations}}", "7ed2bff150997c76": "Used {names}", "7136ebec3019a2ed": "{count, plural, one {Performed {count} other action} other {Performed {count} other actions}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {Managing MCP server sign-in} completed {Managed MCP server sign-in} failed {Failed to manage MCP server sign-in} declined {Declined to manage MCP server sign-in} stopped {Stopped managing MCP server sign-in} other {Managing MCP server sign-in}}", "551df12aeaf5ba83": "{status, select, inProgress {Linking a pull request} completed {Linked a pull request} failed {Failed to link a pull request} declined {Declined to link a pull request} stopped {Stopped linking a pull request} other {Linking a pull request}}", "cbb12c435f68cb2f": "{status, select, inProgress {Linking {changeRequest} #{number}} completed {Linked {changeRequest} #{number}} failed {Failed to link {changeRequest} #{number}} declined {Declined to link {changeRequest} #{number}} stopped {Stopped linking {changeRequest} #{number}} other {Linking {changeRequest} #{number}}}", "2f2917c28f02a36e": "{status, select, inProgress {Linking pull requests} completed {Linked pull requests} failed {Failed to link pull requests} declined {Declined to link pull requests} stopped {Stopped linking pull requests} other {Linking pull requests}}", diff --git a/apps/mobile/src/i18n/translations/es.json b/apps/mobile/src/i18n/translations/es.json index 288dbfc7da2cf..46a6cd0d6536a 100644 --- a/apps/mobile/src/i18n/translations/es.json +++ b/apps/mobile/src/i18n/translations/es.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, one {Intentó consultar el estado de tareas {count} vez} other {Intentó consultar el estado de tareas {count} veces}}", "9e410f60344c6772": "{count, plural, one {Actualizó esperas en segundo plano {count} vez} other {Actualizó esperas en segundo plano {count} veces}}", "5ca35b5a769eadcd": "{count, plural, one {Intentó actualizar esperas en segundo plano {count} vez} other {Intentó actualizar esperas en segundo plano {count} veces}}", + "c65ba57f9f9e3ad3": "{count, plural, one {Inicio de sesión del servidor MCP gestionado {count} vez} other {Inicio de sesión del servidor MCP gestionado {count} veces}}", + "9966bfa08a1d5cb2": "{count, plural, one {Se intentó gestionar el inicio de sesión del servidor MCP {count} vez} other {Se intentó gestionar el inicio de sesión del servidor MCP {count} veces}}", "7f78d45ac7d49ffa": "{count, plural, one {Listó tareas programadas {count} vez} other {Listó tareas programadas {count} veces}}", "5cf841526acd9494": "{count, plural, one {Intentó listar tareas programadas {count} vez} other {Intentó listar tareas programadas {count} veces}}", "a0239a5f1e8f49dc": "{count, plural, one {Consultó la configuración del hilo {count} vez} other {Consultó la configuración del hilo {count} veces}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {Se usó la integración {names}} other {Se usaron las integraciones {names}}}", "7ed2bff150997c76": "Se usó {names}", "7136ebec3019a2ed": "{count, plural, one {Se realizó {count} acción más} other {Se realizaron {count} acciones más}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {Gestionando el inicio de sesión del servidor MCP} completed {Inicio de sesión del servidor MCP gestionado} failed {Error al gestionar el inicio de sesión del servidor MCP} declined {Gestión del inicio de sesión del servidor MCP rechazada} stopped {Gestión del inicio de sesión del servidor MCP detenida} other {Gestionando el inicio de sesión del servidor MCP}}", "551df12aeaf5ba83": "{status, select, inProgress {Vinculando una pull request} completed {Vinculó una pull request} failed {No se pudo vincular una pull request} declined {Se rechazó vincular una pull request} stopped {Se dejó de vincular una pull request} other {Vinculando una pull request}}", "cbb12c435f68cb2f": "{status, select, inProgress {Vinculando {changeRequest} #{number}} completed {Vinculó {changeRequest} #{number}} failed {No se pudo vincular {changeRequest} #{number}} declined {Se rechazó vincular {changeRequest} #{number}} stopped {Se dejó de vincular {changeRequest} #{number}} other {Vinculando {changeRequest} #{number}}}", "2f2917c28f02a36e": "{status, select, inProgress {Vinculando pull requests} completed {Vinculó pull requests} failed {No se pudo vincular pull requests} declined {Se rechazó vincular pull requests} stopped {Se dejó de vincular pull requests} other {Vinculando pull requests}}", diff --git a/apps/mobile/src/i18n/translations/fr.json b/apps/mobile/src/i18n/translations/fr.json index 28ec2284fca74..07cb1a5611e9e 100644 --- a/apps/mobile/src/i18n/translations/fr.json +++ b/apps/mobile/src/i18n/translations/fr.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, one {Tentative de vérifier le statut des tâches {count} fois} other {Tentative de vérifier le statut des tâches {count} fois}}", "9e410f60344c6772": "{count, plural, one {Attentes en arrière-plan mises à jour {count} fois} other {Attentes en arrière-plan mises à jour {count} fois}}", "5ca35b5a769eadcd": "{count, plural, one {Tentative de mettre à jour les attentes en arrière-plan {count} fois} other {Tentative de mettre à jour les attentes en arrière-plan {count} fois}}", + "c65ba57f9f9e3ad3": "{count, plural, one {Connexion au serveur MCP gérée {count} fois} other {Connexion au serveur MCP gérée {count} fois}}", + "9966bfa08a1d5cb2": "{count, plural, one {Tentative de gestion de la connexion au serveur MCP {count} fois} other {Tentative de gestion de la connexion au serveur MCP {count} fois}}", "7f78d45ac7d49ffa": "{count, plural, one {Tâches planifiées listées {count} fois} other {Tâches planifiées listées {count} fois}}", "5cf841526acd9494": "{count, plural, one {Tentative de lister les tâches planifiées {count} fois} other {Tentative de lister les tâches planifiées {count} fois}}", "a0239a5f1e8f49dc": "{count, plural, one {Configuration du fil vérifiée {count} fois} other {Configuration du fil vérifiée {count} fois}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {Intégration {names} utilisée} other {Intégrations {names} utilisées}}", "7ed2bff150997c76": "{names} utilisé", "7136ebec3019a2ed": "{count, plural, one {{count} autre action effectuée} other {{count} autres actions effectuées}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {Gestion de la connexion au serveur MCP} completed {Connexion au serveur MCP gérée} failed {Échec de la gestion de la connexion au serveur MCP} declined {Gestion de la connexion au serveur MCP refusée} stopped {Gestion de la connexion au serveur MCP arrêtée} other {Gestion de la connexion au serveur MCP}}", "551df12aeaf5ba83": "{status, select, inProgress {Association d’une pull request} completed {Pull request associée} failed {Impossible d’associer une pull request} declined {Refus d’associer une pull request} stopped {Arrêt de l’association d’une pull request} other {Association d’une pull request}}", "cbb12c435f68cb2f": "{status, select, inProgress {Association de la {changeRequest} #{number}} completed {{changeRequest} #{number} associée} failed {Impossible d’associer la {changeRequest} #{number}} declined {Refus d’associer la {changeRequest} #{number}} stopped {Arrêt de l’association de la {changeRequest} #{number}} other {Association de la {changeRequest} #{number}}}", "2f2917c28f02a36e": "{status, select, inProgress {Association de pull requests} completed {Pull requests associées} failed {Impossible d’associer des pull requests} declined {Refus d’associer des pull requests} stopped {Arrêt de l’association de pull requests} other {Association de pull requests}}", diff --git a/apps/mobile/src/i18n/translations/ja.json b/apps/mobile/src/i18n/translations/ja.json index f6741fdb8b775..f035ca8c7bbcb 100644 --- a/apps/mobile/src/i18n/translations/ja.json +++ b/apps/mobile/src/i18n/translations/ja.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, other {タスクの状態を {count} 回確認しようとしました}}", "9e410f60344c6772": "{count, plural, other {バックグラウンドの待機を {count} 回更新しました}}", "5ca35b5a769eadcd": "{count, plural, other {バックグラウンドの待機を {count} 回更新しようとしました}}", + "c65ba57f9f9e3ad3": "MCPサーバーのサインインを{count}回管理しました", + "9966bfa08a1d5cb2": "MCPサーバーのサインイン管理を{count}回試みました", "7f78d45ac7d49ffa": "{count, plural, other {スケジュールタスクを {count} 回一覧表示しました}}", "5cf841526acd9494": "{count, plural, other {スケジュールタスクを {count} 回一覧表示しようとしました}}", "a0239a5f1e8f49dc": "{count, plural, other {スレッドの構成を {count} 回確認しました}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {{names} 連携を使用しました} other {{names} 連携を使用しました}}", "7ed2bff150997c76": "{names} を使用しました", "7136ebec3019a2ed": "{count, plural, other {その他 {count} 件の操作を実行しました}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {MCPサーバーのサインインを管理中} completed {MCPサーバーのサインインを管理しました} failed {MCPサーバーのサインイン管理に失敗しました} declined {MCPサーバーのサインイン管理を拒否しました} stopped {MCPサーバーのサインイン管理を停止しました} other {MCPサーバーのサインインを管理中}}", "551df12aeaf5ba83": "{status, select, inProgress {プルリクエストをリンクしています} completed {プルリクエストをリンクしました} failed {プルリクエストをリンクできませんでした} declined {プルリクエストのリンクは拒否されました} stopped {プルリクエストのリンクを中止しました} other {プルリクエストをリンクしています}}", "cbb12c435f68cb2f": "{status, select, inProgress {{changeRequest} #{number} をリンクしています} completed {{changeRequest} #{number} をリンクしました} failed {{changeRequest} #{number} をリンクできませんでした} declined {{changeRequest} #{number} のリンクは拒否されました} stopped {{changeRequest} #{number} のリンクを中止しました} other {{changeRequest} #{number} をリンクしています}}", "2f2917c28f02a36e": "{status, select, inProgress {プルリクエストをリンクしています} completed {プルリクエストをリンクしました} failed {プルリクエストをリンクできませんでした} declined {プルリクエストのリンクは拒否されました} stopped {プルリクエストのリンクを中止しました} other {プルリクエストをリンクしています}}", diff --git a/apps/mobile/src/i18n/translations/ko.json b/apps/mobile/src/i18n/translations/ko.json index b1ef20ba0f347..ed492e45f8d6e 100644 --- a/apps/mobile/src/i18n/translations/ko.json +++ b/apps/mobile/src/i18n/translations/ko.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, other {작업 상태 확인 {count}회 시도함}}", "9e410f60344c6772": "{count, plural, other {백그라운드 대기 {count}회 업데이트함}}", "5ca35b5a769eadcd": "{count, plural, other {백그라운드 대기 업데이트 {count}회 시도함}}", + "c65ba57f9f9e3ad3": "MCP 서버 로그인 {count}회 관리함", + "9966bfa08a1d5cb2": "MCP 서버 로그인 관리 {count}회 시도함", "7f78d45ac7d49ffa": "{count, plural, other {예약된 작업 목록 {count}회 조회함}}", "5cf841526acd9494": "{count, plural, other {예약된 작업 목록 조회 {count}회 시도함}}", "a0239a5f1e8f49dc": "{count, plural, other {스레드 구성 {count}회 확인함}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {{names} 통합 사용함} other {{names} 통합 사용함}}", "7ed2bff150997c76": "{names} 사용함", "7136ebec3019a2ed": "{count, plural, other {기타 작업 {count}개 수행함}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {MCP 서버 로그인 관리 중} completed {MCP 서버 로그인 관리됨} failed {MCP 서버 로그인 관리 실패} declined {MCP 서버 로그인 관리 거부됨} stopped {MCP 서버 로그인 관리 중지됨} other {MCP 서버 로그인 관리 중}}", "551df12aeaf5ba83": "{status, select, inProgress {풀 리퀘스트 연결 중} completed {풀 리퀘스트 연결 완료} failed {풀 리퀘스트 연결 실패} declined {풀 리퀘스트 연결 거부됨} stopped {풀 리퀘스트 연결 중지됨} other {풀 리퀘스트 연결 중}}", "cbb12c435f68cb2f": "{status, select, inProgress {{changeRequest} #{number} 연결 중} completed {{changeRequest} #{number} 연결 완료} failed {{changeRequest} #{number} 연결 실패} declined {{changeRequest} #{number} 연결 거부됨} stopped {{changeRequest} #{number} 연결 중지됨} other {{changeRequest} #{number} 연결 중}}", "2f2917c28f02a36e": "{status, select, inProgress {풀 리퀘스트 연결 중} completed {풀 리퀘스트 연결 완료} failed {풀 리퀘스트 연결 실패} declined {풀 리퀘스트 연결 거부됨} stopped {풀 리퀘스트 연결 중지됨} other {풀 리퀘스트 연결 중}}", diff --git a/apps/mobile/src/i18n/translations/pt-BR.json b/apps/mobile/src/i18n/translations/pt-BR.json index b40494fca3885..af4015be92ea1 100644 --- a/apps/mobile/src/i18n/translations/pt-BR.json +++ b/apps/mobile/src/i18n/translations/pt-BR.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, one {Tentou verificar o status de tarefas {count} vez} other {Tentou verificar o status de tarefas {count} vezes}}", "9e410f60344c6772": "{count, plural, one {Atualizou esperas em segundo plano {count} vez} other {Atualizou esperas em segundo plano {count} vezes}}", "5ca35b5a769eadcd": "{count, plural, one {Tentou atualizar esperas em segundo plano {count} vez} other {Tentou atualizar esperas em segundo plano {count} vezes}}", + "c65ba57f9f9e3ad3": "{count, plural, one {Login do servidor MCP gerenciado {count} vez} other {Login do servidor MCP gerenciado {count} vezes}}", + "9966bfa08a1d5cb2": "{count, plural, one {Tentativa de gerenciar o login do servidor MCP {count} vez} other {Tentativa de gerenciar o login do servidor MCP {count} vezes}}", "7f78d45ac7d49ffa": "{count, plural, one {Listou as tarefas agendadas {count} vez} other {Listou as tarefas agendadas {count} vezes}}", "5cf841526acd9494": "{count, plural, one {Tentou listar as tarefas agendadas {count} vez} other {Tentou listar as tarefas agendadas {count} vezes}}", "a0239a5f1e8f49dc": "{count, plural, one {Verificou a configuração da thread {count} vez} other {Verificou a configuração da thread {count} vezes}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {Usou a integração {names}} other {Usou as integrações {names}}}", "7ed2bff150997c76": "Usou {names}", "7136ebec3019a2ed": "{count, plural, one {Realizou {count} outra ação} other {Realizou {count} outras ações}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {Gerenciando login do servidor MCP} completed {Login do servidor MCP gerenciado} failed {Falha ao gerenciar login do servidor MCP} declined {Gerenciamento do login do servidor MCP recusado} stopped {Gerenciamento do login do servidor MCP interrompido} other {Gerenciando login do servidor MCP}}", "551df12aeaf5ba83": "{status, select, inProgress {Vinculando um pull request} completed {Vinculou um pull request} failed {Falha ao vincular um pull request} declined {Recusou-se a vincular um pull request} stopped {Parou de vincular um pull request} other {Vinculando um pull request}}", "cbb12c435f68cb2f": "{status, select, inProgress {Vinculando {changeRequest} #{number}} completed {Vinculou {changeRequest} #{number}} failed {Falha ao vincular {changeRequest} #{number}} declined {Recusou-se a vincular {changeRequest} #{number}} stopped {Parou de vincular {changeRequest} #{number}} other {Vinculando {changeRequest} #{number}}}", "2f2917c28f02a36e": "{status, select, inProgress {Vinculando pull requests} completed {Vinculou pull requests} failed {Falha ao vincular pull requests} declined {Recusou-se a vincular pull requests} stopped {Parou de vincular pull requests} other {Vinculando pull requests}}", diff --git a/apps/mobile/src/i18n/translations/ru.json b/apps/mobile/src/i18n/translations/ru.json index cadf07e57eda9..e32ea5c9b25ad 100644 --- a/apps/mobile/src/i18n/translations/ru.json +++ b/apps/mobile/src/i18n/translations/ru.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, one {Попытка проверить статус задачи: {count} раз} few {Попытка проверить статус задачи: {count} раза} many {Попытка проверить статус задачи: {count} раз} other {Попытка проверить статус задачи: {count} раза}}", "9e410f60344c6772": "{count, plural, one {Фоновые ожидания обновлены {count} раз} few {Фоновые ожидания обновлены {count} раза} many {Фоновые ожидания обновлены {count} раз} other {Фоновые ожидания обновлены {count} раза}}", "5ca35b5a769eadcd": "{count, plural, one {Попытка обновить фоновые ожидания: {count} раз} few {Попытка обновить фоновые ожидания: {count} раза} many {Попытка обновить фоновые ожидания: {count} раз} other {Попытка обновить фоновые ожидания: {count} раза}}", + "c65ba57f9f9e3ad3": "Управление входом на сервер MCP: {count}", + "9966bfa08a1d5cb2": "Попытка управления входом на сервер MCP: {count}", "7f78d45ac7d49ffa": "{count, plural, one {Список запланированных задач получен {count} раз} few {Список запланированных задач получен {count} раза} many {Список запланированных задач получен {count} раз} other {Список запланированных задач получен {count} раза}}", "5cf841526acd9494": "{count, plural, one {Попытка получить список запланированных задач: {count} раз} few {Попытка получить список запланированных задач: {count} раза} many {Попытка получить список запланированных задач: {count} раз} other {Попытка получить список запланированных задач: {count} раза}}", "a0239a5f1e8f49dc": "{count, plural, one {Конфигурация треда проверена {count} раз} few {Конфигурация треда проверена {count} раза} many {Конфигурация треда проверена {count} раз} other {Конфигурация треда проверена {count} раза}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {Использована интеграция {names}} other {Использованы интеграции {names}}}", "7ed2bff150997c76": "Использовано: {names}", "7136ebec3019a2ed": "{count, plural, one {Выполнено ещё {count} действие} few {Выполнено ещё {count} действия} many {Выполнено ещё {count} действий} other {Выполнено ещё {count} действия}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {Управление входом на сервер MCP} completed {Вход на сервер MCP обработан} failed {Не удалось обработать вход на сервер MCP} declined {Управление входом на сервер MCP отклонено} stopped {Управление входом на сервер MCP остановлено} other {Управление входом на сервер MCP}}", "551df12aeaf5ba83": "{status, select, inProgress {Привязка пул-реквеста} completed {Пул-реквест привязан} failed {Не удалось привязать пул-реквест} declined {Отклонено: привязка пул-реквеста} stopped {Остановлено: привязка пул-реквеста} other {Привязка пул-реквеста}}", "cbb12c435f68cb2f": "{status, select, inProgress {Привязка {changeRequest} #{number}} completed {{changeRequest} #{number} привязан} failed {Не удалось привязать {changeRequest} #{number}} declined {Отклонено: привязка {changeRequest} #{number}} stopped {Остановлено: привязка {changeRequest} #{number}} other {Привязка {changeRequest} #{number}}}", "2f2917c28f02a36e": "{status, select, inProgress {Привязка пул-реквестов} completed {Пул-реквесты привязаны} failed {Не удалось привязать пул-реквесты} declined {Отклонено: привязка пул-реквестов} stopped {Остановлено: привязка пул-реквестов} other {Привязка пул-реквестов}}", diff --git a/apps/mobile/src/i18n/translations/sv.json b/apps/mobile/src/i18n/translations/sv.json index 3a0273aef36fd..ead14e2848b6a 100644 --- a/apps/mobile/src/i18n/translations/sv.json +++ b/apps/mobile/src/i18n/translations/sv.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, one {Försökte kontrollera uppgiftsstatus {count} gång} other {Försökte kontrollera uppgiftsstatus {count} gånger}}", "9e410f60344c6772": "{count, plural, one {Uppdaterade bakgrundsväntan {count} gång} other {Uppdaterade bakgrundsväntan {count} gånger}}", "5ca35b5a769eadcd": "{count, plural, one {Försökte uppdatera bakgrundsväntan {count} gång} other {Försökte uppdatera bakgrundsväntan {count} gånger}}", + "c65ba57f9f9e3ad3": "{count, plural, one {Hanterade MCP-serverinloggning {count} gång} other {Hanterade MCP-serverinloggning {count} gånger}}", + "9966bfa08a1d5cb2": "{count, plural, one {Försökte hantera MCP-serverinloggning {count} gång} other {Försökte hantera MCP-serverinloggning {count} gånger}}", "7f78d45ac7d49ffa": "{count, plural, one {Listade schemalagda uppgifter {count} gång} other {Listade schemalagda uppgifter {count} gånger}}", "5cf841526acd9494": "{count, plural, one {Försökte lista schemalagda uppgifter {count} gång} other {Försökte lista schemalagda uppgifter {count} gånger}}", "a0239a5f1e8f49dc": "{count, plural, one {Kontrollerade trådkonfiguration {count} gång} other {Kontrollerade trådkonfiguration {count} gånger}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {Använde integrationen {names}} other {Använde integrationerna {names}}}", "7ed2bff150997c76": "Använde {names}", "7136ebec3019a2ed": "{count, plural, one {Utförde {count} annan åtgärd} other {Utförde {count} andra åtgärder}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {Hanterar MCP-serverinloggning} completed {Hanterade MCP-serverinloggning} failed {Kunde inte hantera MCP-serverinloggning} declined {Avböjde hantering av MCP-serverinloggning} stopped {Stoppade hantering av MCP-serverinloggning} other {Hanterar MCP-serverinloggning}}", "551df12aeaf5ba83": "{status, select, inProgress {Länkar en pull request} completed {Länkade en pull request} failed {Kunde inte länka en pull request} declined {Avböjde att länka en pull request} stopped {Slutade länka en pull request} other {Länkar en pull request}}", "cbb12c435f68cb2f": "{status, select, inProgress {Länkar {changeRequest} #{number}} completed {Länkade {changeRequest} #{number}} failed {Kunde inte länka {changeRequest} #{number}} declined {Avböjde att länka {changeRequest} #{number}} stopped {Slutade länka {changeRequest} #{number}} other {Länkar {changeRequest} #{number}}}", "2f2917c28f02a36e": "{status, select, inProgress {Länkar pull requests} completed {Länkade pull requests} failed {Kunde inte länka pull requests} declined {Avböjde att länka pull requests} stopped {Slutade länka pull requests} other {Länkar pull requests}}", diff --git a/apps/mobile/src/i18n/translations/zh.json b/apps/mobile/src/i18n/translations/zh.json index f1c394c60c606..886c4d914e077 100644 --- a/apps/mobile/src/i18n/translations/zh.json +++ b/apps/mobile/src/i18n/translations/zh.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, other {尝试检查任务状态 {count} 次}}", "9e410f60344c6772": "{count, plural, other {已更新后台等待 {count} 次}}", "5ca35b5a769eadcd": "{count, plural, other {尝试更新后台等待 {count} 次}}", + "c65ba57f9f9e3ad3": "管理了 {count} 次 MCP 服务器登录", + "9966bfa08a1d5cb2": "尝试管理 MCP 服务器登录 {count} 次", "7f78d45ac7d49ffa": "{count, plural, other {已列出定时任务 {count} 次}}", "5cf841526acd9494": "{count, plural, other {尝试列出定时任务 {count} 次}}", "a0239a5f1e8f49dc": "{count, plural, other {已检查会话配置 {count} 次}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {已使用 {names} 集成} other {已使用 {names} 集成}}", "7ed2bff150997c76": "已使用 {names}", "7136ebec3019a2ed": "{count, plural, other {已执行 {count} 项其他操作}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {正在管理 MCP 服务器登录} completed {已管理 MCP 服务器登录} failed {管理 MCP 服务器登录失败} declined {已拒绝管理 MCP 服务器登录} stopped {已停止管理 MCP 服务器登录} other {正在管理 MCP 服务器登录}}", "551df12aeaf5ba83": "{status, select, inProgress {正在关联 PR} completed {已关联 PR} failed {关联 PR 失败} declined {已拒绝关联 PR} stopped {已停止关联 PR} other {正在关联 PR}}", "cbb12c435f68cb2f": "{status, select, inProgress {正在关联 {changeRequest} #{number}} completed {已关联 {changeRequest} #{number}} failed {关联 {changeRequest} #{number} 失败} declined {已拒绝关联 {changeRequest} #{number}} stopped {已停止关联 {changeRequest} #{number}} other {正在关联 {changeRequest} #{number}}}", "2f2917c28f02a36e": "{status, select, inProgress {正在关联 PR} completed {已关联 PR} failed {关联 PR 失败} declined {已拒绝关联 PR} stopped {已停止关联 PR} other {正在关联 PR}}", diff --git a/apps/server/src/mcp/toolkits/core.test.ts b/apps/server/src/mcp/toolkits/core.test.ts index af2501b295c56..865a4d90c45a0 100644 --- a/apps/server/src/mcp/toolkits/core.test.ts +++ b/apps/server/src/mcp/toolkits/core.test.ts @@ -1262,6 +1262,71 @@ it.effect.each(["t3_thread_interrupt", "t3_workflow_stop"])( ), ); +it.effect("t3_mcp_server checks its input and returns the service result", () => { + const signInLink = "https://linear.example/authorize"; + const requests: Array = []; + return Effect.gen(function* () { + const server = yield* McpServer.McpServer; + const call = (args: Record) => + server + .callTool({ name: "t3_mcp_server", arguments: args }) + .pipe( + Effect.provideService(McpInvocationContext.McpInvocationContext, scope), + Effect.provideService(McpSchema.McpServerClient, client), + ); + + expect(declaredFailure(yield* call({ action: "authenticate" }))).toMatchObject({ + code: "invalid_request", + }); + expect( + declaredFailure(yield* call({ action: "callback", server: "linear", callbackUrl: "oops" })), + ).toMatchObject({ code: "invalid_request" }); + expect(requests).toEqual([]); + + expect((yield* call({ action: "list" })).structuredContent).toEqual({ + servers: [{ name: "linear", status: "needs-auth" }], + }); + expect((yield* call({ action: "authenticate", server: "linear" })).structuredContent).toEqual({ + authorizationUrl: signInLink, + callbackExpected: true, + }); + expect(requests).toEqual([ + { threadId, action: "list" }, + { threadId, action: "authenticate", server: "linear" }, + ]); + }).pipe( + Effect.provide( + layerOrchestratorToolkit.pipe( + Layer.provideMerge(McpHttpServer.layerInProcessMcpServer), + Layer.provide(NodeCrypto.layer), + Layer.provide( + Layer.mock(ThreadManagement.ThreadManagementService)({ + getThreadShell: (id) => + Effect.succeed(McpToolAccessTestkit.liveThreadShell(id, { runtimeMode: "auto" })), + manageMcpServer: (input) => + Effect.sync(() => { + requests.push(input); + return input.action === "list" + ? { servers: [{ name: "linear", status: "needs-auth" as const }] } + : { authorizationUrl: signInLink, callbackExpected: true }; + }), + }), + ), + Layer.provide(ServerSettings.layerTest()), + Layer.provide(Layer.mock(ProviderRegistry.ProviderRegistry)({})), + Layer.provide(Layer.mock(ProviderAdapterRegistry.ProviderAdapterRegistryV2)({})), + Layer.provide(Layer.mock(ScheduledTaskService.ScheduledTaskService)({})), + Layer.provide(Layer.mock(ProjectService.ProjectService)({})), + Layer.provide(Layer.mock(SecretRequests.SecretRequests)({})), + Layer.provide(Layer.mock(RemoteDelegation.RemoteDelegation)({})), + Layer.provide(Layer.mock(PeerForwarding.PeerForwarding)({})), + Layer.provide(Layer.mock(PeerLinkRequests.PeerLinkRequests)({})), + Layer.provide(Layer.mock(PeerLinks.PeerLinks)({})), + ), + ), + ); +}); + it.effect("discovers workflow stop targets and requires orchestration capability", () => { const threadId = ThreadId.make("workflow-parent"); const shell = McpToolAccessTestkit.liveThreadShell(threadId); diff --git a/apps/server/src/mcp/toolkits/orchestrator/handlers.ts b/apps/server/src/mcp/toolkits/orchestrator/handlers.ts index dfa1ad58545ee..2b8ae312ede58 100644 --- a/apps/server/src/mcp/toolkits/orchestrator/handlers.ts +++ b/apps/server/src/mcp/toolkits/orchestrator/handlers.ts @@ -2,6 +2,7 @@ import { OrchestratorMcpFailure } from "@t3tools/contracts"; import { OrchestratorToolkit } from "./tools.ts"; import * as Effect from "effect/Effect"; +import type * as ThreadManagementService from "../../../orchestration-v2/ThreadManagementService.ts"; import * as PeerForwarding from "../../../peer/PeerForwarding.ts"; import * as PeerLinkRequests from "../../../peer/PeerLinkRequests.ts"; import * as PeerLinks from "../../../peer/PeerLinks.ts"; @@ -85,6 +86,40 @@ const handlers = { ); }), ), + t3_mcp_server: McpToolAccess.actsAsCaller(({ action, server, callbackUrl }) => + Effect.gen(function* () { + const { scope, threads } = yield* readCaller(); + const caller = yield* McpInvocationContext.requireThreadScope(scope, "t3_mcp_server"); + const invalid = (message: string) => + new OrchestratorMcpFailure({ code: "invalid_request", message }); + if (action !== "list" && server === undefined) { + return yield* invalid(`\`${action}\` needs \`server\`.`); + } + if (action === "callback" && !URL.canParse(callbackUrl ?? "")) { + return yield* invalid( + "`callback` needs `callbackUrl`, the full address the browser ended on.", + ); + } + const request: ThreadManagementService.ThreadManagementMcpServerRequest = + action === "list" + ? { action } + : action === "callback" + ? { action, server: server!, callbackUrl: callbackUrl! } + : { action, server: server! }; + return yield* threads.manageMcpServer({ threadId: caller.thread.threadId, ...request }).pipe( + Effect.mapError( + (cause) => + new OrchestratorMcpFailure({ + code: + cause.reason === "unsupported" || cause.reason === "callback-unsupported" + ? "invalid_request" + : "orchestration_error", + message: cause.message, + }), + ), + ); + }), + ), schedule_task: McpToolAccess.either( (input) => input.scheduledTaskId === undefined, McpToolAccess.startsThreads( diff --git a/apps/server/src/mcp/toolkits/orchestrator/tools.ts b/apps/server/src/mcp/toolkits/orchestrator/tools.ts index 629a5352587f0..6af19cf1edc22 100644 --- a/apps/server/src/mcp/toolkits/orchestrator/tools.ts +++ b/apps/server/src/mcp/toolkits/orchestrator/tools.ts @@ -167,6 +167,37 @@ const BackgroundWaitTool = Tool.make("t3_background_wait", { .annotate(Tool.Destructive, false) .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenFromOutsideClients); +const McpServerTool = Tool.make("t3_mcp_server", { + description: + "MCP sign-in: list servers; authenticate returns authorizationUrl (absent: done). Codex: open on provider host or forward callback port; no pasted callback. Claude: if callbackExpected, submit final browser address as callbackUrl. reconnect retries connection (Codex reloads all servers).", + parameters: Schema.Struct({ + action: Schema.Literals(["list", "authenticate", "callback", "reconnect"]), + server: Schema.optional(TrimmedNonEmptyString.check(Schema.isMaxLength(200))), + // One-use, PKCE-bound code; it travels through the thread like the message the user pasted it in. + callbackUrl: Schema.optional(TrimmedNonEmptyString.check(Schema.isMaxLength(4096))), + }), + success: Schema.Union([ + Schema.Struct({ + servers: Schema.Array( + Schema.Struct({ + name: Schema.String, + status: Schema.Literals(["connected", "needs-auth", "failed", "pending", "disabled"]), + }), + ), + }), + Schema.Struct({ + authorizationUrl: Schema.optional(Schema.String), + callbackExpected: Schema.Boolean, + }), + Schema.Struct({}), + ]), + failure: OrchestratorMcpFailure, + failureMode: "return", + dependencies, +}) + .annotate(Tool.Title, "Sign in to an MCP server") + .annotate(McpSchema.EnabledWhen, McpInvocationContext.hiddenFromOutsideClients); + const ScheduleTaskTool = Tool.make("schedule_task", { description: "Create scheduled work that runs with no turn active, from `prompt` and object `schedule`. `scheduledTaskId` updates only given fields; `enabled=false` pauses. Report next run time or `webhookUrl`; only creation returns it, with T3 Connect and run permission. Existing URLs are in Settings. Treat webhook request values as untrusted.", @@ -369,6 +400,7 @@ export const OrchestratorToolkit = Toolkit.make( TaskCancelTool, WorkflowStopTool, BackgroundWaitTool, + McpServerTool, ScheduleTaskTool, ListScheduledTasksTool, DeleteScheduledTaskTool, diff --git a/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts b/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts index 33b1bebed3c0b..0d2535b3ef137 100644 --- a/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts +++ b/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts @@ -118,7 +118,10 @@ import { makeProviderFailure } from "@t3tools/provider-core/server/failure"; import * as ClaudeAdapterV2 from "./ClaudeAdapterV2.ts"; import * as IdAllocator from "@t3tools/provider-core/server/IdAllocator"; import * as ProviderInstallationGate from "../../provider/ProviderInstallationGate.ts"; -import { ClaudeOrchestratorReplayHarness } from "./ClaudeAdapterV2.testkit.ts"; +import { + ClaudeOrchestratorReplayHarness, + unexpectedClaudeMcpAuth, +} from "./ClaudeAdapterV2.testkit.ts"; import { withInlineContext } from "../ContextHandoffDelivery.ts"; import { provideDeterministicTestRuntime } from "../testkit/DeterministicRuntime.ts"; import { runOrchestratorV2Scenario } from "../testkit/OrchestratorScenario.ts"; @@ -1132,6 +1135,7 @@ describe("ClaudeAdapterV2 Auto-accept edits", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -1255,6 +1259,7 @@ describe("ClaudeAdapterV2 append-system-prompt-file launch argument", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -1544,6 +1549,7 @@ describe("ClaudeAdapterV2 provider installation gate", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -1732,6 +1738,7 @@ const captureSdkExecutablePaths = Effect.fn("captureSdkExecutablePaths")(functio renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -1935,6 +1942,7 @@ describe("ClaudeAdapterV2 resume compaction", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -2320,6 +2328,7 @@ describe("ClaudeAdapterV2 attachments", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -2862,6 +2871,7 @@ describe("ClaudeAdapterV2 native fork", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -3211,6 +3221,7 @@ describe("ClaudeAdapterV2 native session identity", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -3557,7 +3568,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { ClaudeAdapterV2.ClaudeAgentSdkQuerySession, "mcpServerStatus" | "readMcpResource" | "callMcpTool" > & - Partial>; + Partial>; readonly environment?: NodeJS.ProcessEnv; readonly onSessionInit?: (cwd: string) => Effect.Effect; readonly subagentLaunchToolUseId?: string; @@ -3695,6 +3706,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { }).pipe(Effect.andThen(() => options?.renameSession?.(title) ?? Effect.void)), backgroundTasks: options?.backgroundTasks ?? (() => Effect.succeed(false)), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -3741,6 +3753,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { callMcpTool: options?.mcp?.callMcpTool ?? (() => Effect.die("unexpected MCP tool call")), listPermissionRules: options?.mcp?.listPermissionRules ?? Effect.succeed([]), + mcpAuth: options?.mcp?.mcpAuth ?? unexpectedClaudeMcpAuth, stopTask: options?.stopTask ?? (() => Effect.void), interrupt: options?.interrupt ?? Effect.void, close: options?.close?.(sdkMessages) ?? Effect.void, @@ -4289,6 +4302,10 @@ describe("ClaudeAdapterV2 background wake turns", () => { : harness.providerThread; }; assert.equal(latest().nativeThreadRef?.nativeId, "cleared-native-session"); + assert.deepEqual( + yield* harness.runtime.mcpServerAuth!.list({ providerThread: latest() }), + [], + ); yield* harness.runtime.interruptTurn({ providerThread: latest(), providerTurnId: lastProviderTurn(harness.events).id, @@ -6708,6 +6725,95 @@ describe("ClaudeAdapterV2 background wake turns", () => { ), ); + it.effect("signs in to MCP servers through the live Claude process", () => + Effect.gen(function* () { + const requests: Array = []; + const harness = yield* makeWakeHarnessWithOptions({ + mcp: { + mcpServerStatus: Effect.succeed([ + { ...PROBE_SERVER_STATUS, name: "linear", status: "needs-auth" }, + { name: "docs", status: "connected", error: "token=secret" }, + ]), + readMcpResource: () => Effect.die("unexpected MCP resource read"), + callMcpTool: () => Effect.die("unexpected MCP tool call"), + mcpAuth: { + authenticate: (server) => + server === "broken" + ? Effect.fail( + new ClaudeAdapterV2.ClaudeAgentSdkQueryRunnerError({ + method: "mcpAuthenticate", + cause: new Error("denied at https://linear.example/token?code=SECRET"), + }), + ) + : Effect.sync(() => { + requests.push(["authenticate", server]); + return server === "signed-in" + ? {} + : { authUrl: "https://linear.example/authorize", callbackExpected: true }; + }), + submitCallback: (input) => + Effect.sync(() => { + requests.push(["callback", input]); + }), + reconnect: (server) => + Effect.sync(() => { + requests.push(["reconnect", server]); + }), + }, + }, + }); + yield* harness.runtime.startTurn( + makeClaudeTestTurnInput({ + threadId: harness.threadId, + providerThread: harness.providerThread, + now: yield* DateTime.now, + attemptId: RunAttemptId.make("mcp-sign-in"), + text: "Sign in to Linear", + attachments: [], + }), + ); + const auth = harness.runtime.mcpServerAuth!; + const target = { providerThread: harness.providerThread }; + + assert.deepEqual(yield* auth.list(target), [ + { name: "linear", status: "needs-auth" }, + { name: "docs", status: "connected" }, + ]); + assert.deepEqual(yield* auth.authenticate({ ...target, server: "linear" }), { + authorizationUrl: "https://linear.example/authorize", + callbackExpected: true, + }); + assert.deepEqual(yield* auth.authenticate({ ...target, server: "signed-in" }), { + callbackExpected: false, + }); + const failed = yield* Effect.flip(auth.authenticate({ ...target, server: "broken" })); + assert.include(failed.message, "Claude could not start sign-in"); + assert.notInclude(failed.message, "SECRET"); + yield* auth.submitCallback!({ + ...target, + server: "linear", + callbackUrl: "http://localhost:1/callback?code=c", + }); + yield* auth.reconnect({ ...target, server: "linear" }); + assert.deepEqual(requests, [ + ["authenticate", "linear"], + ["authenticate", "signed-in"], + ["callback", { server: "linear", callbackUrl: "http://localhost:1/callback?code=c" }], + ["reconnect", "linear"], + ]); + }).pipe( + Effect.scoped, + Effect.provide( + Layer.mergeAll( + IdAllocator.layer, + McpProviderSessions.layer, + NodeServices.layer, + NodeCrypto.layer, + ), + ), + ), + ); + it.effect("refuses app requests Claude Code could route to an overlapping server", () => Effect.gen(function* () { // Claude Code 2.1.303 runs `mcp__probe__server__refresh_weather` on `probe`. @@ -14160,6 +14266,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -14362,6 +14469,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -14574,6 +14682,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -17967,6 +18076,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { backgroundTasks: () => Effect.succeed(false), stopTask: () => Effect.void, mcpServerStatus: Effect.die("unexpected MCP server status"), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -21283,6 +21393,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -21461,6 +21572,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -21639,6 +21751,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -21838,6 +21951,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -21985,6 +22099,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -22107,6 +22222,7 @@ describe("ClaudeAdapterV2 background wake turns", () => { renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), diff --git a/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts b/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts index feac31a89af97..f5a56390f6be4 100644 --- a/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts +++ b/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts @@ -47,6 +47,12 @@ import { } from "../testkit/ProviderReplayHarness.ts"; import type { ProviderReplayGate } from "@t3tools/provider-testing/replayGate"; +export const unexpectedClaudeMcpAuth = { + authenticate: () => Effect.die("unexpected MCP authenticate"), + submitCallback: () => Effect.die("unexpected MCP callback"), + reconnect: () => Effect.die("unexpected MCP reconnect"), +} satisfies ClaudeAdapterV2.ClaudeAgentSdkQuerySession["mcpAuth"]; + export const CLAUDE_AGENT_SDK_REPLAY_PROTOCOL = "claude-agent-sdk.query" as const; export const claudeBackgroundWakeResultLabel = (wakeNumber: number) => `result:background-wake:${wakeNumber}`; @@ -852,6 +858,7 @@ function makeReplayQueryRunner( mcpServerStatus: Effect.die("unexpected MCP server status in replay"), readMcpResource: () => Effect.die("unexpected MCP resource read in replay"), callMcpTool: () => Effect.die("unexpected MCP tool call in replay"), + mcpAuth: unexpectedClaudeMcpAuth, listPermissionRules: Effect.die("unexpected permission rules read in replay"), interrupt: replayEffect(() => { assertNextOutboundFrame({ type: "query.interrupt" }); diff --git a/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts b/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts index 21d3a93ba3340..2211c86e154bb 100644 --- a/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts +++ b/apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts @@ -699,6 +699,17 @@ export interface ClaudeAgentSdkQuerySession { ReadonlyArray, ClaudeAgentSdkQueryRunnerError >; + /** The CLI holds the pending sign-in and reconnects the server itself once it finishes. */ + readonly mcpAuth: { + readonly authenticate: ( + server: string, + ) => Effect.Effect; + readonly submitCallback: (input: { + readonly server: string; + readonly callbackUrl: string; + }) => Effect.Effect; + readonly reconnect: (server: string) => Effect.Effect; + }; readonly interrupt: Effect.Effect; readonly close: Effect.Effect; } @@ -888,7 +899,12 @@ function closeClaudeQuery(queryRuntime: ClaudeQuery) { async function sendClaudeControlRequest( queryRuntime: ClaudeQuery, request: { - readonly subtype: "mcp_call" | "list_permission_rules" | "rename_session"; + readonly subtype: + | "mcp_call" + | "list_permission_rules" + | "rename_session" + | "mcp_authenticate" + | "mcp_oauth_callback_url"; readonly [key: string]: unknown; }, ): Promise { @@ -900,6 +916,23 @@ async function sendClaudeControlRequest( return Predicate.isObject(reply) ? reply.response : undefined; } +function claudeMcpServerAuthError(action: string) { + return (error: ClaudeAgentSdkQueryRunnerError) => + new ProviderAdapter.ProviderAdapterProtocolError({ + driver: CLAUDE_PROVIDER, + detail: `Claude could not ${action}`, + cause: error, + }); +} + +// No `authUrl` means the sign-in finished without the user. +const ClaudeMcpAuthenticateReply = Schema.Struct({ + authUrl: Schema.optional(Schema.String), + callbackExpected: Schema.optional(Schema.Boolean), +}); +type ClaudeMcpAuthenticateReply = typeof ClaudeMcpAuthenticateReply.Type; +const decodeClaudeMcpAuthenticateReply = Schema.decodeUnknownEffect(ClaudeMcpAuthenticateReply); + const ClaudePermissionRules = Schema.Struct({ state: Schema.Struct({ rules: Schema.Array( @@ -1884,6 +1917,35 @@ export const layerQueryRunner: Layer.Layer< Effect.map(({ state }) => state.rules), Effect.mapError((cause) => queryRunnerError(cause, "listPermissionRules")), ), + mcpAuth: { + authenticate: (server) => + Effect.tryPromise({ + try: () => + sendClaudeControlRequest(queryRuntime, { + subtype: "mcp_authenticate", + serverName: server, + }), + catch: (cause) => queryRunnerError(cause, "mcpAuthenticate"), + }).pipe( + Effect.flatMap(decodeClaudeMcpAuthenticateReply), + Effect.mapError((cause) => queryRunnerError(cause, "mcpAuthenticate")), + ), + submitCallback: ({ server, callbackUrl }) => + Effect.tryPromise({ + try: () => + sendClaudeControlRequest(queryRuntime, { + subtype: "mcp_oauth_callback_url", + serverName: server, + callbackUrl, + }), + catch: (cause) => queryRunnerError(cause, "mcpSubmitOAuthCallbackUrl"), + }).pipe(Effect.asVoid), + reconnect: (server) => + Effect.tryPromise({ + try: () => queryRuntime.reconnectMcpServer(server), + catch: (cause) => queryRunnerError(cause, "reconnectMcpServer"), + }), + }, interrupt: Effect.tryPromise({ try: () => queryRuntime.interrupt(), catch: (cause) => queryRunnerError(cause, "interrupt"), @@ -8616,20 +8678,30 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( registry: target.toolCalls, }); - // App requests never start a CLI; they reuse the live process that ran the tool. - const mcpAppQuery = Effect.fn("ClaudeAdapterV2.mcpAppQuery")(function* ( + // App and sign-in requests never start a CLI; they reuse the live process that ran the tool. + const liveQueryFor = Effect.fn("ClaudeAdapterV2.liveQueryFor")(function* ( providerThread: OrchestrationV2ProviderThread, ) { const liveQuery = yield* Ref.get(queryContext); + const nativeThreadId = providerThread.nativeThreadRef?.nativeId; if ( liveQuery === null || liveQuery.stopping || - liveQuery.nativeThreadId !== providerThread.nativeThreadRef?.nativeId + nativeThreadId == null || + (liveQuery.nativeThreadId !== nativeThreadId && + clearedNativeSessions.get(liveQuery.nativeThreadId) !== nativeThreadId) ) { return yield* new ProviderAdapter.ProviderAdapterSessionStoppedError({ driver: CLAUDE_PROVIDER, }); } + return liveQuery; + }); + + const mcpAppQuery = Effect.fn("ClaudeAdapterV2.mcpAppQuery")(function* ( + providerThread: OrchestrationV2ProviderThread, + ) { + const liveQuery = yield* liveQueryFor(providerThread); if (!claudeSupportsMcpApps(liveQuery.capabilities)) { return yield* new ProviderAdapter.ProviderAdapterProtocolError({ driver: CLAUDE_PROVIDER, @@ -14290,6 +14362,47 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( } yield* applySessionTitle(live.query, live.nativeThreadId, title); }), + mcpServerAuth: { + list: Effect.fn("ClaudeAdapterV2.listMcpServers")(function* ({ providerThread }) { + const liveQuery = yield* liveQueryFor(providerThread); + const statuses = yield* liveQuery.query.mcpServerStatus.pipe( + Effect.mapError(claudeMcpServerAuthError("list MCP servers")), + ); + return statuses.map(({ name, status }) => ({ name, status })); + }), + authenticate: Effect.fn("ClaudeAdapterV2.authenticateMcpServer")(function* ({ + providerThread, + server, + }) { + const liveQuery = yield* liveQueryFor(providerThread); + const reply = yield* liveQuery.query.mcpAuth + .authenticate(server) + .pipe(Effect.mapError(claudeMcpServerAuthError("start sign-in"))); + return { + ...(reply.authUrl === undefined ? {} : { authorizationUrl: reply.authUrl }), + callbackExpected: reply.callbackExpected === true, + }; + }), + submitCallback: Effect.fn("ClaudeAdapterV2.submitMcpOAuthCallback")(function* ({ + providerThread, + server, + callbackUrl, + }) { + const liveQuery = yield* liveQueryFor(providerThread); + yield* liveQuery.query.mcpAuth + .submitCallback({ server, callbackUrl }) + .pipe(Effect.mapError(claudeMcpServerAuthError("finish sign-in"))); + }), + reconnect: Effect.fn("ClaudeAdapterV2.reconnectMcpServer")(function* ({ + providerThread, + server, + }) { + const liveQuery = yield* liveQueryFor(providerThread); + yield* liveQuery.query.mcpAuth + .reconnect(server) + .pipe(Effect.mapError(claudeMcpServerAuthError("reconnect"))); + }), + }, stopTask: Effect.fn("ClaudeAdapterV2.stopTask")(function* ({ providerThread, taskId }) { const liveQuery = yield* Ref.get(queryContext); const task = (yield* Ref.get(sessionSubagentsByTaskId)).get(taskId); diff --git a/apps/server/src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.ts b/apps/server/src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.ts index f1ef42a005e41..6f1712b41e9de 100644 --- a/apps/server/src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.ts +++ b/apps/server/src/orchestration-v2/Adapters/ClaudeAgentSdkQueryRunner.test.ts @@ -326,6 +326,60 @@ it.effect.each([ }).pipe(Effect.provide(realQueryRunner)), ); +it.effect("sends MCP sign-in as the control requests the Claude CLI serves", () => + Effect.scoped( + Effect.gen(function* () { + const requests: Array = []; + const reconnectMcpServer = vi.fn(async () => undefined); + const querySpy = vi.spyOn(ClaudeSdk, "query").mockImplementation( + () => + ({ + close: vi.fn(), + reconnectMcpServer, + request: async (request: { readonly serverName: string }) => { + requests.push(request); + return { + response: + request.serverName === "signed-in" + ? { requiresUserAction: false, callbackExpected: false } + : { authUrl: "https://linear.example/authorize", callbackExpected: true }, + }; + }, + }) as unknown as ClaudeSdk.Query, + ); + yield* Effect.addFinalizer(() => Effect.sync(() => querySpy.mockRestore())); + const runner = yield* ClaudeAgentSdkQueryRunner; + const { mcpServers: _mcpServers, ...options } = resumedMcpQueryInput.options; + const session = yield* runner.open({ ...resumedMcpQueryInput, options }); + yield* Effect.addFinalizer(() => session.close.pipe(Effect.orDie)); + + assert.deepEqual(yield* session.mcpAuth.authenticate("linear"), { + authUrl: "https://linear.example/authorize", + callbackExpected: true, + }); + assert.deepEqual(yield* session.mcpAuth.authenticate("signed-in"), { + callbackExpected: false, + }); + yield* session.mcpAuth.submitCallback({ + server: "linear", + callbackUrl: "http://localhost:1/callback?code=c", + }); + yield* session.mcpAuth.reconnect("linear"); + + assert.deepEqual(requests, [ + { subtype: "mcp_authenticate", serverName: "linear" }, + { subtype: "mcp_authenticate", serverName: "signed-in" }, + { + subtype: "mcp_oauth_callback_url", + serverName: "linear", + callbackUrl: "http://localhost:1/callback?code=c", + }, + ]); + assert.deepEqual(reconnectMcpServer.mock.calls, [["linear"]]); + }).pipe(Effect.provide(realQueryRunner)), + ), +); + it.effect.each([true, false])("only retries after confirmed process exit: %s", (exits) => Effect.gen(function* () { const registrationStarted = Promise.withResolvers(); diff --git a/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts b/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts index fd5f89b86a0c1..0adfadea96fcd 100644 --- a/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts +++ b/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.ts @@ -90,6 +90,24 @@ const isProviderAdapterEventStreamError = Schema.is( ); const encodeUnknownJson = Schema.encodeUnknownSync(Schema.fromJsonString(Schema.Unknown)); +describe("CodexAdapterV2 MCP server status", () => { + it.each([ + [{ authStatus: "oAuth", runtimeStatus: "connected" }, "connected"], + [{ authStatus: "oAuth", runtimeStatus: "authenticationRequired" }, "needs-auth"], + [{ authStatus: "notLoggedIn", runtimeStatus: "failed" }, "failed"], + [{ authStatus: "oAuth", runtimeStatus: "cancelled" }, "failed"], + [{ authStatus: "oAuth", runtimeStatus: "starting" }, "pending"], + [{ authStatus: "oAuth", runtimeStatus: "notStarted" }, "pending"], + [{ authStatus: "oAuth", runtimeStatus: "disabled" }, "disabled"], + // `toolsAndAuthOnly` may omit the runtime status; auth and the tool listing decide. + [{ authStatus: "notLoggedIn" }, "needs-auth"], + [{ authStatus: "oAuth", toolsError: "boom" }, "failed"], + [{ authStatus: "bearerToken", runtimeStatus: null }, "connected"], + ] as const)("maps %j to %s", (server, status) => { + assert.equal(CodexAdapterV2.codexMcpServerStatus(server), status); + }); +}); + describe("CodexAdapterV2 context usage", () => { it("uses the current context rather than cumulative processed tokens", () => { const usage = CodexAdapterV2.codexProviderTurnTokenUsage( @@ -8643,6 +8661,74 @@ describe("CodexAdapterV2 post-settle continuation", () => { ), ); + it.effect("checks the named MCP server before reloading Codex servers", () => + Effect.gen(function* () { + const scenario = "mcp-reconnect"; + const nativeThreadId = "native-mcp-reconnect"; + const transcript = makeCodexReplayTranscript({ + scenario, + entries: [ + ...codexReplayPreamble({ + nativeThreadId, + nativeTurnId: "unused-turn", + prompt: "unused-prompt", + }).slice(0, 5), + ...[3, 4].flatMap((id) => [ + { + type: "expect_outbound" as const, + label: "list servers", + frame: { + id, + method: "mcpServerStatus/list", + params: { threadId: nativeThreadId, detail: "toolsAndAuthOnly" }, + }, + }, + { + type: "emit_inbound" as const, + label: "server listing", + frame: { + id, + result: { + data: [ + { + name: "linear", + authStatus: "notLoggedIn", + tools: {}, + resources: [], + resourceTemplates: [], + }, + ], + nextCursor: null, + }, + }, + }, + ]), + { + type: "expect_outbound", + label: "reload known server", + frame: { id: 5, method: "config/mcpServer/reload" }, + }, + { type: "emit_inbound", label: "reload completed", frame: { id: 5, result: {} } }, + ], + }); + const harness = yield* makeCodexReplayHarness(transcript); + const auth = harness.runtime.mcpServerAuth!; + const target = { providerThread: harness.providerThread }; + const error = yield* Effect.flip(auth.reconnect({ ...target, server: "lienar" })); + assert.equal(error._tag, "ProviderAdapterProtocolError"); + yield* auth.reconnect({ ...target, server: "linear" }); + }).pipe( + Effect.provide( + Layer.mergeAll( + IdAllocator.layer, + McpProviderSessions.layer, + NodeServices.layer, + NodeCrypto.layer, + ), + ), + ), + ); + it.effect("captures an MCP app's resource and holds the turn open until it lands", () => Effect.gen(function* () { const appCaptured = yield* Deferred.make(); diff --git a/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts b/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts index fdd7c22e6ecca..da4ad38e3f00d 100644 --- a/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts +++ b/apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts @@ -353,6 +353,31 @@ export const CodexProviderCapabilitiesV2 = { }, } satisfies OrchestrationV2ProviderCapabilities; +const CODEX_MCP_SERVER_LIST_MAX_PAGES = 20; + +export function codexMcpServerStatus(server: { + readonly authStatus: string; + readonly runtimeStatus?: string | null; + readonly toolsError?: string | null; +}): ProviderAdapter.ProviderAdapterV2McpServerStatus { + switch (server.runtimeStatus) { + case "connected": + return "connected"; + case "authenticationRequired": + return "needs-auth"; + case "failed": + case "cancelled": + return "failed"; + case "starting": + case "notStarted": + return "pending"; + case "disabled": + return "disabled"; + } + if (server.authStatus === "notLoggedIn") return "needs-auth"; + return server.toolsError == null ? "connected" : "failed"; +} + function toProtocolError( detail: string, payload?: unknown, @@ -7889,6 +7914,68 @@ export const makeCodexAdapterV2 = Effect.fn("makeCodexAdapterV2")(function* ( } }); + const mcpServerAuthError = (action: string) => (cause: unknown) => + new ProviderAdapter.ProviderAdapterProtocolError({ + driver: CODEX_PROVIDER, + detail: `Codex could not ${action}`, + cause, + }); + // Sign-in finishes in the app-server's own loopback listener, so there is no callback to submit. + const mcpServerAuth: ProviderAdapter.ProviderAdapterV2McpServerAuth = { + list: Effect.fn("CodexAdapterV2.listMcpServers")( + function* ({ providerThread }) { + const threadId = yield* getNativeThreadId(providerThread); + yield* ensureInitialized; + const servers: Array<{ + readonly name: string; + readonly status: ProviderAdapter.ProviderAdapterV2McpServerStatus; + }> = []; + let cursor: string | undefined; + for (let page = 0; page < CODEX_MCP_SERVER_LIST_MAX_PAGES; page++) { + const response = yield* client.request("mcpServerStatus/list", { + threadId, + detail: "toolsAndAuthOnly", + ...(cursor === undefined ? {} : { cursor }), + }); + for (const server of response.data) { + servers.push({ name: server.name, status: codexMcpServerStatus(server) }); + } + if (response.nextCursor == null) break; + cursor = response.nextCursor; + } + return servers; + }, + Effect.mapError(mcpServerAuthError("list MCP servers")), + ), + authenticate: Effect.fn("CodexAdapterV2.authenticateMcpServer")( + function* ({ providerThread, server }) { + const threadId = yield* getNativeThreadId(providerThread); + yield* ensureInitialized; + const { authorizationUrl } = yield* client.request("mcpServer/oauth/login", { + name: server, + threadId, + }); + return { authorizationUrl, callbackExpected: false }; + }, + Effect.mapError(mcpServerAuthError("start MCP sign-in")), + ), + // Codex reloads every server's config on loaded threads for their next turn; it has no per-server reconnect. + reconnect: Effect.fn("CodexAdapterV2.reloadMcpServers")( + function* ({ providerThread, server }) { + const servers = yield* mcpServerAuth.list({ providerThread }); + if (!servers.some((candidate) => candidate.name === server)) { + return yield* new ProviderAdapter.ProviderAdapterProtocolError({ + driver: CODEX_PROVIDER, + detail: "The requested MCP server does not exist.", + }); + } + yield* ensureInitialized; + yield* client.request("config/mcpServer/reload", undefined); + }, + Effect.mapError(mcpServerAuthError("reload MCP servers")), + ), + }; + const runtime: ProviderAdapter.ProviderAdapterV2SessionRuntime = { instanceId: adapterOptions.instanceId, driver: CODEX_PROVIDER, @@ -8785,6 +8872,7 @@ export const makeCodexAdapterV2 = Effect.fn("makeCodexAdapterV2")(function* ( ), ), mcpApps, + mcpServerAuth, readThreadSnapshot: Effect.fn("CodexAdapterV2.readThreadSnapshot")( function* (threadInput) { const threadId = yield* getNativeThreadId(threadInput.providerThread); diff --git a/apps/server/src/orchestration-v2/ClaudeAutomaticDelivery.integration.test.ts b/apps/server/src/orchestration-v2/ClaudeAutomaticDelivery.integration.test.ts index 1fa7047aff428..d4d3688f40403 100644 --- a/apps/server/src/orchestration-v2/ClaudeAutomaticDelivery.integration.test.ts +++ b/apps/server/src/orchestration-v2/ClaudeAutomaticDelivery.integration.test.ts @@ -44,6 +44,7 @@ import * as ProviderAdapterRegistry from "./ProviderAdapterRegistry.ts"; import * as ThreadLaunchService from "./ThreadLaunchService.ts"; import * as ThreadManagementService from "./ThreadManagementService.ts"; import * as ServerSettings from "../serverSettings.ts"; +import { unexpectedClaudeMcpAuth } from "./Adapters/ClaudeAdapterV2.testkit.ts"; import * as ProviderReplayHarness from "./testkit/ProviderReplayHarness.ts"; import { checkpointWorkspace } from "@t3tools/provider-testing/replayWorkspace"; @@ -172,6 +173,7 @@ it.effect.each(deliveries)( renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -522,6 +524,7 @@ it.effect("applies an effort change to the running Claude query without waiting renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -638,6 +641,7 @@ const renamedClaudeSessionTitles = (options: { readonly renameDuringStartup: boo }), backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), @@ -864,6 +868,7 @@ it.effect("offers a continuation for a later wake after a queued continuation is renameSession: () => Effect.void, backgroundTasks: () => Effect.succeed(false), mcpServerStatus: Effect.succeed([]), + mcpAuth: unexpectedClaudeMcpAuth, readMcpResource: () => Effect.die("unexpected MCP resource read"), callMcpTool: () => Effect.die("unexpected MCP tool call"), listPermissionRules: Effect.die("unexpected permission rules read"), diff --git a/apps/server/src/orchestration-v2/ThreadManagementService.test.ts b/apps/server/src/orchestration-v2/ThreadManagementService.test.ts index 97ab0a8db1657..cc27cb0febf14 100644 --- a/apps/server/src/orchestration-v2/ThreadManagementService.test.ts +++ b/apps/server/src/orchestration-v2/ThreadManagementService.test.ts @@ -569,6 +569,67 @@ it.effect("waitForThread returns the cut run once its continuation is declined", }), ); +const liveRuntimeFixture = Effect.fn("liveRuntimeFixture")(function* ( + name: string, + session: "live" | "no-session", + runtimeMembers: Record, +) { + const threadId = ThreadId.make(`thread:${name}`); + const providerThreadId = ProviderThreadId.make(`provider-thread:${name}`); + const providerSessionId = ProviderSessionId.make(`provider-session:${name}`); + const driver = ProviderDriverKind.make("claudeAgent"); + const now = yield* DateTime.now; + const providerThread: OrchestrationV2ProviderThread = { + id: providerThreadId, + driver, + providerInstanceId: ProviderInstanceId.make("claudeAgent"), + providerSessionId, + appThreadId: threadId, + ownerNodeId: null, + nativeThreadRef: { driver, nativeId: "native-thread", strength: "strong" }, + nativeConversationHeadRef: null, + status: "idle", + firstRunOrdinal: 1, + lastRunOrdinal: 1, + handoffIds: [], + forkedFrom: null, + pendingBackgroundTasks: [{ taskId: "tests", kind: "command" }], + contextUsage: null, + nativeMetadata: null, + createdAt: now, + updatedAt: now, + }; + const runtime = { + driver, + providerSessionId, + ...runtimeMembers, + } as unknown as ProviderAdapter.ProviderAdapterV2SessionRuntime; + const layerTest = ThreadManagementService.layer.pipe( + Layer.provide( + Layer.mergeAll( + Layer.mock(Orchestrator.OrchestratorV2)({ + getThreadRecords: () => + Effect.succeed({ + thread: { id: threadId, deletedAt: null, activeProviderThreadId: providerThreadId }, + providerThreads: [providerThread], + } as unknown as OrchestrationV2ThreadProjection), + }), + Layer.mock(ProviderSessionManager.ProviderSessionManagerV2)({ + get: () => + Effect.succeed(session === "no-session" ? Option.none() : Option.some(runtime)), + }), + ), + ), + Layer.provide(ServerSettings.layerTest()), + Layer.provide(layerReceiptsTest), + ); + return { + threadId, + providerThreadId, + provide: Effect.provide(Layer.merge(layerTest, ThreadCommandExecutor.layer)), + }; +}); + it.effect.each([ "live", "no-match", @@ -684,6 +745,125 @@ it.effect.each([ }), ); +it.effect.each([ + { state: "no-session" as const, reason: "unavailable" }, + { state: "unsupported-runtime" as const, reason: "unsupported" }, + { state: "no-callback" as const, reason: "callback-unsupported" }, +])("manageMcpServer reports $reason when the runtime state is $state", ({ state, reason }) => + Effect.gen(function* () { + const { threadId, provide } = yield* liveRuntimeFixture( + "mcp-server", + state === "no-session" ? "no-session" : "live", + state === "unsupported-runtime" + ? {} + : { + mcpServerAuth: { + list: () => Effect.succeed([]), + authenticate: () => Effect.die("unexpected authenticate"), + reconnect: () => Effect.die("unexpected reconnect"), + }, + }, + ); + const result = yield* Effect.gen(function* () { + const service = yield* ThreadManagementService.ThreadManagementService; + return yield* service + .manageMcpServer({ + threadId, + action: "callback", + server: "linear", + callbackUrl: "http://localhost:1/callback?code=c", + }) + .pipe(Effect.result); + }).pipe(provide); + + expect(result).toMatchObject({ + failure: { _tag: "ThreadManagementMcpServerError", reason }, + }); + }), +); + +it.effect.each(["javascript:alert(1)", "https://", "not a link"])( + "manageMcpServer refuses the sign-in link %s", + (authorizationUrl) => + Effect.gen(function* () { + const { threadId, provide } = yield* liveRuntimeFixture("mcp-server-link", "live", { + mcpServerAuth: { + list: () => Effect.succeed([]), + authenticate: () => Effect.succeed({ authorizationUrl, callbackExpected: false }), + reconnect: () => Effect.die("unexpected reconnect"), + }, + }); + const result = yield* Effect.gen(function* () { + const service = yield* ThreadManagementService.ThreadManagementService; + return yield* service + .manageMcpServer({ threadId, action: "authenticate", server: "linear" }) + .pipe(Effect.result); + }).pipe(provide); + expect(result).toMatchObject({ + failure: { _tag: "ThreadManagementMcpServerError", reason: "invalid-link" }, + }); + }), +); + +it.effect("manageMcpServer routes each action to the thread's active provider thread", () => + Effect.gen(function* () { + const calls: Array = []; + const record = + (label: string, value: A) => + (input: { readonly providerThread: OrchestrationV2ProviderThread }) => + Effect.sync(() => { + calls.push([label, input.providerThread.id, { ...input, providerThread: undefined }]); + return value; + }); + const { threadId, providerThreadId, provide } = yield* liveRuntimeFixture( + "mcp-server-live", + "live", + { + mcpServerAuth: { + list: record("list", [{ name: "linear", status: "needs-auth" }]), + authenticate: record("authenticate", { + authorizationUrl: "https://linear.example/authorize", + callbackExpected: true, + }), + submitCallback: record("callback", undefined), + reconnect: record("reconnect", undefined), + }, + }, + ); + const results = yield* Effect.gen(function* () { + const service = yield* ThreadManagementService.ThreadManagementService; + return [ + yield* service.manageMcpServer({ threadId, action: "list" }), + yield* service.manageMcpServer({ threadId, action: "authenticate", server: "linear" }), + yield* service.manageMcpServer({ + threadId, + action: "callback", + server: "linear", + callbackUrl: "http://localhost:1/callback?code=c", + }), + yield* service.manageMcpServer({ threadId, action: "reconnect", server: "linear" }), + ]; + }).pipe(provide); + + expect(results).toEqual([ + { servers: [{ name: "linear", status: "needs-auth" }] }, + { authorizationUrl: "https://linear.example/authorize", callbackExpected: true }, + {}, + {}, + ]); + expect(calls).toEqual([ + ["list", providerThreadId, {}], + ["authenticate", providerThreadId, { server: "linear" }], + [ + "callback", + providerThreadId, + { server: "linear", callbackUrl: "http://localhost:1/callback?code=c" }, + ], + ["reconnect", providerThreadId, { server: "linear" }], + ]); + }), +); + it.effect.each([ { status: "completed" as const, followUp: "none", settles: true }, { status: "failed" as const, followUp: "none", settles: false }, diff --git a/apps/server/src/orchestration-v2/ThreadManagementService.ts b/apps/server/src/orchestration-v2/ThreadManagementService.ts index bfd676d7a3a22..b4f5e1e11a7ea 100644 --- a/apps/server/src/orchestration-v2/ThreadManagementService.ts +++ b/apps/server/src/orchestration-v2/ThreadManagementService.ts @@ -43,6 +43,7 @@ import { ThreadId, type TurnItemId, } from "@t3tools/contracts"; +import type * as ProviderAdapter from "@t3tools/provider-core/server/ProviderAdapter"; import { delegatedTaskProgress } from "@t3tools/provider-core/server/subagentProjection"; import { threadTranscriptHeader } from "@t3tools/shared/threadTranscript"; import { AgentScope } from "@t3tools/shared/AgentScope"; @@ -348,6 +349,51 @@ export class ThreadManagementProviderInstanceDisabledError extends Schema.Tagged } } +export class ThreadManagementMcpServerError extends Schema.TaggedError()( + "ThreadManagementMcpServerError", + { + threadId: ThreadId, + reason: Schema.Literals([ + "unsupported", + "callback-unsupported", + "invalid-link", + "unavailable", + "failed", + ]), + cause: Schema.optional(Schema.Defect()), + }, +) { + override get message(): string { + switch (this.reason) { + case "unsupported": + return "This provider cannot sign in to MCP servers for the agent."; + case "invalid-link": + return "The sign-in link was not an http(s) address, so it was not shown."; + case "callback-unsupported": + return "This provider finishes sign-in on its own; there is no callback URL to submit."; + case "unavailable": + return "This thread has no live provider session."; + case "failed": + return this.cause instanceof Error ? this.cause.message : "The MCP server request failed."; + } + } +} + +export type ThreadManagementMcpServerRequest = + | { readonly action: "list" } + | { readonly action: "authenticate" | "reconnect"; readonly server: string } + | { readonly action: "callback"; readonly server: string; readonly callbackUrl: string }; + +export type ThreadManagementMcpServerResult = + | { + readonly servers: ReadonlyArray<{ + readonly name: string; + readonly status: ProviderAdapter.ProviderAdapterV2McpServerStatus; + }>; + } + | { readonly authorizationUrl?: string; readonly callbackExpected: boolean } + | Record; + export class ThreadManagementBackgroundWaitError extends Schema.TaggedError()( "ThreadManagementBackgroundWaitError", { @@ -512,6 +558,9 @@ export interface ThreadManagementServiceShape { { readonly matched: ReadonlyArray; readonly unmatched: ReadonlyArray }, ThreadManagementBackgroundWaitError >; + readonly manageMcpServer: ( + input: { readonly threadId: ThreadId } & ThreadManagementMcpServerRequest, + ) => Effect.Effect; readonly stopDelegatedTasks: (input: { readonly remoteDispatch?: Orchestrator.OrchestratorV2["Service"]["dispatch"]; readonly threadId: ThreadId; @@ -1554,6 +1603,22 @@ const make = Effect.gen(function* () { (effect, input) => effect.pipe((effect) => threadDispatch.withLock(input.threadId, effect)), ); + const findLiveRuntime = Effect.fn("ThreadManagementService.findLiveRuntime")(function* ( + threadId: ThreadId, + ) { + const records = yield* orchestrator.getThreadRecords(threadId, ["providerThreads"]); + const providerThread = records.providerThreads.find( + (candidate) => + candidate.id === records.thread.activeProviderThreadId && + candidate.appThreadId === threadId, + ); + if (records.thread.deletedAt !== null || providerThread?.providerSessionId == null) { + return Option.none(); + } + const runtime = yield* sessions.get(providerThread.providerSessionId); + return Option.map(runtime, (live) => ({ providerThread, runtime: live })); + }); + const awaitBackgroundTasks: ThreadManagementServiceShape["awaitBackgroundTasks"] = Effect.fn( "ThreadManagementService.awaitBackgroundTasks", )(function* (input) { @@ -1563,30 +1628,18 @@ const make = Effect.gen(function* () { reason: "unavailable", ...(cause === undefined ? {} : { cause }), }); - const records = yield* orchestrator - .getThreadRecords(input.threadId, ["providerThreads"]) - .pipe(Effect.mapError(unavailable)); - const providerThread = records.providerThreads.find( - (candidate) => - candidate.id === records.thread.activeProviderThreadId && - candidate.appThreadId === input.threadId, - ); - if (records.thread.deletedAt !== null || providerThread?.providerSessionId == null) { + const live = yield* findLiveRuntime(input.threadId).pipe(Effect.mapError(unavailable)); + if (Option.isNone(live)) { return yield* unavailable(); } - const runtime = yield* sessions - .get(providerThread.providerSessionId) - .pipe(Effect.mapError(unavailable)); - if (Option.isNone(runtime)) { - return yield* unavailable(); - } - if (runtime.value.awaitBackgroundTasks === undefined) { + const { providerThread, runtime } = live.value; + if (runtime.awaitBackgroundTasks === undefined) { return yield* new ThreadManagementBackgroundWaitError({ threadId: input.threadId, reason: "unsupported", }); } - const { matched } = yield* runtime.value + const { matched } = yield* runtime .awaitBackgroundTasks({ providerThread, taskIds: input.taskIds, awaited: input.awaited }) .pipe( Effect.timeout("15 seconds"), @@ -1609,6 +1662,60 @@ const make = Effect.gen(function* () { return { matched, unmatched: input.taskIds.filter((taskId) => !matchedIds.has(taskId)) }; }); + const manageMcpServer: ThreadManagementServiceShape["manageMcpServer"] = Effect.fn( + "ThreadManagementService.manageMcpServer", + )(function* (input) { + const error = (reason: ThreadManagementMcpServerError["reason"], cause?: unknown) => + new ThreadManagementMcpServerError({ + threadId: input.threadId, + reason, + ...(cause === undefined ? {} : { cause }), + }); + const live = yield* findLiveRuntime(input.threadId).pipe( + Effect.mapError((cause) => error("unavailable", cause)), + ); + if (Option.isNone(live)) return yield* error("unavailable"); + const { providerThread, runtime } = live.value; + const auth = runtime.mcpServerAuth; + if (auth === undefined) return yield* error("unsupported"); + const run = (effect: Effect.Effect) => + effect.pipe( + Effect.timeout("30 seconds"), + Effect.mapError((cause) => error("failed", cause)), + ); + switch (input.action) { + case "list": + return { servers: yield* run(auth.list({ providerThread })) }; + case "authenticate": { + const result = yield* run(auth.authenticate({ providerThread, server: input.server })); + // The link comes from the MCP server's own OAuth metadata; only a browser link is safe to show. + if (result.authorizationUrl !== undefined) { + const link = URL.canParse(result.authorizationUrl) + ? new URL(result.authorizationUrl) + : null; + if (link === null || !/^https?:$/.test(link.protocol) || link.host === "") { + return yield* error("invalid-link"); + } + } + return result; + } + case "callback": { + if (auth.submitCallback === undefined) return yield* error("callback-unsupported"); + yield* run( + auth.submitCallback({ + providerThread, + server: input.server, + callbackUrl: input.callbackUrl, + }), + ); + return {}; + } + case "reconnect": + yield* run(auth.reconnect({ providerThread, server: input.server })); + return {}; + } + }); + const stopDelegatedTasks: ThreadManagementServiceShape["stopDelegatedTasks"] = Effect.fn( "ThreadManagementService.stopDelegatedTasks", )(function* (input) { @@ -1782,6 +1889,7 @@ const make = Effect.gen(function* () { stopWorkflow, forceStopThread, awaitBackgroundTasks, + manageMcpServer, getThreadEventSequence: orchestrator.getThreadEventSequence, recoverDelegatedTask: orchestrator.recoverDelegatedTask, cancelDelegatedTask: orchestrator.cancelDelegatedTask, diff --git a/apps/server/src/provider/agentContextBudget.json b/apps/server/src/provider/agentContextBudget.json index 9c305c266f3dd..8e47ab9148940 100644 --- a/apps/server/src/provider/agentContextBudget.json +++ b/apps/server/src/provider/agentContextBudget.json @@ -1,5 +1,5 @@ { "claudeSystemAppendBytes": 5930, "codexAdditionalContextBytes": 7324, - "mcpToolListJsonBytes": 52145 + "mcpToolListJsonBytes": 52683 } diff --git a/apps/server/src/relay/AgentAwarenessRelay.test.ts b/apps/server/src/relay/AgentAwarenessRelay.test.ts index 5cde458a1cd30..6a46f60a67b1a 100644 --- a/apps/server/src/relay/AgentAwarenessRelay.test.ts +++ b/apps/server/src/relay/AgentAwarenessRelay.test.ts @@ -260,6 +260,7 @@ const makeTestRelay = Effect.fnUntraced(function* ( stopWorkflow: () => Effect.die("unused stopWorkflow"), forceStopThread: () => Effect.die("unused forceStopThread"), awaitBackgroundTasks: unused, + manageMcpServer: unused, stopDelegatedTasks: unused, getThreadEventSequence: unused, recoverDelegatedTask: unused, diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json index 4c9f0f6d27e4f..e7fbd35d6864f 100644 --- a/apps/web/src/i18n/translations/de.json +++ b/apps/web/src/i18n/translations/de.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, one {Versucht, den Aufgabenstatus {count}-mal zu prüfen} other {Versucht, den Aufgabenstatus {count}-mal zu prüfen}}", "9e410f60344c6772": "{count, plural, one {Hintergrund-Wartevorgänge {count}-mal aktualisiert} other {Hintergrund-Wartevorgänge {count}-mal aktualisiert}}", "5ca35b5a769eadcd": "{count, plural, one {Versucht, Hintergrund-Wartevorgänge {count}-mal zu aktualisieren} other {Versucht, Hintergrund-Wartevorgänge {count}-mal zu aktualisieren}}", + "c65ba57f9f9e3ad3": "{count, plural, one {MCP-Server-Anmeldung {count}-mal verwaltet} other {MCP-Server-Anmeldung {count}-mal verwaltet}}", + "9966bfa08a1d5cb2": "{count, plural, one {MCP-Server-Anmeldung {count}-mal zu verwalten versucht} other {MCP-Server-Anmeldung {count}-mal zu verwalten versucht}}", "7f78d45ac7d49ffa": "{count, plural, one {Geplante Aufgaben {count}-mal aufgelistet} other {Geplante Aufgaben {count}-mal aufgelistet}}", "5cf841526acd9494": "{count, plural, one {Versucht, geplante Aufgaben {count}-mal aufzulisten} other {Versucht, geplante Aufgaben {count}-mal aufzulisten}}", "a0239a5f1e8f49dc": "{count, plural, one {Thread-Konfiguration {count}-mal geprüft} other {Thread-Konfiguration {count}-mal geprüft}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {Integration {names} verwendet} other {Integrationen {names} verwendet}}", "7ed2bff150997c76": "{names} verwendet", "7136ebec3019a2ed": "{count, plural, one {{count} weitere Aktion ausgeführt} other {{count} weitere Aktionen ausgeführt}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {MCP-Server-Anmeldung wird verwaltet} completed {MCP-Server-Anmeldung verwaltet} failed {MCP-Server-Anmeldung konnte nicht verwaltet werden} declined {Verwaltung der MCP-Server-Anmeldung abgelehnt} stopped {Verwaltung der MCP-Server-Anmeldung gestoppt} other {MCP-Server-Anmeldung wird verwaltet}}", "551df12aeaf5ba83": "{status, select, inProgress {Pull Request wird verknüpft} completed {Pull Request verknüpft} failed {Pull Request konnte nicht verknüpft werden} declined {Verknüpfen eines Pull Requests abgelehnt} stopped {Verknüpfen eines Pull Requests abgebrochen} other {Pull Request wird verknüpft}}", "cbb12c435f68cb2f": "{status, select, inProgress {{changeRequest} #{number} wird verknüpft} completed {{changeRequest} #{number} verknüpft} failed {{changeRequest} #{number} konnte nicht verknüpft werden} declined {Verknüpfen von {changeRequest} #{number} abgelehnt} stopped {Verknüpfen von {changeRequest} #{number} abgebrochen} other {{changeRequest} #{number} wird verknüpft}}", "2f2917c28f02a36e": "{status, select, inProgress {Pull Requests werden verknüpft} completed {Pull Requests verknüpft} failed {Pull Requests konnten nicht verknüpft werden} declined {Verknüpfen von Pull Requests abgelehnt} stopped {Verknüpfen von Pull Requests abgebrochen} other {Pull Requests werden verknüpft}}", diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json index c40470b46e6ae..d9344d28faa03 100644 --- a/apps/web/src/i18n/translations/en.json +++ b/apps/web/src/i18n/translations/en.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, one {Tried to check task status {count} time} other {Tried to check task status {count} times}}", "9e410f60344c6772": "{count, plural, one {Updated background waits {count} time} other {Updated background waits {count} times}}", "5ca35b5a769eadcd": "{count, plural, one {Tried to update background waits {count} time} other {Tried to update background waits {count} times}}", + "c65ba57f9f9e3ad3": "{count, plural, one {Managed MCP server sign-in {count} time} other {Managed MCP server sign-in {count} times}}", + "9966bfa08a1d5cb2": "{count, plural, one {Tried to manage MCP server sign-in {count} time} other {Tried to manage MCP server sign-in {count} times}}", "7f78d45ac7d49ffa": "{count, plural, one {Listed scheduled tasks {count} time} other {Listed scheduled tasks {count} times}}", "5cf841526acd9494": "{count, plural, one {Tried to list scheduled tasks {count} time} other {Tried to list scheduled tasks {count} times}}", "a0239a5f1e8f49dc": "{count, plural, one {Checked thread configuration {count} time} other {Checked thread configuration {count} times}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {Used {names} integration} other {Used {names} integrations}}", "7ed2bff150997c76": "Used {names}", "7136ebec3019a2ed": "{count, plural, one {Performed {count} other action} other {Performed {count} other actions}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {Managing MCP server sign-in} completed {Managed MCP server sign-in} failed {Failed to manage MCP server sign-in} declined {Declined to manage MCP server sign-in} stopped {Stopped managing MCP server sign-in} other {Managing MCP server sign-in}}", "551df12aeaf5ba83": "{status, select, inProgress {Linking a pull request} completed {Linked a pull request} failed {Failed to link a pull request} declined {Declined to link a pull request} stopped {Stopped linking a pull request} other {Linking a pull request}}", "cbb12c435f68cb2f": "{status, select, inProgress {Linking {changeRequest} #{number}} completed {Linked {changeRequest} #{number}} failed {Failed to link {changeRequest} #{number}} declined {Declined to link {changeRequest} #{number}} stopped {Stopped linking {changeRequest} #{number}} other {Linking {changeRequest} #{number}}}", "2f2917c28f02a36e": "{status, select, inProgress {Linking pull requests} completed {Linked pull requests} failed {Failed to link pull requests} declined {Declined to link pull requests} stopped {Stopped linking pull requests} other {Linking pull requests}}", diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json index 68f63f589f51e..48597b6933b85 100644 --- a/apps/web/src/i18n/translations/es.json +++ b/apps/web/src/i18n/translations/es.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, one {Intentó consultar el estado de tareas {count} vez} other {Intentó consultar el estado de tareas {count} veces}}", "9e410f60344c6772": "{count, plural, one {Actualizó esperas en segundo plano {count} vez} other {Actualizó esperas en segundo plano {count} veces}}", "5ca35b5a769eadcd": "{count, plural, one {Intentó actualizar esperas en segundo plano {count} vez} other {Intentó actualizar esperas en segundo plano {count} veces}}", + "c65ba57f9f9e3ad3": "{count, plural, one {Inicio de sesión del servidor MCP gestionado {count} vez} other {Inicio de sesión del servidor MCP gestionado {count} veces}}", + "9966bfa08a1d5cb2": "{count, plural, one {Se intentó gestionar el inicio de sesión del servidor MCP {count} vez} other {Se intentó gestionar el inicio de sesión del servidor MCP {count} veces}}", "7f78d45ac7d49ffa": "{count, plural, one {Listó tareas programadas {count} vez} other {Listó tareas programadas {count} veces}}", "5cf841526acd9494": "{count, plural, one {Intentó listar tareas programadas {count} vez} other {Intentó listar tareas programadas {count} veces}}", "a0239a5f1e8f49dc": "{count, plural, one {Consultó la configuración del hilo {count} vez} other {Consultó la configuración del hilo {count} veces}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {Se usó la integración {names}} other {Se usaron las integraciones {names}}}", "7ed2bff150997c76": "Se usó {names}", "7136ebec3019a2ed": "{count, plural, one {Se realizó {count} acción más} other {Se realizaron {count} acciones más}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {Gestionando el inicio de sesión del servidor MCP} completed {Inicio de sesión del servidor MCP gestionado} failed {Error al gestionar el inicio de sesión del servidor MCP} declined {Gestión del inicio de sesión del servidor MCP rechazada} stopped {Gestión del inicio de sesión del servidor MCP detenida} other {Gestionando el inicio de sesión del servidor MCP}}", "551df12aeaf5ba83": "{status, select, inProgress {Vinculando una pull request} completed {Vinculó una pull request} failed {No se pudo vincular una pull request} declined {Se rechazó vincular una pull request} stopped {Se dejó de vincular una pull request} other {Vinculando una pull request}}", "cbb12c435f68cb2f": "{status, select, inProgress {Vinculando {changeRequest} #{number}} completed {Vinculó {changeRequest} #{number}} failed {No se pudo vincular {changeRequest} #{number}} declined {Se rechazó vincular {changeRequest} #{number}} stopped {Se dejó de vincular {changeRequest} #{number}} other {Vinculando {changeRequest} #{number}}}", "2f2917c28f02a36e": "{status, select, inProgress {Vinculando pull requests} completed {Vinculó pull requests} failed {No se pudo vincular pull requests} declined {Se rechazó vincular pull requests} stopped {Se dejó de vincular pull requests} other {Vinculando pull requests}}", diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json index 442c22ed3a2d7..48b9577a5744b 100644 --- a/apps/web/src/i18n/translations/fr.json +++ b/apps/web/src/i18n/translations/fr.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, one {Tentative de vérifier le statut des tâches {count} fois} other {Tentative de vérifier le statut des tâches {count} fois}}", "9e410f60344c6772": "{count, plural, one {Attentes en arrière-plan mises à jour {count} fois} other {Attentes en arrière-plan mises à jour {count} fois}}", "5ca35b5a769eadcd": "{count, plural, one {Tentative de mettre à jour les attentes en arrière-plan {count} fois} other {Tentative de mettre à jour les attentes en arrière-plan {count} fois}}", + "c65ba57f9f9e3ad3": "{count, plural, one {Connexion au serveur MCP gérée {count} fois} other {Connexion au serveur MCP gérée {count} fois}}", + "9966bfa08a1d5cb2": "{count, plural, one {Tentative de gestion de la connexion au serveur MCP {count} fois} other {Tentative de gestion de la connexion au serveur MCP {count} fois}}", "7f78d45ac7d49ffa": "{count, plural, one {Tâches planifiées listées {count} fois} other {Tâches planifiées listées {count} fois}}", "5cf841526acd9494": "{count, plural, one {Tentative de lister les tâches planifiées {count} fois} other {Tentative de lister les tâches planifiées {count} fois}}", "a0239a5f1e8f49dc": "{count, plural, one {Configuration du fil vérifiée {count} fois} other {Configuration du fil vérifiée {count} fois}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {Intégration {names} utilisée} other {Intégrations {names} utilisées}}", "7ed2bff150997c76": "{names} utilisé", "7136ebec3019a2ed": "{count, plural, one {{count} autre action effectuée} other {{count} autres actions effectuées}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {Gestion de la connexion au serveur MCP} completed {Connexion au serveur MCP gérée} failed {Échec de la gestion de la connexion au serveur MCP} declined {Gestion de la connexion au serveur MCP refusée} stopped {Gestion de la connexion au serveur MCP arrêtée} other {Gestion de la connexion au serveur MCP}}", "551df12aeaf5ba83": "{status, select, inProgress {Association d’une pull request} completed {Pull request associée} failed {Impossible d’associer une pull request} declined {Refus d’associer une pull request} stopped {Arrêt de l’association d’une pull request} other {Association d’une pull request}}", "cbb12c435f68cb2f": "{status, select, inProgress {Association de la {changeRequest} #{number}} completed {{changeRequest} #{number} associée} failed {Impossible d’associer la {changeRequest} #{number}} declined {Refus d’associer la {changeRequest} #{number}} stopped {Arrêt de l’association de la {changeRequest} #{number}} other {Association de la {changeRequest} #{number}}}", "2f2917c28f02a36e": "{status, select, inProgress {Association de pull requests} completed {Pull requests associées} failed {Impossible d’associer des pull requests} declined {Refus d’associer des pull requests} stopped {Arrêt de l’association de pull requests} other {Association de pull requests}}", diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json index c9417551b208c..970b8caad3ef5 100644 --- a/apps/web/src/i18n/translations/ja.json +++ b/apps/web/src/i18n/translations/ja.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, other {タスクの状態を {count} 回確認しようとしました}}", "9e410f60344c6772": "{count, plural, other {バックグラウンドの待機を {count} 回更新しました}}", "5ca35b5a769eadcd": "{count, plural, other {バックグラウンドの待機を {count} 回更新しようとしました}}", + "c65ba57f9f9e3ad3": "MCPサーバーのサインインを{count}回管理しました", + "9966bfa08a1d5cb2": "MCPサーバーのサインイン管理を{count}回試みました", "7f78d45ac7d49ffa": "{count, plural, other {スケジュールタスクを {count} 回一覧表示しました}}", "5cf841526acd9494": "{count, plural, other {スケジュールタスクを {count} 回一覧表示しようとしました}}", "a0239a5f1e8f49dc": "{count, plural, other {スレッドの構成を {count} 回確認しました}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {{names} 連携を使用しました} other {{names} 連携を使用しました}}", "7ed2bff150997c76": "{names} を使用しました", "7136ebec3019a2ed": "{count, plural, other {その他 {count} 件の操作を実行しました}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {MCPサーバーのサインインを管理中} completed {MCPサーバーのサインインを管理しました} failed {MCPサーバーのサインイン管理に失敗しました} declined {MCPサーバーのサインイン管理を拒否しました} stopped {MCPサーバーのサインイン管理を停止しました} other {MCPサーバーのサインインを管理中}}", "551df12aeaf5ba83": "{status, select, inProgress {プルリクエストをリンクしています} completed {プルリクエストをリンクしました} failed {プルリクエストをリンクできませんでした} declined {プルリクエストのリンクは拒否されました} stopped {プルリクエストのリンクを中止しました} other {プルリクエストをリンクしています}}", "cbb12c435f68cb2f": "{status, select, inProgress {{changeRequest} #{number} をリンクしています} completed {{changeRequest} #{number} をリンクしました} failed {{changeRequest} #{number} をリンクできませんでした} declined {{changeRequest} #{number} のリンクは拒否されました} stopped {{changeRequest} #{number} のリンクを中止しました} other {{changeRequest} #{number} をリンクしています}}", "2f2917c28f02a36e": "{status, select, inProgress {プルリクエストをリンクしています} completed {プルリクエストをリンクしました} failed {プルリクエストをリンクできませんでした} declined {プルリクエストのリンクは拒否されました} stopped {プルリクエストのリンクを中止しました} other {プルリクエストをリンクしています}}", diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json index 362d29d071a87..bd566488d49f5 100644 --- a/apps/web/src/i18n/translations/ko.json +++ b/apps/web/src/i18n/translations/ko.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, other {작업 상태 확인 {count}회 시도함}}", "9e410f60344c6772": "{count, plural, other {백그라운드 대기 {count}회 업데이트함}}", "5ca35b5a769eadcd": "{count, plural, other {백그라운드 대기 업데이트 {count}회 시도함}}", + "c65ba57f9f9e3ad3": "MCP 서버 로그인 {count}회 관리함", + "9966bfa08a1d5cb2": "MCP 서버 로그인 관리 {count}회 시도함", "7f78d45ac7d49ffa": "{count, plural, other {예약된 작업 목록 {count}회 조회함}}", "5cf841526acd9494": "{count, plural, other {예약된 작업 목록 조회 {count}회 시도함}}", "a0239a5f1e8f49dc": "{count, plural, other {스레드 구성 {count}회 확인함}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {{names} 통합 사용함} other {{names} 통합 사용함}}", "7ed2bff150997c76": "{names} 사용함", "7136ebec3019a2ed": "{count, plural, other {기타 작업 {count}개 수행함}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {MCP 서버 로그인 관리 중} completed {MCP 서버 로그인 관리됨} failed {MCP 서버 로그인 관리 실패} declined {MCP 서버 로그인 관리 거부됨} stopped {MCP 서버 로그인 관리 중지됨} other {MCP 서버 로그인 관리 중}}", "551df12aeaf5ba83": "{status, select, inProgress {풀 리퀘스트 연결 중} completed {풀 리퀘스트 연결 완료} failed {풀 리퀘스트 연결 실패} declined {풀 리퀘스트 연결 거부됨} stopped {풀 리퀘스트 연결 중지됨} other {풀 리퀘스트 연결 중}}", "cbb12c435f68cb2f": "{status, select, inProgress {{changeRequest} #{number} 연결 중} completed {{changeRequest} #{number} 연결 완료} failed {{changeRequest} #{number} 연결 실패} declined {{changeRequest} #{number} 연결 거부됨} stopped {{changeRequest} #{number} 연결 중지됨} other {{changeRequest} #{number} 연결 중}}", "2f2917c28f02a36e": "{status, select, inProgress {풀 리퀘스트 연결 중} completed {풀 리퀘스트 연결 완료} failed {풀 리퀘스트 연결 실패} declined {풀 리퀘스트 연결 거부됨} stopped {풀 리퀘스트 연결 중지됨} other {풀 리퀘스트 연결 중}}", diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json index b598943e92383..a427b22241625 100644 --- a/apps/web/src/i18n/translations/pt-BR.json +++ b/apps/web/src/i18n/translations/pt-BR.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, one {Tentou verificar o status de tarefas {count} vez} other {Tentou verificar o status de tarefas {count} vezes}}", "9e410f60344c6772": "{count, plural, one {Atualizou esperas em segundo plano {count} vez} other {Atualizou esperas em segundo plano {count} vezes}}", "5ca35b5a769eadcd": "{count, plural, one {Tentou atualizar esperas em segundo plano {count} vez} other {Tentou atualizar esperas em segundo plano {count} vezes}}", + "c65ba57f9f9e3ad3": "{count, plural, one {Login do servidor MCP gerenciado {count} vez} other {Login do servidor MCP gerenciado {count} vezes}}", + "9966bfa08a1d5cb2": "{count, plural, one {Tentativa de gerenciar o login do servidor MCP {count} vez} other {Tentativa de gerenciar o login do servidor MCP {count} vezes}}", "7f78d45ac7d49ffa": "{count, plural, one {Listou as tarefas agendadas {count} vez} other {Listou as tarefas agendadas {count} vezes}}", "5cf841526acd9494": "{count, plural, one {Tentou listar as tarefas agendadas {count} vez} other {Tentou listar as tarefas agendadas {count} vezes}}", "a0239a5f1e8f49dc": "{count, plural, one {Verificou a configuração da thread {count} vez} other {Verificou a configuração da thread {count} vezes}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {Usou a integração {names}} other {Usou as integrações {names}}}", "7ed2bff150997c76": "Usou {names}", "7136ebec3019a2ed": "{count, plural, one {Realizou {count} outra ação} other {Realizou {count} outras ações}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {Gerenciando login do servidor MCP} completed {Login do servidor MCP gerenciado} failed {Falha ao gerenciar login do servidor MCP} declined {Gerenciamento do login do servidor MCP recusado} stopped {Gerenciamento do login do servidor MCP interrompido} other {Gerenciando login do servidor MCP}}", "551df12aeaf5ba83": "{status, select, inProgress {Vinculando um pull request} completed {Vinculou um pull request} failed {Falha ao vincular um pull request} declined {Recusou-se a vincular um pull request} stopped {Parou de vincular um pull request} other {Vinculando um pull request}}", "cbb12c435f68cb2f": "{status, select, inProgress {Vinculando {changeRequest} #{number}} completed {Vinculou {changeRequest} #{number}} failed {Falha ao vincular {changeRequest} #{number}} declined {Recusou-se a vincular {changeRequest} #{number}} stopped {Parou de vincular {changeRequest} #{number}} other {Vinculando {changeRequest} #{number}}}", "2f2917c28f02a36e": "{status, select, inProgress {Vinculando pull requests} completed {Vinculou pull requests} failed {Falha ao vincular pull requests} declined {Recusou-se a vincular pull requests} stopped {Parou de vincular pull requests} other {Vinculando pull requests}}", diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json index a8a54a6500e59..28b524c8ab7e6 100644 --- a/apps/web/src/i18n/translations/ru.json +++ b/apps/web/src/i18n/translations/ru.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, one {Попытка проверить статус задачи: {count} раз} few {Попытка проверить статус задачи: {count} раза} many {Попытка проверить статус задачи: {count} раз} other {Попытка проверить статус задачи: {count} раза}}", "9e410f60344c6772": "{count, plural, one {Фоновые ожидания обновлены {count} раз} few {Фоновые ожидания обновлены {count} раза} many {Фоновые ожидания обновлены {count} раз} other {Фоновые ожидания обновлены {count} раза}}", "5ca35b5a769eadcd": "{count, plural, one {Попытка обновить фоновые ожидания: {count} раз} few {Попытка обновить фоновые ожидания: {count} раза} many {Попытка обновить фоновые ожидания: {count} раз} other {Попытка обновить фоновые ожидания: {count} раза}}", + "c65ba57f9f9e3ad3": "Управление входом на сервер MCP: {count}", + "9966bfa08a1d5cb2": "Попытка управления входом на сервер MCP: {count}", "7f78d45ac7d49ffa": "{count, plural, one {Список запланированных задач получен {count} раз} few {Список запланированных задач получен {count} раза} many {Список запланированных задач получен {count} раз} other {Список запланированных задач получен {count} раза}}", "5cf841526acd9494": "{count, plural, one {Попытка получить список запланированных задач: {count} раз} few {Попытка получить список запланированных задач: {count} раза} many {Попытка получить список запланированных задач: {count} раз} other {Попытка получить список запланированных задач: {count} раза}}", "a0239a5f1e8f49dc": "{count, plural, one {Конфигурация треда проверена {count} раз} few {Конфигурация треда проверена {count} раза} many {Конфигурация треда проверена {count} раз} other {Конфигурация треда проверена {count} раза}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {Использована интеграция {names}} other {Использованы интеграции {names}}}", "7ed2bff150997c76": "Использовано: {names}", "7136ebec3019a2ed": "{count, plural, one {Выполнено ещё {count} действие} few {Выполнено ещё {count} действия} many {Выполнено ещё {count} действий} other {Выполнено ещё {count} действия}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {Управление входом на сервер MCP} completed {Вход на сервер MCP обработан} failed {Не удалось обработать вход на сервер MCP} declined {Управление входом на сервер MCP отклонено} stopped {Управление входом на сервер MCP остановлено} other {Управление входом на сервер MCP}}", "551df12aeaf5ba83": "{status, select, inProgress {Привязка пул-реквеста} completed {Пул-реквест привязан} failed {Не удалось привязать пул-реквест} declined {Отклонено: привязка пул-реквеста} stopped {Остановлено: привязка пул-реквеста} other {Привязка пул-реквеста}}", "cbb12c435f68cb2f": "{status, select, inProgress {Привязка {changeRequest} #{number}} completed {{changeRequest} #{number} привязан} failed {Не удалось привязать {changeRequest} #{number}} declined {Отклонено: привязка {changeRequest} #{number}} stopped {Остановлено: привязка {changeRequest} #{number}} other {Привязка {changeRequest} #{number}}}", "2f2917c28f02a36e": "{status, select, inProgress {Привязка пул-реквестов} completed {Пул-реквесты привязаны} failed {Не удалось привязать пул-реквесты} declined {Отклонено: привязка пул-реквестов} stopped {Остановлено: привязка пул-реквестов} other {Привязка пул-реквестов}}", diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json index adaf8566b6411..2e3aa3e7c225f 100644 --- a/apps/web/src/i18n/translations/sv.json +++ b/apps/web/src/i18n/translations/sv.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, one {Försökte kontrollera uppgiftsstatus {count} gång} other {Försökte kontrollera uppgiftsstatus {count} gånger}}", "9e410f60344c6772": "{count, plural, one {Uppdaterade bakgrundsväntan {count} gång} other {Uppdaterade bakgrundsväntan {count} gånger}}", "5ca35b5a769eadcd": "{count, plural, one {Försökte uppdatera bakgrundsväntan {count} gång} other {Försökte uppdatera bakgrundsväntan {count} gånger}}", + "c65ba57f9f9e3ad3": "{count, plural, one {Hanterade MCP-serverinloggning {count} gång} other {Hanterade MCP-serverinloggning {count} gånger}}", + "9966bfa08a1d5cb2": "{count, plural, one {Försökte hantera MCP-serverinloggning {count} gång} other {Försökte hantera MCP-serverinloggning {count} gånger}}", "7f78d45ac7d49ffa": "{count, plural, one {Listade schemalagda uppgifter {count} gång} other {Listade schemalagda uppgifter {count} gånger}}", "5cf841526acd9494": "{count, plural, one {Försökte lista schemalagda uppgifter {count} gång} other {Försökte lista schemalagda uppgifter {count} gånger}}", "a0239a5f1e8f49dc": "{count, plural, one {Kontrollerade trådkonfiguration {count} gång} other {Kontrollerade trådkonfiguration {count} gånger}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {Använde integrationen {names}} other {Använde integrationerna {names}}}", "7ed2bff150997c76": "Använde {names}", "7136ebec3019a2ed": "{count, plural, one {Utförde {count} annan åtgärd} other {Utförde {count} andra åtgärder}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {Hanterar MCP-serverinloggning} completed {Hanterade MCP-serverinloggning} failed {Kunde inte hantera MCP-serverinloggning} declined {Avböjde hantering av MCP-serverinloggning} stopped {Stoppade hantering av MCP-serverinloggning} other {Hanterar MCP-serverinloggning}}", "551df12aeaf5ba83": "{status, select, inProgress {Länkar en pull request} completed {Länkade en pull request} failed {Kunde inte länka en pull request} declined {Avböjde att länka en pull request} stopped {Slutade länka en pull request} other {Länkar en pull request}}", "cbb12c435f68cb2f": "{status, select, inProgress {Länkar {changeRequest} #{number}} completed {Länkade {changeRequest} #{number}} failed {Kunde inte länka {changeRequest} #{number}} declined {Avböjde att länka {changeRequest} #{number}} stopped {Slutade länka {changeRequest} #{number}} other {Länkar {changeRequest} #{number}}}", "2f2917c28f02a36e": "{status, select, inProgress {Länkar pull requests} completed {Länkade pull requests} failed {Kunde inte länka pull requests} declined {Avböjde att länka pull requests} stopped {Slutade länka pull requests} other {Länkar pull requests}}", diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json index f386e717a0614..546ce5a9f3dbf 100644 --- a/apps/web/src/i18n/translations/zh.json +++ b/apps/web/src/i18n/translations/zh.json @@ -225,6 +225,8 @@ "ba261addab1f7b9b": "{count, plural, other {尝试检查任务状态 {count} 次}}", "9e410f60344c6772": "{count, plural, other {已更新后台等待 {count} 次}}", "5ca35b5a769eadcd": "{count, plural, other {尝试更新后台等待 {count} 次}}", + "c65ba57f9f9e3ad3": "管理了 {count} 次 MCP 服务器登录", + "9966bfa08a1d5cb2": "尝试管理 MCP 服务器登录 {count} 次", "7f78d45ac7d49ffa": "{count, plural, other {已列出定时任务 {count} 次}}", "5cf841526acd9494": "{count, plural, other {尝试列出定时任务 {count} 次}}", "a0239a5f1e8f49dc": "{count, plural, other {已检查会话配置 {count} 次}}", @@ -847,6 +849,7 @@ "eb3de8871016043c": "{count, plural, =1 {已使用 {names} 集成} other {已使用 {names} 集成}}", "7ed2bff150997c76": "已使用 {names}", "7136ebec3019a2ed": "{count, plural, other {已执行 {count} 项其他操作}}", + "66ad1ddc2401cf9e": "{status, select, inProgress {正在管理 MCP 服务器登录} completed {已管理 MCP 服务器登录} failed {管理 MCP 服务器登录失败} declined {已拒绝管理 MCP 服务器登录} stopped {已停止管理 MCP 服务器登录} other {正在管理 MCP 服务器登录}}", "551df12aeaf5ba83": "{status, select, inProgress {正在关联 PR} completed {已关联 PR} failed {关联 PR 失败} declined {已拒绝关联 PR} stopped {已停止关联 PR} other {正在关联 PR}}", "cbb12c435f68cb2f": "{status, select, inProgress {正在关联 {changeRequest} #{number}} completed {已关联 {changeRequest} #{number}} failed {关联 {changeRequest} #{number} 失败} declined {已拒绝关联 {changeRequest} #{number}} stopped {已停止关联 {changeRequest} #{number}} other {正在关联 {changeRequest} #{number}}}", "2f2917c28f02a36e": "{status, select, inProgress {正在关联 PR} completed {已关联 PR} failed {关联 PR 失败} declined {已拒绝关联 PR} stopped {已停止关联 PR} other {正在关联 PR}}", diff --git a/docs/user/providers-claude.md b/docs/user/providers-claude.md index 5d4295a942638..ac2c4a3fcc0f9 100644 --- a/docs/user/providers-claude.md +++ b/docs/user/providers-claude.md @@ -109,6 +109,16 @@ To show Claude task lists in the web and desktop apps, add **Environment** section in **Settings > Providers**. Each update shows as a Tasks row in the thread; open it to see every step. +## Sign in to MCP servers + +When an MCP server shows `needs-auth`, ask Claude to sign in to it. Claude +replies with a link; open it and log in. If your browser runs on another machine +than the T3 Code environment, copy the address it ends on after login and paste it +back in the thread. There is no need to run `/mcp` in a terminal. Codex threads +sign in the same way, but there is no address to paste back; see +[Sign in to MCP servers](providers-codex.md#sign-in-to-mcp-servers) for remote +access. + ## Claude in Chrome Claude threads can use the Claude in Chrome extension, which works in your own diff --git a/docs/user/providers-codex.md b/docs/user/providers-codex.md index f77dff53dabbe..b9141d18a0a09 100644 --- a/docs/user/providers-codex.md +++ b/docs/user/providers-codex.md @@ -128,6 +128,14 @@ in the thread on web, desktop, or mobile. Some tools offer access for one reques the current session, or permanently. See [Permission modes](./permission-modes.md) for command and file approvals. +## Sign in to MCP servers + +When an MCP server needs you to log in, ask Codex to sign in to it. Codex replies +with a link; open it and log in. The login finishes on the machine running the +environment, so open the link in a browser on that machine. If you are connected +remotely, forward the port in the link's `redirect_uri` to your own machine first +(for example with `ssh -L`), or log in from the host. + ## Use Daybreak Models with cyber access programs show a Cyber Access option in the model diff --git a/packages/client-runtime/src/t3ToolSummary.ts b/packages/client-runtime/src/t3ToolSummary.ts index be0d4734d5cbf..53342c860bbf5 100644 --- a/packages/client-runtime/src/t3ToolSummary.ts +++ b/packages/client-runtime/src/t3ToolSummary.ts @@ -901,6 +901,23 @@ export function summarizeT3ToolCalls( ); break; } + case "mcp-server": { + const count = selected.length; + label = done + ? resolve( + msg( + "{count, plural, one {Managed MCP server sign-in {count} time} other {Managed MCP server sign-in {count} times}}", + { count }, + ), + ) + : resolve( + msg( + "{count, plural, one {Tried to manage MCP server sign-in {count} time} other {Tried to manage MCP server sign-in {count} times}}", + { count }, + ), + ); + break; + } case "schedule-list": { const count = selected.length; label = done diff --git a/packages/client-runtime/src/work-log/presentation.ts b/packages/client-runtime/src/work-log/presentation.ts index a838bc9794c65..1b6a42077b6a7 100644 --- a/packages/client-runtime/src/work-log/presentation.ts +++ b/packages/client-runtime/src/work-log/presentation.ts @@ -637,6 +637,7 @@ function summaryActionPriority(action: ToolGroupAction | T3McpToolSummaryAction) case "thread-interrupt": case "workflow-stop": case "background-wait": + case "mcp-server": case "schedule-create": case "schedule-update": case "schedule-delete": diff --git a/packages/client-runtime/src/work-log/t3ToolSentences.ts b/packages/client-runtime/src/work-log/t3ToolSentences.ts index 6f635a6f95b7d..812a5d0f719ca 100644 --- a/packages/client-runtime/src/work-log/t3ToolSentences.ts +++ b/packages/client-runtime/src/work-log/t3ToolSentences.ts @@ -15,6 +15,14 @@ export function t3ToolSentence(labels: ReadonlyArray): T3ToolSentence | } const T3_TOOL_SENTENCES: ReadonlyMap = new Map([ + [ + "Manage\nManaging\nManaged\nMCP server sign-in", + { + detail: msg( + "{status, select, inProgress {Managing MCP server sign-in} completed {Managed MCP server sign-in} failed {Failed to manage MCP server sign-in} declined {Declined to manage MCP server sign-in} stopped {Stopped managing MCP server sign-in} other {Managing MCP server sign-in}}", + ), + }, + ], [ "Link\nLinking\nLinked\na pull request", { diff --git a/packages/provider-core/src/server/ProviderAdapter.ts b/packages/provider-core/src/server/ProviderAdapter.ts index 62fe110dd5245..b509919a8e05d 100644 --- a/packages/provider-core/src/server/ProviderAdapter.ts +++ b/packages/provider-core/src/server/ProviderAdapter.ts @@ -691,6 +691,45 @@ export interface ProviderAdapterV2McpApps { }) => Effect.Effect<{ readonly contents: ReadonlyArray }, ProviderAdapterV2Error>; } +export type ProviderAdapterV2McpServerStatus = + | "connected" + | "needs-auth" + | "failed" + | "pending" + | "disabled"; + +/** Sign-in for MCP servers the provider runs itself. The provider keeps the pending sign-in; T3 holds no tokens. */ +export interface ProviderAdapterV2McpServerAuth { + /** Name and status only: tool lists and error text can echo headers. */ + readonly list: (input: { + readonly providerThread: OrchestrationV2ProviderThread; + }) => Effect.Effect< + ReadonlyArray<{ readonly name: string; readonly status: ProviderAdapterV2McpServerStatus }>, + ProviderAdapterV2Error + >; + /** + * No `authorizationUrl` means sign-in finished without the user. + * `callbackExpected`: the browser returns to a listener the user's browser may not reach; see `submitCallback`. + */ + readonly authenticate: (input: { + readonly providerThread: OrchestrationV2ProviderThread; + readonly server: string; + }) => Effect.Effect< + { readonly authorizationUrl?: string; readonly callbackExpected: boolean }, + ProviderAdapterV2Error + >; + /** Absent when the provider only completes sign-in through its own listener. */ + readonly submitCallback?: (input: { + readonly providerThread: OrchestrationV2ProviderThread; + readonly server: string; + readonly callbackUrl: string; + }) => Effect.Effect; + readonly reconnect: (input: { + readonly providerThread: OrchestrationV2ProviderThread; + readonly server: string; + }) => Effect.Effect; +} + export type ProviderAdapterV2SubagentOutcome = { readonly status: "completed" | "failed" | "cancelled"; readonly completedAt: NonNullable; @@ -804,6 +843,8 @@ export interface ProviderAdapterV2SessionRuntime { }) => Effect.Effect<{ readonly feedbackId: string }, ProviderAdapterV2Error>; /** Absent means non-interactive apps with plain tool rows. */ readonly mcpApps?: ProviderAdapterV2McpApps; + /** Absent means the provider cannot sign in to MCP servers for the agent. */ + readonly mcpServerAuth?: ProviderAdapterV2McpServerAuth; readonly rollbackThread: ( input: ProviderAdapterV2RollbackThreadInput, ) => Effect.Effect; diff --git a/packages/shared/src/t3McpToolPresentation.ts b/packages/shared/src/t3McpToolPresentation.ts index e0339e4ffcad7..2376bb3b889eb 100644 --- a/packages/shared/src/t3McpToolPresentation.ts +++ b/packages/shared/src/t3McpToolPresentation.ts @@ -23,6 +23,7 @@ export type T3McpToolSummaryAction = | "thread-interrupt" | "workflow-stop" | "background-wait" + | "mcp-server" | "thread-configuration" | "thread-configure" | "thread-fork" @@ -198,6 +199,7 @@ const T3_MCP_TOOLS: Readonly> = { ["Update", "Updating", "Updated", "background waits"], "background-wait", ), + t3_mcp_server: tool(["Manage", "Managing", "Managed", "MCP server sign-in"], "mcp-server"), t3_thread_interrupt: tool( ["Interrupt", "Interrupting", "Requested an interrupt of", "a T3 thread"], "thread-interrupt",