;
+}
+
function FallbackPreview() {
const { t } = useGalleryTranslation();
const [mode, setMode] = useState<"fallback" | "reauth">("fallback");
@@ -351,6 +372,9 @@ export const conversationExamples: ComponentExample[] = [
{ title: "previews.fallback.title", files: ["thread/ModelFallbackNotice"], Preview: FallbackPreview,
description: "previews.fallback.description", options: "previews.fallback.options",
code: '' },
+ { title: "previews.sandbox.title", files: ["thread/SandboxNotice"], Preview: SandboxPreview,
+ description: "previews.sandbox.description", options: "previews.sandbox.options",
+ code: '' },
{ title: "previews.compaction.title", files: ["thread/ContextCompactionNotice"], Preview: CompactionPreview,
description: "previews.compaction.description", options: "previews.compaction.options",
code: '' },
diff --git a/webui/src/dev/gallery/locales/previews/en.json b/webui/src/dev/gallery/locales/previews/en.json
index 2323b6fc6..8fc6dce4e 100644
--- a/webui/src/dev/gallery/locales/previews/en.json
+++ b/webui/src/dev/gallery/locales/previews/en.json
@@ -179,6 +179,16 @@
"reset": "Reset preview",
"hint": "Select a recovery state, then try continuing or dismissing."
},
+ "sandbox": {
+ "title": "Command notice",
+ "description": "Use the production notice to compare missing components, unprotected installations, and startup failures.",
+ "options": "The notice does not take focus or retry commands. Change its state, dismiss it, and keep typing.",
+ "missing": "Component not found",
+ "permissions": "Installation needs attention",
+ "startup": "Startup unavailable",
+ "hint": "Component demo only. No commands run and no settings change.",
+ "settingsAction": "Requested sandbox settings (demo)."
+ },
"fallback": {
"title": "ModelFallbackNotice · Model fallback",
"description": "View fallback-model and expired-authorization notices, settings and dismissal.",
diff --git a/webui/src/dev/gallery/locales/previews/es.json b/webui/src/dev/gallery/locales/previews/es.json
index a5591df76..65bdfddd3 100644
--- a/webui/src/dev/gallery/locales/previews/es.json
+++ b/webui/src/dev/gallery/locales/previews/es.json
@@ -179,6 +179,16 @@
"reset": "Restablecer vista previa",
"hint": "Elige un estado de recuperación y prueba a continuar o cerrar."
},
+ "sandbox": {
+ "title": "Aviso de comandos",
+ "description": "Compara componentes ausentes, instalaciones sin protección y errores de inicio con el componente real.",
+ "options": "El aviso no toma el foco ni reintenta comandos. Cambia el estado, ciérralo y sigue escribiendo.",
+ "missing": "Componente no encontrado",
+ "permissions": "Revisar instalación",
+ "startup": "Inicio no disponible",
+ "hint": "Solo demostración. No se ejecutan comandos ni se cambian ajustes.",
+ "settingsAction": "Se solicitaron los ajustes del sandbox (demostración)."
+ },
"fallback": {
"title": "ModelFallbackNotice · Modelo alternativo",
"description": "Consulta avisos de modelo alternativo y autorización caducada, configuración y cierre.",
diff --git a/webui/src/dev/gallery/locales/previews/fr.json b/webui/src/dev/gallery/locales/previews/fr.json
index 510c8f240..178910ca6 100644
--- a/webui/src/dev/gallery/locales/previews/fr.json
+++ b/webui/src/dev/gallery/locales/previews/fr.json
@@ -179,6 +179,16 @@
"reset": "Réinitialiser l’aperçu",
"hint": "Sélectionnez un état de reprise, puis essayez de continuer ou de fermer."
},
+ "sandbox": {
+ "title": "Avis de commande",
+ "description": "Comparez les composants manquants, les installations non protégées et les échecs de démarrage avec le composant réel.",
+ "options": "L’avis ne prend pas le focus et ne relance aucune commande. Changez son état, fermez-le et continuez à saisir.",
+ "missing": "Composant introuvable",
+ "permissions": "Installation à vérifier",
+ "startup": "Démarrage indisponible",
+ "hint": "Démonstration uniquement. Aucune commande ni modification des paramètres.",
+ "settingsAction": "Paramètres du bac à sable demandés (démonstration)."
+ },
"fallback": {
"title": "ModelFallbackNotice · Modèle de secours",
"description": "Consultez les avis de modèle de secours et d’autorisation expirée, puis les actions associées.",
diff --git a/webui/src/dev/gallery/locales/previews/id.json b/webui/src/dev/gallery/locales/previews/id.json
index 31ec13341..158db6da3 100644
--- a/webui/src/dev/gallery/locales/previews/id.json
+++ b/webui/src/dev/gallery/locales/previews/id.json
@@ -179,6 +179,16 @@
"reset": "Atur ulang pratinjau",
"hint": "Pilih status pemulihan, lalu coba lanjutkan atau tutup."
},
+ "sandbox": {
+ "title": "Pemberitahuan perintah",
+ "description": "Bandingkan komponen yang hilang, pemasangan tidak terlindungi, dan kegagalan awal dengan komponen produksi.",
+ "options": "Pemberitahuan tidak mengambil fokus atau mengulang perintah. Ubah status, tutup, lalu lanjutkan mengetik.",
+ "missing": "Komponen tidak ditemukan",
+ "permissions": "Pemasangan perlu diperiksa",
+ "startup": "Tidak dapat dimulai",
+ "hint": "Hanya demo komponen. Tidak ada perintah atau perubahan pengaturan.",
+ "settingsAction": "Pengaturan sandbox diminta (demo)."
+ },
"fallback": {
"title": "ModelFallbackNotice · Model cadangan",
"description": "Lihat pemberitahuan model cadangan dan otorisasi kedaluwarsa, lalu coba pengaturan atau tutup.",
diff --git a/webui/src/dev/gallery/locales/previews/ja.json b/webui/src/dev/gallery/locales/previews/ja.json
index 619a08097..5cebe526c 100644
--- a/webui/src/dev/gallery/locales/previews/ja.json
+++ b/webui/src/dev/gallery/locales/previews/ja.json
@@ -179,6 +179,16 @@
"reset": "プレビューをリセット",
"hint": "復旧状態を選び、続行または閉じる操作を試してください。"
},
+ "sandbox": {
+ "title": "コマンドの通知",
+ "description": "実際のコンポーネントで、コンポーネントの欠落、保護されていないインストール、起動失敗を比較します。",
+ "options": "通知はフォーカスを奪わず、コマンドを再実行しません。状態を切り替え、閉じて入力を続けられます。",
+ "missing": "コンポーネントが見つからない",
+ "permissions": "インストールの確認が必要",
+ "startup": "起動できない",
+ "hint": "コンポーネントのデモです。コマンドの実行や設定の変更は行いません。",
+ "settingsAction": "サンドボックス設定を開く操作(デモ)。"
+ },
"fallback": {
"title": "ModelFallbackNotice · 代替モデル",
"description": "代替モデルや認証期限切れの通知、設定と閉じる操作を確認できます。",
diff --git a/webui/src/dev/gallery/locales/previews/ko.json b/webui/src/dev/gallery/locales/previews/ko.json
index 8d82f4a99..40894fc46 100644
--- a/webui/src/dev/gallery/locales/previews/ko.json
+++ b/webui/src/dev/gallery/locales/previews/ko.json
@@ -179,6 +179,16 @@
"reset": "미리보기 초기화",
"hint": "복구 상태를 선택한 후 계속하거나 닫아 보세요."
},
+ "sandbox": {
+ "title": "명령 알림",
+ "description": "실제 구성 요소로 누락된 구성 요소, 보호되지 않은 설치 위치, 시작 실패를 비교합니다.",
+ "options": "알림은 포커스를 가져오거나 명령을 재시도하지 않습니다. 상태를 바꾸고 닫은 후 계속 입력할 수 있습니다.",
+ "missing": "구성 요소 없음",
+ "permissions": "설치 확인 필요",
+ "startup": "시작 불가",
+ "hint": "구성 요소 데모입니다. 명령 실행이나 설정 변경은 없습니다.",
+ "settingsAction": "샌드박스 설정 열기 요청(데모)."
+ },
"fallback": {
"title": "ModelFallbackNotice · 대체 모델",
"description": "대체 모델과 인증 만료 알림, 설정 열기, 닫기를 확인합니다.",
diff --git a/webui/src/dev/gallery/locales/previews/pt-BR.json b/webui/src/dev/gallery/locales/previews/pt-BR.json
index 609390b9c..22afe44dc 100644
--- a/webui/src/dev/gallery/locales/previews/pt-BR.json
+++ b/webui/src/dev/gallery/locales/previews/pt-BR.json
@@ -179,6 +179,16 @@
"reset": "Redefinir prévia",
"hint": "Selecione um estado de recuperação e teste continuar ou fechar."
},
+ "sandbox": {
+ "title": "Aviso de comandos",
+ "description": "Compare componentes ausentes, instalações desprotegidas e falhas de inicialização com o componente real.",
+ "options": "O aviso não toma o foco nem repete comandos. Mude o estado, feche-o e continue digitando.",
+ "missing": "Componente não encontrado",
+ "permissions": "Verificar instalação",
+ "startup": "Inicialização indisponível",
+ "hint": "Apenas demonstração. Nenhum comando é executado ou ajuste alterado.",
+ "settingsAction": "Configurações do sandbox solicitadas (demonstração)."
+ },
"fallback": {
"title": "ModelFallbackNotice · Modelo alternativo",
"description": "Veja avisos de modelo alternativo e autorização expirada, configurações e fechamento.",
diff --git a/webui/src/dev/gallery/locales/previews/vi.json b/webui/src/dev/gallery/locales/previews/vi.json
index 942c6346f..7c880d0d0 100644
--- a/webui/src/dev/gallery/locales/previews/vi.json
+++ b/webui/src/dev/gallery/locales/previews/vi.json
@@ -179,6 +179,16 @@
"reset": "Đặt lại bản xem trước",
"hint": "Chọn trạng thái khôi phục, rồi thử tiếp tục hoặc đóng."
},
+ "sandbox": {
+ "title": "Thông báo lệnh",
+ "description": "So sánh thành phần bị thiếu, vị trí cài đặt không được bảo vệ và lỗi khởi động bằng thành phần thực tế.",
+ "options": "Thông báo không chiếm tiêu điểm hay tự chạy lại lệnh. Đổi trạng thái, đóng thông báo rồi tiếp tục nhập.",
+ "missing": "Không tìm thấy thành phần",
+ "permissions": "Cần kiểm tra cài đặt",
+ "startup": "Không thể khởi động",
+ "hint": "Chỉ minh họa thành phần. Không chạy lệnh hay thay đổi cài đặt.",
+ "settingsAction": "Đã yêu cầu mở cài đặt sandbox (minh họa)."
+ },
"fallback": {
"title": "ModelFallbackNotice · Mô hình dự phòng",
"description": "Xem thông báo mô hình dự phòng, ủy quyền hết hạn và thử mở cài đặt hoặc đóng.",
diff --git a/webui/src/dev/gallery/locales/previews/zh-CN.json b/webui/src/dev/gallery/locales/previews/zh-CN.json
index e32949310..f26510917 100644
--- a/webui/src/dev/gallery/locales/previews/zh-CN.json
+++ b/webui/src/dev/gallery/locales/previews/zh-CN.json
@@ -179,6 +179,16 @@
"reset": "重置预览",
"hint": "选择恢复状态,再试用继续或关闭。"
},
+ "sandbox": {
+ "title": "命令提示",
+ "description": "使用正式提示组件,体验缺失组件、安装位置受限和启动异常三种状态。",
+ "options": "提示不抢焦点,也不自动重试命令。可切换状态、关闭提示并继续输入。",
+ "missing": "找不到组件",
+ "permissions": "安装位置受限",
+ "startup": "启动异常",
+ "hint": "这里只演示组件,不会执行命令或修改设置。",
+ "settingsAction": "已请求打开沙箱设置(演示)。"
+ },
"fallback": {
"title": "ModelFallbackNotice · 模型回退",
"description": "查看模型回退和授权失效提示。",
diff --git a/webui/src/dev/gallery/locales/previews/zh-TW.json b/webui/src/dev/gallery/locales/previews/zh-TW.json
index 808585590..103945a8c 100644
--- a/webui/src/dev/gallery/locales/previews/zh-TW.json
+++ b/webui/src/dev/gallery/locales/previews/zh-TW.json
@@ -179,6 +179,16 @@
"reset": "重設預覽",
"hint": "選擇復原狀態,再試用繼續或關閉。"
},
+ "sandbox": {
+ "title": "指令提示",
+ "description": "使用正式提示元件,體驗缺少元件、安裝位置受限與啟動異常三種狀態。",
+ "options": "提示不會搶焦點,也不會自動重試指令。可切換狀態、關閉提示並繼續輸入。",
+ "missing": "找不到元件",
+ "permissions": "安裝位置受限",
+ "startup": "啟動異常",
+ "hint": "這裡僅示範元件,不會執行指令或修改設定。",
+ "settingsAction": "已要求開啟沙箱設定(示範)。"
+ },
"fallback": {
"title": "ModelFallbackNotice · 模型備援",
"description": "查看備援模型與授權失效提示。",
diff --git a/webui/src/i18n/locales/en/common.json b/webui/src/i18n/locales/en/common.json
index 672cd10dd..1019278f9 100644
--- a/webui/src/i18n/locales/en/common.json
+++ b/webui/src/i18n/locales/en/common.json
@@ -486,7 +486,7 @@
"checking": "Checking…",
"scope": "Checks the saved launcher with temporary test files only. This is not a full security audit. Restart the gateway to apply saved changes to command execution.",
"path": "Trusted launcher path",
- "pathHelp": "Optional absolute path to a launcher from a trusted publisher. The file and its parent directories must be root-owned and not group- or world-writable, and outside writable agent paths. Leave blank for system lookup.",
+ "pathHelp": "Usually leave this blank for system lookup. For a custom installation, ask the package maintainer for the full launcher path. The file and its parent directories must be root-owned and not group- or world-writable, and outside writable agent paths.",
"automatic": "System lookup",
"checkError": "Could not complete the check. Reopen settings and try again.",
"saveError": "Could not save. Keep your draft and try again.",
@@ -494,6 +494,14 @@
"disableHelp": "After restart, commands run with the gateway account’s permissions. File tools also lose the workspace restriction supplied by this sandbox; independently configured restrictions still apply.",
"keep": "Keep isolation",
"disable": "Turn off isolation",
+ "notice": {
+ "title": "Commands need attention",
+ "missing": "The command component could not be found. Check its installation; you can keep chatting.",
+ "path": "The configured command component is unavailable. Check its location and access permissions.",
+ "permissions": "The command component is not in a protected location. Contact the package maintainer or administrator.",
+ "startup": "The isolation environment could not start. Check the installation and system restrictions.",
+ "openSettings": "Check settings"
+ },
"states": {
"disabled": "Commands disabled",
"off": "Isolation off",
diff --git a/webui/src/i18n/locales/es/common.json b/webui/src/i18n/locales/es/common.json
index 3484a390c..4d1a8afd6 100644
--- a/webui/src/i18n/locales/es/common.json
+++ b/webui/src/i18n/locales/es/common.json
@@ -486,7 +486,7 @@
"checking": "Comprobando…",
"scope": "Solo prueba el lanzador guardado con archivos temporales. No es una auditoría de seguridad completa. Reinicia la puerta de enlace para aplicar los cambios a los comandos.",
"path": "Ruta del lanzador de confianza",
- "pathHelp": "Ruta absoluta opcional de un lanzador de confianza. El archivo y sus directorios padre deben ser de root, sin escritura para grupos u otros usuarios, y estar fuera de las rutas de escritura del agente. Déjala vacía para buscar en el sistema.",
+ "pathHelp": "Normalmente, déjala vacía para buscar en el sistema. Para una instalación personalizada, pide la ruta completa del lanzador al responsable del paquete. El archivo y sus directorios padre deben ser de root, sin escritura para grupos u otros usuarios, y estar fuera de las rutas de escritura del agente.",
"automatic": "Búsqueda del sistema",
"checkError": "No se pudo completar la prueba. Abre los ajustes de nuevo y reinténtalo.",
"saveError": "No se pudo guardar. El borrador se conserva; vuelve a intentarlo.",
@@ -494,6 +494,14 @@
"disableHelp": "Tras reiniciar, los comandos usarán los permisos de la cuenta de la puerta de enlace. Las herramientas de archivos también perderán la restricción de espacio de trabajo de este sandbox; las restricciones independientes se mantienen.",
"keep": "Mantener aislamiento",
"disable": "Desactivar aislamiento",
+ "notice": {
+ "title": "Los comandos requieren atención",
+ "missing": "No se encontró el componente de ejecución. Revisa su instalación; puedes seguir chateando.",
+ "path": "El componente configurado no está disponible. Revisa su ubicación y permisos de acceso.",
+ "permissions": "El componente no está en una ubicación protegida. Contacta al responsable del paquete o al administrador.",
+ "startup": "El entorno de aislamiento no pudo iniciarse. Revisa la instalación y las restricciones del sistema.",
+ "openSettings": "Revisar ajustes"
+ },
"states": {
"disabled": "Comandos desactivados",
"off": "Sin aislamiento",
diff --git a/webui/src/i18n/locales/fr/common.json b/webui/src/i18n/locales/fr/common.json
index a0737a277..58e7adbff 100644
--- a/webui/src/i18n/locales/fr/common.json
+++ b/webui/src/i18n/locales/fr/common.json
@@ -486,7 +486,7 @@
"checking": "Vérification…",
"scope": "Teste uniquement le lanceur enregistré avec des fichiers temporaires. Ce n’est pas un audit de sécurité complet. Redémarrez la passerelle pour appliquer les changements aux commandes.",
"path": "Chemin du lanceur de confiance",
- "pathHelp": "Chemin absolu facultatif d’un lanceur de confiance. Le fichier et ses dossiers parents doivent appartenir à root, sans écriture pour le groupe ou les autres utilisateurs, hors des chemins modifiables par l’agent. Laissez vide pour la recherche système.",
+ "pathHelp": "Laissez généralement ce champ vide pour la recherche système. Pour une installation personnalisée, demandez le chemin complet du lanceur au responsable du paquet. Le fichier et ses dossiers parents doivent appartenir à root, sans écriture pour le groupe ou les autres utilisateurs, hors des chemins modifiables par l’agent.",
"automatic": "Recherche système",
"checkError": "La vérification a échoué. Rouvrez les paramètres et réessayez.",
"saveError": "Enregistrement impossible. Le brouillon est conservé ; réessayez.",
@@ -494,6 +494,14 @@
"disableHelp": "Après redémarrage, les commandes utiliseront les droits du compte de la passerelle. Les outils de fichiers perdront aussi la restriction d’espace de travail fournie par ce bac à sable ; les restrictions indépendantes restent actives.",
"keep": "Garder l’isolation",
"disable": "Désactiver l’isolation",
+ "notice": {
+ "title": "Les commandes nécessitent une vérification",
+ "missing": "Le composant d’exécution est introuvable. Vérifiez son installation ; vous pouvez continuer à discuter.",
+ "path": "Le composant configuré est indisponible. Vérifiez son emplacement et ses droits d’accès.",
+ "permissions": "Le composant n’est pas dans un emplacement protégé. Contactez le responsable du paquet ou l’administrateur.",
+ "startup": "L’environnement isolé n’a pas pu démarrer. Vérifiez l’installation et les restrictions du système.",
+ "openSettings": "Vérifier les paramètres"
+ },
"states": {
"disabled": "Commandes désactivées",
"off": "Sans isolation",
diff --git a/webui/src/i18n/locales/id/common.json b/webui/src/i18n/locales/id/common.json
index 1ba0931c6..981fbbfc5 100644
--- a/webui/src/i18n/locales/id/common.json
+++ b/webui/src/i18n/locales/id/common.json
@@ -486,7 +486,7 @@
"checking": "Memeriksa…",
"scope": "Hanya menguji peluncur tersimpan dengan berkas sementara. Ini bukan audit keamanan lengkap. Mulai ulang gateway untuk menerapkan perubahan ke eksekusi perintah.",
"path": "Jalur peluncur tepercaya",
- "pathHelp": "Jalur absolut opsional ke peluncur dari penerbit tepercaya. Berkas dan direktori induk harus dimiliki root, tidak dapat ditulis grup/pengguna lain, dan di luar jalur tulis agen. Kosongkan untuk pencarian sistem.",
+ "pathHelp": "Biasanya biarkan kosong untuk pencarian sistem. Untuk instalasi khusus, minta jalur lengkap peluncur kepada pengelola paket. Berkas dan direktori induk harus dimiliki root, tidak dapat ditulis grup/pengguna lain, dan di luar jalur tulis agen.",
"automatic": "Pencarian sistem",
"checkError": "Pemeriksaan gagal. Buka ulang pengaturan dan coba lagi.",
"saveError": "Gagal menyimpan. Draf tetap tersimpan; coba lagi.",
@@ -494,6 +494,14 @@
"disableHelp": "Setelah mulai ulang, perintah berjalan dengan izin akun gateway. Alat berkas juga kehilangan pembatasan ruang kerja dari sandbox ini; pembatasan yang diatur terpisah tetap berlaku.",
"keep": "Pertahankan isolasi",
"disable": "Nonaktifkan isolasi",
+ "notice": {
+ "title": "Perintah perlu diperiksa",
+ "missing": "Komponen eksekusi tidak ditemukan. Periksa pemasangannya; Anda tetap dapat mengobrol.",
+ "path": "Komponen yang dikonfigurasi tidak tersedia. Periksa lokasi dan izin aksesnya.",
+ "permissions": "Komponen tidak berada di lokasi terlindungi. Hubungi pengelola paket atau administrator.",
+ "startup": "Lingkungan isolasi tidak dapat dimulai. Periksa pemasangan dan pembatasan sistem.",
+ "openSettings": "Periksa pengaturan"
+ },
"states": {
"disabled": "Perintah nonaktif",
"off": "Isolasi nonaktif",
diff --git a/webui/src/i18n/locales/ja/common.json b/webui/src/i18n/locales/ja/common.json
index 202d07ebc..478a14780 100644
--- a/webui/src/i18n/locales/ja/common.json
+++ b/webui/src/i18n/locales/ja/common.json
@@ -486,7 +486,7 @@
"checking": "確認中…",
"scope": "一時ファイルのみで保存済みのランチャーを確認します。完全なセキュリティ監査ではありません。コマンドに設定を適用するにはゲートウェイを再起動してください。",
"path": "信頼するランチャーのパス",
- "pathHelp": "信頼する提供元のランチャーの絶対パス(任意)。ファイルと親ディレクトリは root 所有で、グループや他のユーザーが書き込めず、Agent の書き込み範囲外である必要があります。空欄はシステム検索です。",
+ "pathHelp": "通常は空欄のままシステム検索を使います。独自のインストールでは、パッケージ管理者にランチャーの完全なパスを確認してください。ファイルと親ディレクトリは root 所有で、グループや他のユーザーが書き込めず、Agent の書き込み範囲外である必要があります。",
"automatic": "システム検索",
"checkError": "確認できませんでした。設定を開き直して再試行してください。",
"saveError": "保存できませんでした。下書きを保持しています。再試行してください。",
@@ -494,6 +494,14 @@
"disableHelp": "再起動後、コマンドはゲートウェイのアカウント権限で実行されます。ファイルツールも、このサンドボックスによる作業領域の制限を失います。個別に設定した制限は引き続き適用されます。",
"keep": "隔離を維持",
"disable": "隔離を無効化",
+ "notice": {
+ "title": "コマンドの設定を確認してください",
+ "missing": "コマンド実行コンポーネントが見つかりません。インストール先を確認してください。チャットは続けられます。",
+ "path": "設定された実行コンポーネントを利用できません。場所とアクセス権を確認してください。",
+ "permissions": "実行コンポーネントが保護された場所にありません。パッケージの管理者またはシステム管理者に連絡してください。",
+ "startup": "隔離環境を起動できませんでした。インストールとシステムの制限を確認してください。",
+ "openSettings": "設定を確認"
+ },
"states": {
"disabled": "コマンド無効",
"off": "隔離なし",
diff --git a/webui/src/i18n/locales/ko/common.json b/webui/src/i18n/locales/ko/common.json
index 047ebf1f9..067e5da2d 100644
--- a/webui/src/i18n/locales/ko/common.json
+++ b/webui/src/i18n/locales/ko/common.json
@@ -486,7 +486,7 @@
"checking": "확인 중…",
"scope": "임시 파일만 사용해 저장된 실행기를 확인합니다. 전체 보안 감사가 아닙니다. 명령 실행에 저장된 설정을 적용하려면 게이트웨이를 다시 시작하세요.",
"path": "신뢰할 실행기 경로",
- "pathHelp": "신뢰하는 배포자의 실행기 절대 경로(선택 사항). 파일과 상위 폴더는 root 소유여야 하며 그룹·다른 사용자가 쓸 수 없고 Agent 쓰기 범위 밖이어야 합니다. 비워 두면 시스템에서 찾습니다.",
+ "pathHelp": "보통은 비워 두고 시스템에서 찾도록 합니다. 사용자 지정 설치는 패키지 관리자에게 실행기의 전체 경로를 문의하세요. 파일과 상위 폴더는 root 소유여야 하며 그룹·다른 사용자가 쓸 수 없고 Agent 쓰기 범위 밖이어야 합니다.",
"automatic": "시스템에서 찾기",
"checkError": "확인하지 못했습니다. 설정을 다시 열고 재시도하세요.",
"saveError": "저장하지 못했습니다. 초안을 유지했습니다. 다시 시도하세요.",
@@ -494,6 +494,14 @@
"disableHelp": "다시 시작하면 게이트웨이 계정 권한으로 명령을 실행합니다. 파일 도구도 이 샌드박스가 제공한 작업 영역 제한을 잃습니다. 별도로 설정한 제한은 유지됩니다.",
"keep": "격리 유지",
"disable": "격리 끄기",
+ "notice": {
+ "title": "명령 설정을 확인해 주세요",
+ "missing": "명령 실행 구성 요소를 찾을 수 없습니다. 설치 위치를 확인해 주세요. 대화는 계속할 수 있습니다.",
+ "path": "설정된 실행 구성 요소를 사용할 수 없습니다. 위치와 접근 권한을 확인해 주세요.",
+ "permissions": "실행 구성 요소가 보호된 위치에 없습니다. 패키지 관리자나 시스템 관리자에게 문의해 주세요.",
+ "startup": "격리 환경을 시작할 수 없습니다. 설치와 시스템 제한을 확인해 주세요.",
+ "openSettings": "설정 확인"
+ },
"states": {
"disabled": "명령 비활성화",
"off": "격리 꺼짐",
diff --git a/webui/src/i18n/locales/pt-BR/common.json b/webui/src/i18n/locales/pt-BR/common.json
index cd368f66a..42f2ae942 100644
--- a/webui/src/i18n/locales/pt-BR/common.json
+++ b/webui/src/i18n/locales/pt-BR/common.json
@@ -486,7 +486,7 @@
"checking": "Verificando…",
"scope": "Testa apenas o iniciador salvo com arquivos temporários. Não é uma auditoria completa de segurança. Reinicie o gateway para aplicar as alterações aos comandos.",
"path": "Caminho do iniciador confiável",
- "pathHelp": "Caminho absoluto opcional de um iniciador confiável. O arquivo e as pastas superiores devem pertencer ao root, sem escrita por grupos ou outros usuários, fora dos caminhos graváveis pelo agente. Deixe vazio para busca no sistema.",
+ "pathHelp": "Normalmente, deixe vazio para busca no sistema. Para uma instalação personalizada, peça o caminho completo do iniciador ao mantenedor do pacote. O arquivo e as pastas superiores devem pertencer ao root, sem escrita por grupos ou outros usuários, fora dos caminhos graváveis pelo agente.",
"automatic": "Busca no sistema",
"checkError": "Não foi possível verificar. Reabra as configurações e tente novamente.",
"saveError": "Não foi possível salvar. O rascunho foi mantido; tente novamente.",
@@ -494,6 +494,14 @@
"disableHelp": "Após reiniciar, os comandos usarão as permissões da conta do gateway. As ferramentas de arquivos também perderão a restrição de espaço de trabalho deste sandbox; as restrições independentes continuam ativas.",
"keep": "Manter isolamento",
"disable": "Desativar isolamento",
+ "notice": {
+ "title": "Os comandos precisam de atenção",
+ "missing": "O componente de execução não foi encontrado. Verifique a instalação; você pode continuar conversando.",
+ "path": "O componente configurado está indisponível. Verifique o local e as permissões de acesso.",
+ "permissions": "O componente não está em um local protegido. Entre em contato com o responsável pelo pacote ou administrador.",
+ "startup": "O ambiente de isolamento não pôde iniciar. Verifique a instalação e as restrições do sistema.",
+ "openSettings": "Verificar configurações"
+ },
"states": {
"disabled": "Comandos desativados",
"off": "Isolamento desativado",
diff --git a/webui/src/i18n/locales/vi/common.json b/webui/src/i18n/locales/vi/common.json
index 864c5ffff..b36650164 100644
--- a/webui/src/i18n/locales/vi/common.json
+++ b/webui/src/i18n/locales/vi/common.json
@@ -486,7 +486,7 @@
"checking": "Đang kiểm tra…",
"scope": "Chỉ kiểm tra trình khởi chạy đã lưu bằng tệp tạm. Đây không phải kiểm toán bảo mật đầy đủ. Khởi động lại gateway để áp dụng thay đổi cho lệnh.",
"path": "Đường dẫn trình khởi chạy tin cậy",
- "pathHelp": "Đường dẫn tuyệt đối tùy chọn từ nhà phát hành tin cậy. Tệp và thư mục cha phải thuộc root, không cho nhóm/người khác ghi, và nằm ngoài vùng ghi của Agent. Để trống để tìm trong hệ thống.",
+ "pathHelp": "Thông thường hãy để trống để tìm trong hệ thống. Với cài đặt tùy chỉnh, hãy hỏi người duy trì gói về đường dẫn đầy đủ của trình khởi chạy. Tệp và thư mục cha phải thuộc root, không cho nhóm/người khác ghi, và nằm ngoài vùng ghi của Agent.",
"automatic": "Tìm trong hệ thống",
"checkError": "Chưa kiểm tra được. Mở lại cài đặt và thử lại.",
"saveError": "Không lưu được. Bản nháp được giữ lại; hãy thử lại.",
@@ -494,6 +494,14 @@
"disableHelp": "Sau khi khởi động lại, lệnh chạy với quyền tài khoản gateway. Công cụ tệp cũng mất giới hạn vùng làm việc do sandbox này cung cấp; các giới hạn được đặt riêng vẫn có hiệu lực.",
"keep": "Giữ cô lập",
"disable": "Tắt cô lập",
+ "notice": {
+ "title": "Cần kiểm tra lệnh",
+ "missing": "Không tìm thấy thành phần thực thi lệnh. Hãy kiểm tra cài đặt; bạn vẫn có thể trò chuyện.",
+ "path": "Không thể sử dụng thành phần đã cấu hình. Hãy kiểm tra vị trí và quyền truy cập.",
+ "permissions": "Thành phần thực thi không nằm ở vị trí được bảo vệ. Hãy liên hệ người bảo trì gói hoặc quản trị viên.",
+ "startup": "Không thể khởi động môi trường cách ly. Hãy kiểm tra cài đặt và các hạn chế của hệ thống.",
+ "openSettings": "Kiểm tra cài đặt"
+ },
"states": {
"disabled": "Đã tắt lệnh",
"off": "Không cô lập",
diff --git a/webui/src/i18n/locales/zh-CN/common.json b/webui/src/i18n/locales/zh-CN/common.json
index f1c44f2da..2ac62112d 100644
--- a/webui/src/i18n/locales/zh-CN/common.json
+++ b/webui/src/i18n/locales/zh-CN/common.json
@@ -486,7 +486,7 @@
"checking": "检测中…",
"scope": "仅使用临时文件检测已保存的启动器,不代表完整安全审计。保存后需重启网关,命令执行才会使用新配置。",
"path": "可信启动器路径",
- "pathHelp": "可选,填写可信来源启动器的绝对路径。文件及上级目录须归 root 所有、不可被组或其他用户写入,且不在 Agent 可写范围内。留空则使用系统查找。",
+ "pathHelp": "通常留空,由系统自动查找。特殊安装请向安装包维护者索取启动器的完整路径。文件及上级目录须归 root 所有、不可被组或其他用户写入,且不在 Agent 可写范围内。",
"automatic": "系统自动查找",
"checkError": "检测未完成,请重新打开设置后重试。",
"saveError": "保存失败,草稿已保留,请重试。",
@@ -494,6 +494,14 @@
"disableHelp": "重启后,命令将以网关账号的权限直接运行。文件工具也会失去此沙箱附带的目录限制;单独设置的目录限制仍然保留。",
"keep": "保留隔离",
"disable": "关闭隔离",
+ "notice": {
+ "title": "命令暂时不可用",
+ "missing": "未找到命令运行组件。请检查安装位置,聊天仍可继续。",
+ "path": "配置的运行组件路径不可用。请检查位置和访问权限。",
+ "permissions": "运行组件所在位置不符合安全要求。请联系安装包维护者或管理员。",
+ "startup": "隔离环境未能启动。请检查安装和系统限制。",
+ "openSettings": "检查设置"
+ },
"states": {
"disabled": "命令已停用",
"off": "未隔离",
diff --git a/webui/src/i18n/locales/zh-TW/common.json b/webui/src/i18n/locales/zh-TW/common.json
index e132d2ea9..3aa88e3c6 100644
--- a/webui/src/i18n/locales/zh-TW/common.json
+++ b/webui/src/i18n/locales/zh-TW/common.json
@@ -486,7 +486,7 @@
"checking": "檢測中…",
"scope": "僅使用暫存檔檢測已儲存的啟動器,不代表完整安全稽核。儲存後須重新啟動閘道,命令執行才會使用新設定。",
"path": "可信啟動器路徑",
- "pathHelp": "選填可信來源啟動器的絕對路徑。檔案及上層目錄須由 root 擁有、不可供群組或其他使用者寫入,且不在 Agent 可寫範圍內。留空則使用系統查找。",
+ "pathHelp": "通常留空,由系統自動查找。特殊安裝請向安裝套件維護者索取啟動器的完整路徑。檔案及上層目錄須由 root 擁有、不可供群組或其他使用者寫入,且不在 Agent 可寫範圍內。",
"automatic": "系統自動查找",
"checkError": "檢測未完成,請重新開啟設定後再試。",
"saveError": "儲存失敗,草稿已保留,請再試。",
@@ -494,6 +494,14 @@
"disableHelp": "重新啟動後,命令將以閘道帳號的權限直接執行。檔案工具也會失去此沙箱附帶的目錄限制;獨立設定的目錄限制仍然保留。",
"keep": "保留隔離",
"disable": "關閉隔離",
+ "notice": {
+ "title": "指令暫時無法使用",
+ "missing": "找不到指令執行元件。請檢查安裝位置,仍可繼續聊天。",
+ "path": "設定的執行元件路徑無法使用。請檢查位置與存取權限。",
+ "permissions": "執行元件所在位置不符合安全要求。請聯絡安裝套件維護者或管理員。",
+ "startup": "無法啟動隔離環境。請檢查安裝與系統限制。",
+ "openSettings": "檢查設定"
+ },
"states": {
"disabled": "命令已停用",
"off": "未隔離",
diff --git a/webui/src/lib/types.ts b/webui/src/lib/types.ts
index b0ae74951..70a8028c1 100644
--- a/webui/src/lib/types.ts
+++ b/webui/src/lib/types.ts
@@ -453,6 +453,8 @@ export interface ToolProgressEvent {
arguments?: unknown;
result?: unknown;
error?: unknown;
+ /** Gateway-owned classification; never inferred from command output. */
+ error_code?: string;
files?: unknown[];
embeds?: unknown[];
}
diff --git a/webui/src/tests/sandbox-notice.test.tsx b/webui/src/tests/sandbox-notice.test.tsx
new file mode 100644
index 000000000..98b6cc216
--- /dev/null
+++ b/webui/src/tests/sandbox-notice.test.tsx
@@ -0,0 +1,110 @@
+import { act, fireEvent, render, screen } from "@testing-library/react";
+import { describe, expect, it, vi } from "vitest";
+
+import { SandboxNotice } from "@/components/thread/SandboxNotice";
+import { useSandboxNotice } from "@/components/thread/useSandboxNotice";
+import type { NanobotClient } from "@/lib/nanobot-client";
+import type { InboundEvent, ToolProgressEvent } from "@/lib/types";
+import { createStreamClient } from "./stream-client";
+
+function Harness({ client, chatId = "sandbox-chat", enabled = true, onOpen = () => {} }: {
+ client: NanobotClient;
+ chatId?: string;
+ enabled?: boolean;
+ onOpen?: () => void;
+}) {
+ const notice = useSandboxNotice(client, chatId, enabled);
+ return <>
+
+ {notice.issue ? : null}
+ >;
+}
+
+function start(receive: (event: InboundEvent) => void, turnId = "turn-one") {
+ receive({ event: "user_message", chat_id: "sandbox-chat", turn_id: turnId, starts_turn: true, text: "Run a command" });
+}
+
+function tool(receive: (event: InboundEvent) => void, values: Partial = {}, turnId = "turn-one") {
+ receive({ event: "message", chat_id: "sandbox-chat", turn_id: turnId, text: "", kind: "progress",
+ tool_events: [{ name: "exec", phase: "error", call_id: "command-one", error_code: "sandbox_launcher_missing", ...values }] });
+}
+
+describe("Live sandbox guidance", () => {
+ it.each([
+ ["sandbox_path_unavailable", "Check its location and access permissions"],
+ ["sandbox_start_failed", "Check the installation and system restrictions"],
+ ])("explains the known launcher failure %s", (error_code, copy) => {
+ const { client, receive } = createStreamClient();
+ render();
+ act(() => { start(receive); tool(receive, { error_code }); });
+ expect(screen.getByRole("status")).toHaveTextContent(copy);
+ });
+ it("uses structured errors, keeps input focus, and offers one explicit recovery action", () => {
+ const { client, receive } = createStreamClient();
+ const onOpen = vi.fn();
+ render();
+ const draft = screen.getByRole("textbox", { name: "Draft" });
+ draft.focus();
+ act(() => {
+ start(receive);
+ tool(receive, { error_code: undefined, error: "Error: sandbox launcher not found: bwrap" });
+ tool(receive, { error_code: "__proto__" });
+ tool(receive, { name: "write_file" });
+ });
+ expect(screen.queryByRole("status")).not.toBeInTheDocument();
+ act(() => tool(receive));
+ expect(screen.getByRole("status")).toHaveAttribute("aria-live", "polite");
+ expect(draft).toHaveFocus();
+ expect(draft).toHaveValue("Keep my draft");
+ expect(onOpen).not.toHaveBeenCalled();
+ fireEvent.click(screen.getByRole("button", { name: "Check settings" }));
+ expect(onOpen).toHaveBeenCalledOnce();
+ });
+
+ it("keeps a repeated failure dismissed for the turn and clears it after a real successful command", () => {
+ const { client, receive } = createStreamClient();
+ render();
+ act(() => { start(receive); tool(receive); });
+ fireEvent.click(screen.getByRole("button", { name: "Dismiss" }));
+ act(() => tool(receive, { call_id: "command-two" }));
+ expect(screen.queryByRole("status")).not.toBeInTheDocument();
+ act(() => {
+ receive({ event: "turn_end", chat_id: "sandbox-chat", turn_id: "turn-one" });
+ start(receive, "turn-two");
+ tool(receive, { call_id: "command-three" }, "turn-two");
+ });
+ expect(screen.getByRole("status")).toBeVisible();
+ act(() => tool(receive, { phase: "end", error_code: undefined }, "turn-two"));
+ expect(screen.queryByRole("status")).not.toBeInTheDocument();
+ act(() => tool(receive, { call_id: "late-command" }));
+ expect(screen.queryByRole("status")).not.toBeInTheDocument();
+ });
+
+ it("does not replay old failures when opening a chat or enable controls for old hosts", () => {
+ const { client, receive } = createStreamClient();
+ start(receive);
+ tool(receive);
+ const view = render();
+ expect(screen.queryByRole("status")).not.toBeInTheDocument();
+ view.rerender();
+ expect(screen.queryByRole("status")).not.toBeInTheDocument();
+ act(() => tool(receive));
+ expect(screen.getByRole("status")).toBeVisible();
+ });
+
+ it("does not carry a notice or its action into another host or chat", () => {
+ const first = createStreamClient();
+ const second = createStreamClient();
+ const view = render();
+ act(() => { start(first.receive); tool(first.receive); });
+ expect(screen.getByRole("status")).toBeVisible();
+ view.rerender();
+ expect(screen.queryByRole("status")).not.toBeInTheDocument();
+ act(() => tool(first.receive, { error_code: "sandbox_unprotected_installation" }));
+ expect(screen.queryByRole("status")).not.toBeInTheDocument();
+ act(() => { start(second.receive); tool(second.receive, { error_code: "sandbox_unprotected_installation" }); });
+ expect(screen.getByRole("status")).toHaveTextContent(/protected location/);
+ view.rerender();
+ expect(screen.queryByRole("status")).not.toBeInTheDocument();
+ });
+});
diff --git a/webui/src/tests/settings-sandbox.test.tsx b/webui/src/tests/settings-sandbox.test.tsx
index 19b905245..723df1df4 100644
--- a/webui/src/tests/settings-sandbox.test.tsx
+++ b/webui/src/tests/settings-sandbox.test.tsx
@@ -37,6 +37,16 @@ describe("Saved sandbox settings", () => {
expect(sandbox.getByText(/Restart the gateway/)).toBeVisible();
});
+ it("opens the launcher editor from a recovery link without editing or checking automatically", () => {
+ renderSettingsView({ initialSection: "advanced", initialSettings: payload(), webuiCapabilities: capability,
+ focusTarget: "sandbox-launcher" });
+ const sandbox = within(screen.getByRole("region", { name: "Command sandbox" }));
+ expect(sandbox.getByRole("button", { name: "Advanced options" })).toHaveAttribute("aria-expanded", "true");
+ expect(sandbox.getByRole("textbox", { name: "Trusted launcher path" })).toHaveFocus();
+ expect(sandbox.getByRole("textbox", { name: "Trusted launcher path" })).toHaveValue("");
+ expect(requestMutationMock).not.toHaveBeenCalled();
+ });
+
it("retains rejected path drafts and localizes errors", async () => {
const sandbox = open();
fireEvent.click(sandbox.getByRole("button", { name: "Advanced options" }));
@@ -120,4 +130,22 @@ describe("Saved sandbox settings", () => {
await waitFor(() => expect(screen.getByRole("button", { name: "Check sandbox" })).not.toBeDisabled());
expect(screen.queryByText("Basic check passed")).not.toBeInTheDocument();
});
+
+ it("does not refocus the launcher when restart state changes", () => {
+ const settings = payload();
+ const client = { requestMutation: vi.fn() } as unknown as NanobotClient;
+ function Harness({ restarting }: { restarting: boolean }) {
+ const state = useRuntimeConfigSettings(settings, client, () => {});
+ return <>>;
+ }
+ const { rerender } = render();
+ expect(screen.getByRole("textbox", { name: "Trusted launcher path" })).toHaveFocus();
+ const other = screen.getByRole("button", { name: "Keep focus here" });
+ other.focus();
+ rerender();
+ expect(other).toHaveFocus();
+ rerender();
+ expect(other).toHaveFocus();
+ });
});
diff --git a/webui/src/tests/settings-test-utils.tsx b/webui/src/tests/settings-test-utils.tsx
index ae5cf5dc6..8d4dd61d9 100644
--- a/webui/src/tests/settings-test-utils.tsx
+++ b/webui/src/tests/settings-test-utils.tsx
@@ -128,6 +128,7 @@ export function settingsPayload(): SettingsPayload {
type SettingsViewTestOptions = Partial,
| "initialSection"
+ | "focusTarget"
| "initialSettings"
| "themePreference"
| "onChangeTheme"
@@ -155,6 +156,7 @@ export function renderSettingsView(options: SettingsViewTestOptions = {}) {