fix(webui): name the gateway sandbox launcher in setup guidance

This commit is contained in:
Xubin Ren committed 2026-11-08 14:29:46 +08:00
1 parent f5e5bd6ea0
commit 44d567e37c
31 files changed
+230 -86

No files matched your search

+1 -1
View File
@@ -2382,7 +2382,7 @@ With a Unix sandbox enabled, the selected shell and any requested login profile
In **Settings → Advanced → Command sandbox**, choose the host's isolation method and use **Check sandbox**. The gateway checks the saved configuration with a bounded, temporary test: launcher startup, workspace writes, and denial of an external test file. It does not run a user command, change the real workspace, or certify all security properties. The result describes the saved configuration, not a live command session; restart the gateway after saving to apply changes. Open **Advanced options** to set a trusted launcher path and the existing additional paths and command controls. An older host without this optional settings capability keeps the existing sandbox editor and does not receive check requests. In **Settings → Advanced → Command sandbox**, choose the host's isolation method and use **Check sandbox**. The gateway checks the saved configuration with a bounded, temporary test: launcher startup, workspace writes, and denial of an external test file. It does not run a user command, change the real workspace, or certify all security properties. The result describes the saved configuration, not a live command session; restart the gateway after saving to apply changes. Open **Advanced options** to set a trusted launcher path and the existing additional paths and command controls. An older host without this optional settings capability keeps the existing sandbox editor and does not receive check requests.
When command execution confirms a missing or rejected sandbox launcher, or the operating system rejects starting that launcher, the WebUI shows a small notice above the message input. **Check settings** opens the sandbox section; path errors also open its path editor. The notice does not take input focus, edit configuration, install software, turn isolation off, or retry a command. Closing it suppresses the same issue for the current turn; a new turn needs a fresh failure to show it again. Opening old conversation history does not replay notices. Ordinary command output and nonzero exit codes do not by themselves prove a sandbox fault; use **Check sandbox** to investigate other failures. For a custom package, obtain the protected component location from its maintainer rather than guessing a path. When command execution confirms a missing or rejected sandbox launcher, or the operating system rejects starting that launcher, the WebUI shows a small notice above the message input. It names Bubblewrap (`bwrap`) or macOS Seatbelt (`sandbox-exec`) using the gateway's supported backend, not the browser's operating system. For missing or unavailable paths, **Configure bwrap path** or **Configure sandbox-exec path** opens and focuses the trusted path editor. Other failures use **Open sandbox settings**; if gateway backend details are unavailable, the notice keeps generic wording instead of guessing a launcher. The notice does not take input focus, edit configuration, install software, turn isolation off, or retry a command. Closing it suppresses the same issue for the current turn; a new turn needs a fresh failure to show it again. Opening old conversation history does not replay notices. Ordinary command output and nonzero exit codes do not by themselves prove a sandbox fault; use **Check sandbox** to investigate other failures. For a custom package, obtain the protected component location from its maintainer rather than guessing a path.
NAS and other custom packages can provide their own launcher, but a file in an app's writable data directory is not safe to launch before isolation. For fnOS or similar installations, ask the package maintainer to install bubblewrap and its parent directories in a root-protected location, then set that absolute path. Finding `bwrap` in an interactive shell or venv does not establish that the gateway can launch it safely or that the kernel permits namespaces. A failed check must be resolved in the launcher installation, host kernel policy, or container setup; it does not turn isolation off. Existing configurations without `sandboxLauncher` retain the same defaults. Clearing this field restores system lookup; no chat or configuration migration is required. NAS and other custom packages can provide their own launcher, but a file in an app's writable data directory is not safe to launch before isolation. For fnOS or similar installations, ask the package maintainer to install bubblewrap and its parent directories in a root-protected location, then set that absolute path. Finding `bwrap` in an interactive shell or venv does not establish that the gateway can launch it safely or that the kernel permits namespaces. A failed check must be resolved in the launcher installation, host kernel policy, or container setup; it does not turn isolation off. Existing configurations without `sandboxLauncher` retain the same defaults. Clearing this field restores system lookup; no chat or configuration migration is required.
+3 -1
View File
@@ -25,6 +25,8 @@ export function ChatFailureFixture({ parameters }: { parameters: URLSearchParams
const variant = parameters.get("variant") === "hero" ? "hero" : "thread"; const variant = parameters.get("variant") === "hero" ? "hero" : "thread";
const dismiss = () => { setVisible(false); setAction("dismissed"); }; const dismiss = () => { setVisible(false); setAction("dismissed"); };
const settings = () => setAction("settings"); const settings = () => setAction("settings");
const gateway = parameters.get("gateway") ?? "bwrap";
const backend = gateway === "bwrap" || gateway === "seatbelt" ? gateway : null;
return <main className="min-h-screen bg-background p-4 text-foreground"> return <main className="min-h-screen bg-background p-4 text-foreground">
<section className="mx-auto max-w-3xl py-8"> <section className="mx-auto max-w-3xl py-8">
<ThreadMessages messages={messages} isStreaming={false} /> <ThreadMessages messages={messages} isStreaming={false} />
@@ -35,7 +37,7 @@ export function ChatFailureFixture({ parameters }: { parameters: URLSearchParams
: parameters.get("notice") === "fallback" : parameters.get("notice") === "fallback"
? <ModelFallbackNotice model="Fallback model" onDismiss={dismiss} onOpenSettings={settings} /> ? <ModelFallbackNotice model="Fallback model" onDismiss={dismiss} onOpenSettings={settings} />
: parameters.get("notice") === "sandbox" : parameters.get("notice") === "sandbox"
? <SandboxNotice issue="missing" onDismiss={dismiss} onOpenSettings={settings} /> ? <SandboxNotice issue="missing" backend={backend} onDismiss={dismiss} onOpenSettings={settings} />
: <RecoveryNotice : <RecoveryNotice
state={{ recovery_id: "fixture-recovery", status: "awaiting_user", reason: "model_request_failed", failure_error_kind: "authentication" }} state={{ recovery_id: "fixture-recovery", status: "awaiting_user", reason: "model_request_failed", failure_error_kind: "authentication" }}
onContinue={async () => { setVisible(false); setAction("continued"); }} onContinue={async () => { setVisible(false); setAction("continued"); }}
+35
View File
@@ -1,4 +1,39 @@
import { expect, test } from "@playwright/test"; import { expect, test } from "@playwright/test";
import { readFileSync } from "node:fs";
for (const locale of ["en", "zh-CN", "zh-TW", "fr", "ja", "ko", "es", "pt-BR", "vi", "id"]) {
for (const gateway of ["bwrap", "seatbelt"]) {
test(`sandbox path action fits a narrow view: ${gateway}, ${locale}`, async ({ page }) => {
const copy = JSON.parse(readFileSync(new URL(`../src/i18n/locales/${locale}/common.json`, import.meta.url), "utf8")).settings.sandbox;
const executable = gateway === "bwrap" ? "bwrap" : "sandbox-exec";
await page.setViewportSize({ width: 390, height: 1000 });
await page.addInitScript((locale) => localStorage.setItem("nanobot.locale", locale), locale);
await page.emulateMedia({ reducedMotion: "reduce" });
await page.goto(`/browser/fixture.html?case=chat-failure&notice=sandbox&gateway=${gateway}`);
const notice = page.locator(".thread-composer-notice");
await expect(notice).toContainText(gateway === "bwrap" ? "Bubblewrap (bwrap)" : "macOS Seatbelt (sandbox-exec)");
await expect(notice).not.toContainText(/{{|settings\.sandbox/);
const action = notice.getByRole("button", { name: copy.notice.configurePath.replace("{{launcher}}", executable), exact: true });
await expect(action).toBeInViewport({ ratio: 1 });
const bounds = (await notice.boundingBox())!;
const button = (await action.boundingBox())!;
expect(button.x).toBeGreaterThanOrEqual(bounds.x);
expect(button.x + button.width).toBeLessThanOrEqual(bounds.x + bounds.width);
expect(await page.evaluate(() => document.documentElement.scrollWidth)).toBeLessThanOrEqual(390);
await action.click();
await expect(page.getByLabel("Fixture action")).toHaveText("settings");
});
}
}
test("sandbox guidance stays generic without gateway backend details", async ({ page }) => {
await page.goto("/browser/fixture.html?case=chat-failure&notice=sandbox&gateway=unknown");
const notice = page.locator(".thread-composer-notice");
await expect(notice).toContainText("sandbox launcher");
await expect(notice).not.toContainText(/bwrap|sandbox-exec/);
await notice.getByRole("button", { name: "Open sandbox settings" }).click();
await expect(page.getByLabel("Fixture action")).toHaveText("settings");
});
for (const width of [1440, 390]) { for (const width of [1440, 390]) {
for (const variant of ["thread", "hero"]) { for (const variant of ["thread", "hero"]) {
@@ -11,6 +11,7 @@ import { ToggleButton } from "@/components/ui/toggle-button";
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@/components/ui/alert-dialog"; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@/components/ui/alert-dialog";
import { checkSandboxSettings } from "@/lib/api"; import { checkSandboxSettings } from "@/lib/api";
import type { NanobotClient } from "@/lib/nanobot-client"; import type { NanobotClient } from "@/lib/nanobot-client";
import { sandboxLauncherDisplay } from "@/lib/sandbox-display";
import type { SandboxCheck, SettingsPayload } from "@/lib/types"; import type { SandboxCheck, SettingsPayload } from "@/lib/types";
import type { RuntimeConfigController } from "./RuntimeConfigSettings"; import type { RuntimeConfigController } from "./RuntimeConfigSettings";
import type { SettingsFocusTarget } from "@/components/settings/contracts"; import type { SettingsFocusTarget } from "@/components/settings/contracts";
@@ -25,8 +26,9 @@ export function SandboxSettings({ settings, state, client, isRestarting, childre
focusTarget?: SettingsFocusTarget; focusTarget?: SettingsFocusTarget;
}) { }) {
const { t } = useTranslation(); const { t } = useTranslation();
const tx = (key: string) => t(`settings.sandbox.${key}`);
const saved = settings.advanced.exec_sandbox_status!; const saved = settings.advanced.exec_sandbox_status!;
const launcherName = sandboxLauncherDisplay(saved.supported_backend)?.name ?? t("settings.sandbox.launcher");
const tx = (key: string) => t(`settings.sandbox.${key}`, { launcher: launcherName });
const [result, setResult] = useState<SandboxCheck | null>(null); const [result, setResult] = useState<SandboxCheck | null>(null);
const [checking, setChecking] = useState(false); const [checking, setChecking] = useState(false);
const [checkError, setCheckError] = useState(false); const [checkError, setCheckError] = useState(false);
@@ -101,7 +103,7 @@ export function SandboxSettings({ settings, state, client, isRestarting, childre
<div className="flex items-start gap-2 text-ui leading-6 text-muted-foreground"> <div className="flex items-start gap-2 text-ui leading-6 text-muted-foreground">
{checking ? <Loader2 className="mt-1 h-4 w-4 shrink-0 animate-spin motion-reduce:animate-none" aria-hidden /> {checking ? <Loader2 className="mt-1 h-4 w-4 shrink-0 animate-spin motion-reduce:animate-none" aria-hidden />
: status === "passed" ? <ShieldCheck className="mt-1 h-4 w-4 shrink-0" aria-hidden /> : <CircleAlert className="mt-1 h-4 w-4 shrink-0" aria-hidden />} : status === "passed" ? <ShieldCheck className="mt-1 h-4 w-4 shrink-0" aria-hidden /> : <CircleAlert className="mt-1 h-4 w-4 shrink-0" aria-hidden />}
<p>{!saved.supported_backend && enabled ? tx("help.unsupported") : reason ? t(`settings.sandbox.reasons.${reason}`, { defaultValue: tx("reasons.unknown") }) : tx(`help.${dirty ? "unsaved" : status}`)}</p> <p>{!saved.supported_backend && enabled ? tx("help.unsupported") : reason ? t(`settings.sandbox.reasons.${reason}`, { launcher: launcherName, defaultValue: tx("reasons.unknown") }) : tx(`help.${dirty ? "unsaved" : status}`)}</p>
</div> </div>
{launcher ? <p className="mt-2 break-all font-mono text-caption text-muted-foreground">{launcher}</p> : null} {launcher ? <p className="mt-2 break-all font-mono text-caption text-muted-foreground">{launcher}</p> : null}
<p className="mt-2 text-caption leading-5 text-muted-foreground">{tx("scope")}</p> <p className="mt-2 text-caption leading-5 text-muted-foreground">{tx("scope")}</p>
@@ -2,26 +2,31 @@ import { ArrowRight, ShieldAlert, X } from "lucide-react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { sandboxLauncherDisplay } from "@/lib/sandbox-display";
import type { SandboxCheck } from "@/lib/types";
export type SandboxIssue = "missing" | "path" | "permissions" | "startup"; export type SandboxIssue = "missing" | "path" | "permissions" | "startup";
/** A command needs attention; the conversation itself is still usable. */ /** A command needs attention; the conversation itself is still usable. */
export function SandboxNotice({ issue, onOpenSettings, onDismiss }: { export function SandboxNotice({ issue, backend, onOpenSettings, onDismiss }: {
issue: SandboxIssue; issue: SandboxIssue;
backend?: SandboxCheck["supported_backend"];
onOpenSettings: () => void; onOpenSettings: () => void;
onDismiss: () => void; onDismiss: () => void;
}) { }) {
const { t } = useTranslation(); const { t } = useTranslation();
const launcher = sandboxLauncherDisplay(backend);
const configurePath = launcher && (issue === "missing" || issue === "path");
return <div role="status" aria-live="polite" aria-atomic="true" return <div role="status" aria-live="polite" aria-atomic="true"
className="thread-composer-notice mb-2 flex items-start gap-3 rounded-control border border-border/60 bg-muted/40 px-3 py-3 text-caption text-foreground animate-in fade-in-0 slide-in-from-bottom-1 motion-reduce:animate-none"> className="thread-composer-notice mb-2 flex items-start gap-3 rounded-control border border-border/60 bg-muted/40 px-3 py-3 text-caption text-foreground animate-in fade-in-0 slide-in-from-bottom-1 motion-reduce:animate-none">
<ShieldAlert className="mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" aria-hidden /> <ShieldAlert className="mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" aria-hidden />
<div className="flex min-w-0 flex-1 flex-wrap items-center gap-x-4 gap-y-2"> <div className="flex min-w-0 flex-1 flex-wrap items-center gap-x-4 gap-y-2">
<div className="min-w-0 flex-1 basis-64 leading-5"> <div className="min-w-0 flex-1 basis-64 leading-5">
<p className="font-medium">{t("settings.sandbox.notice.title")}</p> <p className="font-medium">{t("settings.sandbox.notice.title")}</p>
<p className="mt-0.5 break-words text-muted-foreground">{t(`settings.sandbox.notice.${issue}`)}</p> <p className="mt-0.5 break-words text-muted-foreground">{t(`settings.sandbox.notice.${issue}`, { launcher: launcher?.name ?? t("settings.sandbox.launcher") })}</p>
</div> </div>
<Button variant="outline" size="sm" className="shrink-0 gap-1.5 rounded-full" onClick={onOpenSettings}> <Button variant="outline" size="sm" className="h-auto min-h-8 max-w-full shrink-0 gap-1.5 whitespace-normal rounded-full py-1.5 text-left" onClick={onOpenSettings}>
{t("settings.sandbox.notice.openSettings")}<ArrowRight className="h-3.5 w-3.5" aria-hidden /> {configurePath ? t("settings.sandbox.notice.configurePath", { launcher: launcher.executable }) : t("settings.sandbox.notice.openSettings")}<ArrowRight className="h-3.5 w-3.5 shrink-0" aria-hidden />
</Button> </Button>
</div> </div>
<Button variant="ghost" size="icon" className="h-6 w-6 shrink-0 rounded-full text-muted-foreground" <Button variant="ghost" size="icon" className="h-6 w-6 shrink-0 rounded-full text-muted-foreground"
@@ -1360,6 +1360,7 @@ export function ThreadShell({
) : null} ) : null}
{sandboxNotice.issue && onOpenSandboxSettings && !streamError && !recoveryState ? ( {sandboxNotice.issue && onOpenSandboxSettings && !streamError && !recoveryState ? (
<SandboxNotice issue={sandboxNotice.issue} onDismiss={sandboxNotice.dismiss} <SandboxNotice issue={sandboxNotice.issue} onDismiss={sandboxNotice.dismiss}
backend={settingsSnapshot?.advanced.exec_sandbox_status?.supported_backend}
onOpenSettings={() => onOpenSandboxSettings( onOpenSettings={() => onOpenSandboxSettings(
sandboxNotice.issue === "missing" || sandboxNotice.issue === "path" ? "sandbox-launcher" : "sandbox", sandboxNotice.issue === "missing" || sandboxNotice.issue === "path" ? "sandbox-launcher" : "sandbox",
)} /> )} />
+6 -2
View File
@@ -241,17 +241,21 @@ function RecoveryPreview() {
function SandboxPreview() { function SandboxPreview() {
const { t } = useGalleryTranslation(); const { t } = useGalleryTranslation();
const [backend, setBackend] = useState<"bwrap" | "seatbelt" | null>("bwrap");
const gateway = backend === "bwrap" ? "Linux / fnOS" : backend === "seatbelt" ? "macOS" : t("previews.sandbox.unknownGateway");
const [issue, setIssue] = useState<SandboxIssue>("missing"); const [issue, setIssue] = useState<SandboxIssue>("missing");
const [dismissed, setDismissed] = useState(false); const [dismissed, setDismissed] = useState(false);
const [opened, setOpened] = useState(false); const [opened, setOpened] = useState(false);
return <div className="space-y-4"> return <div className="space-y-4">
<StatePicker label={t("previews.sandbox.gateway")} value={gateway} options={["Linux / fnOS", "macOS", t("previews.sandbox.unknownGateway")]}
onChange={(value) => setBackend(value === "Linux / fnOS" ? "bwrap" : value === "macOS" ? "seatbelt" : null)} />
<div className="flex flex-wrap gap-2"> <div className="flex flex-wrap gap-2">
{(["missing", "permissions", "startup"] as const).map((value) => <Button key={value} {(["missing", "permissions", "startup"] as const).map((value) => <Button key={value}
variant={issue === value ? "secondary" : "outline"} size="sm" className="rounded-full" variant={issue === value ? "secondary" : "outline"} size="sm" className="rounded-full"
onClick={() => { setIssue(value); setDismissed(false); setOpened(false); }}>{t(`previews.sandbox.${value}`)}</Button>)} onClick={() => { setIssue(value); setDismissed(false); setOpened(false); }}>{t(`previews.sandbox.${value}`)}</Button>)}
</div> </div>
<div className="thread-composer-stack"> <div className="thread-composer-stack">
{!dismissed ? <SandboxNotice issue={issue} onDismiss={() => setDismissed(true)} onOpenSettings={() => setOpened(true)} /> : null} {!dismissed ? <SandboxNotice issue={issue} backend={backend} onDismiss={() => setDismissed(true)} onOpenSettings={() => setOpened(true)} /> : null}
<ThreadComposer workspaceControlsHidden onSend={() => false} onStop={() => {}} /> <ThreadComposer workspaceControlsHidden onSend={() => false} onStop={() => {}} />
</div> </div>
<Button variant="outline" size="sm" onClick={() => setDismissed(false)}>{t("previews.fallback.showAgain")}</Button> <Button variant="outline" size="sm" onClick={() => setDismissed(false)}>{t("previews.fallback.showAgain")}</Button>
@@ -374,7 +378,7 @@ export const conversationExamples: ComponentExample[] = [
code: '<ModelFallbackNotice model="gpt-4.1" onDismiss={dismiss} onOpenSettings={openModelSettings} />' }, code: '<ModelFallbackNotice model="gpt-4.1" onDismiss={dismiss} onOpenSettings={openModelSettings} />' },
{ title: "previews.sandbox.title", files: ["thread/SandboxNotice"], Preview: SandboxPreview, { title: "previews.sandbox.title", files: ["thread/SandboxNotice"], Preview: SandboxPreview,
description: "previews.sandbox.description", options: "previews.sandbox.options", description: "previews.sandbox.description", options: "previews.sandbox.options",
code: '<SandboxNotice issue="missing" onDismiss={dismiss} onOpenSettings={openSandboxSettings} />' }, code: '<SandboxNotice issue="missing" backend="bwrap" onDismiss={dismiss} onOpenSettings={openSandboxSettings} />' },
{ title: "previews.compaction.title", files: ["thread/ContextCompactionNotice"], Preview: CompactionPreview, { title: "previews.compaction.title", files: ["thread/ContextCompactionNotice"], Preview: CompactionPreview,
description: "previews.compaction.description", options: "previews.compaction.options", description: "previews.compaction.description", options: "previews.compaction.options",
code: '<ContextCompactionNotice compaction={{ id: "compaction-1", phase: "succeeded", announce: true }} />' }, code: '<ContextCompactionNotice compaction={{ id: "compaction-1", phase: "succeeded", announce: true }} />' },
@@ -180,6 +180,8 @@
"hint": "Select a recovery state, then try continuing or dismissing." "hint": "Select a recovery state, then try continuing or dismissing."
}, },
"sandbox": { "sandbox": {
"gateway": "Example gateway",
"unknownGateway": "Not specified",
"title": "Command notice", "title": "Command notice",
"description": "Use the production notice to compare missing components, unprotected installations, and startup failures.", "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.", "options": "The notice does not take focus or retry commands. Change its state, dismiss it, and keep typing.",
@@ -180,6 +180,8 @@
"hint": "Elige un estado de recuperación y prueba a continuar o cerrar." "hint": "Elige un estado de recuperación y prueba a continuar o cerrar."
}, },
"sandbox": { "sandbox": {
"gateway": "Pasarela de ejemplo",
"unknownGateway": "Sin especificar",
"title": "Aviso de comandos", "title": "Aviso de comandos",
"description": "Compara componentes ausentes, instalaciones sin protección y errores de inicio con el componente real.", "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.", "options": "El aviso no toma el foco ni reintenta comandos. Cambia el estado, ciérralo y sigue escribiendo.",
@@ -180,6 +180,8 @@
"hint": "Sélectionnez un état de reprise, puis essayez de continuer ou de fermer." "hint": "Sélectionnez un état de reprise, puis essayez de continuer ou de fermer."
}, },
"sandbox": { "sandbox": {
"gateway": "Passerelle d’exemple",
"unknownGateway": "Non précisée",
"title": "Avis de commande", "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.", "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.", "options": "L’avis ne prend pas le focus et ne relance aucune commande. Changez son état, fermez-le et continuez à saisir.",
@@ -180,6 +180,8 @@
"hint": "Pilih status pemulihan, lalu coba lanjutkan atau tutup." "hint": "Pilih status pemulihan, lalu coba lanjutkan atau tutup."
}, },
"sandbox": { "sandbox": {
"gateway": "Contoh gateway",
"unknownGateway": "Tidak ditentukan",
"title": "Pemberitahuan perintah", "title": "Pemberitahuan perintah",
"description": "Bandingkan komponen yang hilang, pemasangan tidak terlindungi, dan kegagalan awal dengan komponen produksi.", "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.", "options": "Pemberitahuan tidak mengambil fokus atau mengulang perintah. Ubah status, tutup, lalu lanjutkan mengetik.",
@@ -180,6 +180,8 @@
"hint": "復旧状態を選び、続行または閉じる操作を試してください。" "hint": "復旧状態を選び、続行または閉じる操作を試してください。"
}, },
"sandbox": { "sandbox": {
"gateway": "サンプルのゲートウェイ",
"unknownGateway": "未指定",
"title": "コマンドの通知", "title": "コマンドの通知",
"description": "実際のコンポーネントで、コンポーネントの欠落、保護されていないインストール、起動失敗を比較します。", "description": "実際のコンポーネントで、コンポーネントの欠落、保護されていないインストール、起動失敗を比較します。",
"options": "通知はフォーカスを奪わず、コマンドを再実行しません。状態を切り替え、閉じて入力を続けられます。", "options": "通知はフォーカスを奪わず、コマンドを再実行しません。状態を切り替え、閉じて入力を続けられます。",
@@ -180,6 +180,8 @@
"hint": "복구 상태를 선택한 후 계속하거나 닫아 보세요." "hint": "복구 상태를 선택한 후 계속하거나 닫아 보세요."
}, },
"sandbox": { "sandbox": {
"gateway": "예시 게이트웨이",
"unknownGateway": "지정되지 않음",
"title": "명령 알림", "title": "명령 알림",
"description": "실제 구성 요소로 누락된 구성 요소, 보호되지 않은 설치 위치, 시작 실패를 비교합니다.", "description": "실제 구성 요소로 누락된 구성 요소, 보호되지 않은 설치 위치, 시작 실패를 비교합니다.",
"options": "알림은 포커스를 가져오거나 명령을 재시도하지 않습니다. 상태를 바꾸고 닫은 후 계속 입력할 수 있습니다.", "options": "알림은 포커스를 가져오거나 명령을 재시도하지 않습니다. 상태를 바꾸고 닫은 후 계속 입력할 수 있습니다.",
@@ -180,6 +180,8 @@
"hint": "Selecione um estado de recuperação e teste continuar ou fechar." "hint": "Selecione um estado de recuperação e teste continuar ou fechar."
}, },
"sandbox": { "sandbox": {
"gateway": "Gateway de exemplo",
"unknownGateway": "Não especificado",
"title": "Aviso de comandos", "title": "Aviso de comandos",
"description": "Compare componentes ausentes, instalações desprotegidas e falhas de inicialização com o componente real.", "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.", "options": "O aviso não toma o foco nem repete comandos. Mude o estado, feche-o e continue digitando.",
@@ -180,6 +180,8 @@
"hint": "Chọn trạng thái khôi phục, rồi thử tiếp tục hoặc đóng." "hint": "Chọn trạng thái khôi phục, rồi thử tiếp tục hoặc đóng."
}, },
"sandbox": { "sandbox": {
"gateway": "Gateway minh họa",
"unknownGateway": "Chưa chỉ định",
"title": "Thông báo lệnh", "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ế.", "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.", "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.",
@@ -180,6 +180,8 @@
"hint": "选择恢复状态,再试用继续或关闭。" "hint": "选择恢复状态,再试用继续或关闭。"
}, },
"sandbox": { "sandbox": {
"gateway": "示例网关系统",
"unknownGateway": "未指定",
"title": "命令提示", "title": "命令提示",
"description": "使用正式提示组件,体验缺失组件、安装位置受限和启动异常三种状态。", "description": "使用正式提示组件,体验缺失组件、安装位置受限和启动异常三种状态。",
"options": "提示不抢焦点,也不自动重试命令。可切换状态、关闭提示并继续输入。", "options": "提示不抢焦点,也不自动重试命令。可切换状态、关闭提示并继续输入。",
@@ -180,6 +180,8 @@
"hint": "選擇復原狀態,再試用繼續或關閉。" "hint": "選擇復原狀態,再試用繼續或關閉。"
}, },
"sandbox": { "sandbox": {
"gateway": "範例閘道系統",
"unknownGateway": "未指定",
"title": "指令提示", "title": "指令提示",
"description": "使用正式提示元件,體驗缺少元件、安裝位置受限與啟動異常三種狀態。", "description": "使用正式提示元件,體驗缺少元件、安裝位置受限與啟動異常三種狀態。",
"options": "提示不會搶焦點,也不會自動重試指令。可切換狀態、關閉提示並繼續輸入。", "options": "提示不會搶焦點,也不會自動重試指令。可切換狀態、關閉提示並繼續輸入。",
+9 -7
View File
@@ -486,7 +486,8 @@
"checking": "Checking…", "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.", "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", "path": "Trusted launcher path",
"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.", "launcher": "sandbox launcher",
"pathHelp": "Usually leave this blank for system lookup of {{launcher}}. 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", "automatic": "System lookup",
"checkError": "Could not complete the check. Reopen settings and try again.", "checkError": "Could not complete the check. Reopen settings and try again.",
"saveError": "Could not save. Keep your draft and try again.", "saveError": "Could not save. Keep your draft and try again.",
@@ -496,11 +497,12 @@
"disable": "Turn off isolation", "disable": "Turn off isolation",
"notice": { "notice": {
"title": "Commands need attention", "title": "Commands need attention",
"missing": "The command component could not be found. Check its installation; you can keep chatting.", "missing": "The gateway could not find {{launcher}}. If installed, set its full path. Otherwise, contact the package maintainer or administrator. You can keep chatting.",
"path": "The configured command component is unavailable. Check its location and access permissions.", "path": "The gateway cannot use the configured {{launcher}} path. Check its full path and access permissions.",
"permissions": "The command component is not in a protected location. Contact the package maintainer or administrator.", "permissions": "{{launcher}} 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.", "startup": "{{launcher}} could not start. Check the gateway installation and system restrictions.",
"openSettings": "Check settings" "configurePath": "Configure {{launcher}} path",
"openSettings": "Open sandbox settings"
}, },
"states": { "states": {
"disabled": "Commands disabled", "disabled": "Commands disabled",
@@ -522,7 +524,7 @@
"checking": "Starting a bounded sandbox test…" "checking": "Starting a bounded sandbox test…"
}, },
"reasons": { "reasons": {
"launcher_missing": "Launcher not found. Install it on the gateway or set a trusted absolute path below.", "launcher_missing": "{{launcher}} was not found on the gateway. If installed, enter its full path below. Otherwise, contact the package maintainer or administrator.",
"path_not_absolute": "Enter an absolute path, not a command name.", "path_not_absolute": "Enter an absolute path, not a command name.",
"not_executable": "The path must point to an executable file.", "not_executable": "The path must point to an executable file.",
"agent_writable": "The launcher is in an agent-writable path. Ask the package maintainer for a protected installation.", "agent_writable": "The launcher is in an agent-writable path. Ask the package maintainer for a protected installation.",
+9 -7
View File
@@ -486,7 +486,8 @@
"checking": "Comprobando…", "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.", "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", "path": "Ruta del lanzador de confianza",
"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.", "launcher": "lanzador del entorno aislado",
"pathHelp": "Normalmente, déjala vacía para buscar {{launcher}} 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", "automatic": "Búsqueda del sistema",
"checkError": "No se pudo completar la prueba. Abre los ajustes de nuevo y reinténtalo.", "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.", "saveError": "No se pudo guardar. El borrador se conserva; vuelve a intentarlo.",
@@ -496,11 +497,12 @@
"disable": "Desactivar aislamiento", "disable": "Desactivar aislamiento",
"notice": { "notice": {
"title": "Los comandos requieren atención", "title": "Los comandos requieren atención",
"missing": "No se encontró el componente de ejecución. Revisa su instalación; puedes seguir chateando.", "missing": "La pasarela no encuentra {{launcher}}. Si está instalado, indica su ruta completa. Si no, contacta al responsable del paquete o al administrador. Puedes seguir chateando.",
"path": "El componente configurado no está disponible. Revisa su ubicación y permisos de acceso.", "path": "La pasarela no puede usar la ruta configurada de {{launcher}}. Revisa la ruta completa y los permisos de acceso.",
"permissions": "El componente no está en una ubicación protegida. Contacta al responsable del paquete o al administrador.", "permissions": "{{launcher}} 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.", "startup": "{{launcher}} no pudo iniciarse. Revisa la instalación de la pasarela y las restricciones del sistema.",
"openSettings": "Revisar ajustes" "configurePath": "Configurar ruta de {{launcher}}",
"openSettings": "Abrir ajustes del entorno aislado"
}, },
"states": { "states": {
"disabled": "Comandos desactivados", "disabled": "Comandos desactivados",
@@ -522,7 +524,7 @@
"checking": "Ejecutando una prueba con tiempo limitado…" "checking": "Ejecutando una prueba con tiempo limitado…"
}, },
"reasons": { "reasons": {
"launcher_missing": "No se encontró el lanzador. Instálalo en la puerta de enlace o indica una ruta absoluta de confianza.", "launcher_missing": "La pasarela no encuentra {{launcher}}. Si está instalado, indica su ruta completa abajo. Si no, contacta al responsable del paquete o al administrador.",
"path_not_absolute": "Introduce una ruta absoluta, no un nombre de comando.", "path_not_absolute": "Introduce una ruta absoluta, no un nombre de comando.",
"not_executable": "La ruta debe apuntar a un archivo ejecutable.", "not_executable": "La ruta debe apuntar a un archivo ejecutable.",
"agent_writable": "El agente puede escribir en esta ruta. Pide una instalación protegida al responsable del paquete.", "agent_writable": "El agente puede escribir en esta ruta. Pide una instalación protegida al responsable del paquete.",
+9 -7
View File
@@ -486,7 +486,8 @@
"checking": "Vérification…", "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.", "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", "path": "Chemin du lanceur de confiance",
"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.", "launcher": "lanceur de bac à sable",
"pathHelp": "Laissez généralement ce champ vide pour rechercher {{launcher}} dans le 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", "automatic": "Recherche système",
"checkError": "La vérification a échoué. Rouvrez les paramètres et réessayez.", "checkError": "La vérification a échoué. Rouvrez les paramètres et réessayez.",
"saveError": "Enregistrement impossible. Le brouillon est conservé ; réessayez.", "saveError": "Enregistrement impossible. Le brouillon est conservé ; réessayez.",
@@ -496,11 +497,12 @@
"disable": "Désactiver l’isolation", "disable": "Désactiver l’isolation",
"notice": { "notice": {
"title": "Les commandes nécessitent une vérification", "title": "Les commandes nécessitent une vérification",
"missing": "Le composant d’exécution est introuvable. Vérifiez son installation ; vous pouvez continuer à discuter.", "missing": "La passerelle ne trouve pas {{launcher}}. S’il est installé, indiquez son chemin complet. Sinon, contactez le responsable du paquet ou l’administrateur. Vous pouvez continuer à discuter.",
"path": "Le composant configuré est indisponible. Vérifiez son emplacement et ses droits d’accès.", "path": "La passerelle ne peut pas utiliser le chemin configuré de {{launcher}}. Vérifiez le chemin complet et les droits d’accès.",
"permissions": "Le composant n’est pas dans un emplacement protégé. Contactez le responsable du paquet ou l’administrateur.", "permissions": "{{launcher}} 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.", "startup": "{{launcher}} n’a pas pu démarrer. Vérifiez l’installation de la passerelle et les restrictions du système.",
"openSettings": "Vérifier les paramètres" "configurePath": "Configurer le chemin de {{launcher}}",
"openSettings": "Ouvrir les paramètres du bac à sable"
}, },
"states": { "states": {
"disabled": "Commandes désactivées", "disabled": "Commandes désactivées",
@@ -522,7 +524,7 @@
"checking": "Test avec durée limitée en cours…" "checking": "Test avec durée limitée en cours…"
}, },
"reasons": { "reasons": {
"launcher_missing": "Lanceur introuvable. Installez-le sur la passerelle ou indiquez un chemin absolu de confiance.", "launcher_missing": "La passerelle ne trouve pas {{launcher}}. S’il est installé, indiquez son chemin complet ci-dessous. Sinon, contactez le responsable du paquet ou l’administrateur.",
"path_not_absolute": "Indiquez un chemin absolu, pas un nom de commande.", "path_not_absolute": "Indiquez un chemin absolu, pas un nom de commande.",
"not_executable": "Le chemin doit désigner un fichier exécutable.", "not_executable": "Le chemin doit désigner un fichier exécutable.",
"agent_writable": "L’agent peut modifier ce chemin. Demandez une installation protégée au responsable du paquet.", "agent_writable": "L’agent peut modifier ce chemin. Demandez une installation protégée au responsable du paquet.",
+9 -7
View File
@@ -486,7 +486,8 @@
"checking": "Memeriksa…", "checking": "Memeriksa…",
"scope": "Hanya menguji peluncur tersimpan dengan berkas sementara. Ini bukan audit keamanan lengkap. Mulai ulang gateway untuk menerapkan perubahan ke eksekusi perintah.", "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", "path": "Jalur peluncur tepercaya",
"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.", "launcher": "peluncur sandbox",
"pathHelp": "Biasanya biarkan kosong untuk mencari {{launcher}} di 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", "automatic": "Pencarian sistem",
"checkError": "Pemeriksaan gagal. Buka ulang pengaturan dan coba lagi.", "checkError": "Pemeriksaan gagal. Buka ulang pengaturan dan coba lagi.",
"saveError": "Gagal menyimpan. Draf tetap tersimpan; coba lagi.", "saveError": "Gagal menyimpan. Draf tetap tersimpan; coba lagi.",
@@ -496,11 +497,12 @@
"disable": "Nonaktifkan isolasi", "disable": "Nonaktifkan isolasi",
"notice": { "notice": {
"title": "Perintah perlu diperiksa", "title": "Perintah perlu diperiksa",
"missing": "Komponen eksekusi tidak ditemukan. Periksa pemasangannya; Anda tetap dapat mengobrol.", "missing": "Gateway tidak menemukan {{launcher}}. Jika sudah terpasang, atur jalur lengkapnya. Jika belum, hubungi pengelola paket atau administrator. Anda tetap bisa mengobrol.",
"path": "Komponen yang dikonfigurasi tidak tersedia. Periksa lokasi dan izin aksesnya.", "path": "Gateway tidak dapat menggunakan jalur {{launcher}} yang dikonfigurasi. Periksa jalur lengkap dan izin aksesnya.",
"permissions": "Komponen tidak berada di lokasi terlindungi. Hubungi pengelola paket atau administrator.", "permissions": "{{launcher}} tidak berada di lokasi terlindungi. Hubungi pengelola paket atau administrator.",
"startup": "Lingkungan isolasi tidak dapat dimulai. Periksa pemasangan dan pembatasan sistem.", "startup": "{{launcher}} tidak dapat dimulai. Periksa instalasi gateway dan pembatasan sistem.",
"openSettings": "Periksa pengaturan" "configurePath": "Atur jalur {{launcher}}",
"openSettings": "Buka pengaturan sandbox"
}, },
"states": { "states": {
"disabled": "Perintah nonaktif", "disabled": "Perintah nonaktif",
@@ -522,7 +524,7 @@
"checking": "Menjalankan uji sandbox dengan batas waktu…" "checking": "Menjalankan uji sandbox dengan batas waktu…"
}, },
"reasons": { "reasons": {
"launcher_missing": "Peluncur tidak ditemukan. Pasang di gateway atau isi jalur absolut tepercaya di bawah.", "launcher_missing": "Gateway tidak menemukan {{launcher}}. Jika sudah terpasang, masukkan jalur lengkapnya di bawah. Jika belum, hubungi pengelola paket atau administrator.",
"path_not_absolute": "Masukkan jalur absolut, bukan nama perintah.", "path_not_absolute": "Masukkan jalur absolut, bukan nama perintah.",
"not_executable": "Jalur harus menuju berkas yang dapat dieksekusi.", "not_executable": "Jalur harus menuju berkas yang dapat dieksekusi.",
"agent_writable": "Agen dapat menulis ke jalur ini. Minta pemasangan terlindungi kepada pengelola paket.", "agent_writable": "Agen dapat menulis ke jalur ini. Minta pemasangan terlindungi kepada pengelola paket.",
+9 -7
View File
@@ -486,7 +486,8 @@
"checking": "確認中…", "checking": "確認中…",
"scope": "一時ファイルのみで保存済みのランチャーを確認します。完全なセキュリティ監査ではありません。コマンドに設定を適用するにはゲートウェイを再起動してください。", "scope": "一時ファイルのみで保存済みのランチャーを確認します。完全なセキュリティ監査ではありません。コマンドに設定を適用するにはゲートウェイを再起動してください。",
"path": "信頼するランチャーのパス", "path": "信頼するランチャーのパス",
"pathHelp": "通常は空欄のままシステム検索を使います。独自のインストールでは、パッケージ管理者にランチャーの完全なパスを確認してください。ファイルと親ディレクトリは root 所有で、グループや他のユーザーが書き込めず、Agent の書き込み範囲外である必要があります。", "launcher": "サンドボックスランチャー",
"pathHelp": "通常は空欄のままシステムで {{launcher}} を検索します。独自のインストールでは、パッケージ管理者にランチャーの完全なパスを確認してください。ファイルと親ディレクトリは root 所有で、グループや他のユーザーが書き込めず、Agent の書き込み範囲外である必要があります。",
"automatic": "システム検索", "automatic": "システム検索",
"checkError": "確認できませんでした。設定を開き直して再試行してください。", "checkError": "確認できませんでした。設定を開き直して再試行してください。",
"saveError": "保存できませんでした。下書きを保持しています。再試行してください。", "saveError": "保存できませんでした。下書きを保持しています。再試行してください。",
@@ -496,11 +497,12 @@
"disable": "隔離を無効化", "disable": "隔離を無効化",
"notice": { "notice": {
"title": "コマンドの設定を確認してください", "title": "コマンドの設定を確認してください",
"missing": "コマンド実行コンポーネントが見つかりません。インストール先を確認してください。チャットは続けられます。", "missing": "ゲートウェイで {{launcher}} が見つかりません。インストール済みなら完全なパスを設定してください。未導入の場合はパッケージ管理者にご相談ください。チャットは引き続き使えます。",
"path": "設定された実行コンポーネントを利用できません。場所とアクセス権を確認してください。", "path": "ゲートウェイで設定済みの {{launcher}} パスを使用できません。完全なパスとアクセス権限を確認してください。",
"permissions": "実行コンポーネントが保護された場所にありません。パッケージの管理者またはシステム管理者に連絡してください。", "permissions": "{{launcher}} が保護された場所にありません。パッケージ管理者にご相談ください。",
"startup": "隔離環境を起動できませんでした。インストールとシステムの制限を確認してください。", "startup": "{{launcher}} を起動できませんでした。ゲートウェイのインストール状態とシステムの制限を確認してください。",
"openSettings": "設定を確認" "configurePath": "{{launcher}} のパスを設定",
"openSettings": "サンドボックス設定を開く"
}, },
"states": { "states": {
"disabled": "コマンド無効", "disabled": "コマンド無効",
@@ -522,7 +524,7 @@
"checking": "時間制限付きのサンドボックステストを実行中…" "checking": "時間制限付きのサンドボックステストを実行中…"
}, },
"reasons": { "reasons": {
"launcher_missing": "ランチャーが見つかりません。ゲートウェイにインストールするか、下に信頼する絶対パスを指定してください。", "launcher_missing": "ゲートウェイで {{launcher}} が見つかりません。インストール済みなら下に完全なパスを入力してください。未導入の場合はパッケージ管理者にご相談ください。",
"path_not_absolute": "コマンド名ではなく絶対パスを入力してください。", "path_not_absolute": "コマンド名ではなく絶対パスを入力してください。",
"not_executable": "実行可能なファイルを指定してください。", "not_executable": "実行可能なファイルを指定してください。",
"agent_writable": "Agent が書き込める場所です。パッケージ管理者に保護された場所へのインストールを依頼してください。", "agent_writable": "Agent が書き込める場所です。パッケージ管理者に保護された場所へのインストールを依頼してください。",
+9 -7
View File
@@ -486,7 +486,8 @@
"checking": "확인 중…", "checking": "확인 중…",
"scope": "임시 파일만 사용해 저장된 실행기를 확인합니다. 전체 보안 감사가 아닙니다. 명령 실행에 저장된 설정을 적용하려면 게이트웨이를 다시 시작하세요.", "scope": "임시 파일만 사용해 저장된 실행기를 확인합니다. 전체 보안 감사가 아닙니다. 명령 실행에 저장된 설정을 적용하려면 게이트웨이를 다시 시작하세요.",
"path": "신뢰할 실행기 경로", "path": "신뢰할 실행기 경로",
"pathHelp": "보통은 비워 두고 시스템에서 찾도록 합니다. 사용자 지정 설치는 패키지 관리자에게 실행기의 전체 경로를 문의하세요. 파일과 상위 폴더는 root 소유여야 하며 그룹·다른 사용자가 쓸 수 없고 Agent 쓰기 범위 밖이어야 합니다.", "launcher": "샌드박스 실행기",
"pathHelp": "보통은 비워 두고 시스템에서 {{launcher}}을(를) 찾도록 합니다. 사용자 지정 설치는 패키지 관리자에게 실행기의 전체 경로를 문의하세요. 파일과 상위 폴더는 root 소유여야 하며 그룹·다른 사용자가 쓸 수 없고 Agent 쓰기 범위 밖이어야 합니다.",
"automatic": "시스템에서 찾기", "automatic": "시스템에서 찾기",
"checkError": "확인하지 못했습니다. 설정을 다시 열고 재시도하세요.", "checkError": "확인하지 못했습니다. 설정을 다시 열고 재시도하세요.",
"saveError": "저장하지 못했습니다. 초안을 유지했습니다. 다시 시도하세요.", "saveError": "저장하지 못했습니다. 초안을 유지했습니다. 다시 시도하세요.",
@@ -496,11 +497,12 @@
"disable": "격리 끄기", "disable": "격리 끄기",
"notice": { "notice": {
"title": "명령 설정을 확인해 주세요", "title": "명령 설정을 확인해 주세요",
"missing": "명령 실행 구성 요소를 찾을 수 없습니다. 설치 위치를 확인해 주세요. 대화는 계속할 수 있습니다.", "missing": "게이트웨이에서 {{launcher}}을(를) 찾지 못했습니다. 설치되어 있다면 전체 경로를 설정하세요. 없다면 패키지 관리자에게 문의하세요. 채팅은 계속할 수 있습니다.",
"path": "설정된 실행 구성 요소를 사용할 수 없습니다. 위치와 접근 권한을 확인해 주세요.", "path": "게이트웨이에서 설정된 {{launcher}} 경로를 사용할 수 없습니다. 전체 경로와 접근 권한을 확인하세요.",
"permissions": "실행 구성 요소가 보호된 위치에 없습니다. 패키지 관리자나 시스템 관리자에게 문의해 주세요.", "permissions": "{{launcher}}이(가) 보호된 위치에 없습니다. 패키지 관리자에게 문의하세요.",
"startup": "격리 환경을 시작할 수 없습니다. 설치와 시스템 제한을 확인해 주세요.", "startup": "{{launcher}}을(를) 시작하지 못했습니다. 게이트웨이 설치 상태와 시스템 제한을 확인하세요.",
"openSettings": "설정 확인" "configurePath": "{{launcher}} 경로 설정",
"openSettings": "샌드박스 설정 열기"
}, },
"states": { "states": {
"disabled": "명령 비활성화", "disabled": "명령 비활성화",
@@ -522,7 +524,7 @@
"checking": "시간 제한이 있는 샌드박스 테스트 중…" "checking": "시간 제한이 있는 샌드박스 테스트 중…"
}, },
"reasons": { "reasons": {
"launcher_missing": "실행기를 찾지 못했습니다. 게이트웨이에 설치하거나 아래에 신뢰할 절대 경로를 입력하세요.", "launcher_missing": "게이트웨이에서 {{launcher}}을(를) 찾지 못했습니다. 설치되어 있다면 아래에 전체 경로를 입력하세요. 없다면 패키지 관리자에게 문의하세요.",
"path_not_absolute": "명령 이름이 아닌 절대 경로를 입력하세요.", "path_not_absolute": "명령 이름이 아닌 절대 경로를 입력하세요.",
"not_executable": "실행 파일을 가리키는 경로여야 합니다.", "not_executable": "실행 파일을 가리키는 경로여야 합니다.",
"agent_writable": "Agent가 쓸 수 있는 경로입니다. 패키지 관리자에게 보호된 설치 위치를 요청하세요.", "agent_writable": "Agent가 쓸 수 있는 경로입니다. 패키지 관리자에게 보호된 설치 위치를 요청하세요.",
+9 -7
View File
@@ -486,7 +486,8 @@
"checking": "Verificando…", "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.", "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", "path": "Caminho do iniciador confiável",
"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.", "launcher": "iniciador do sandbox",
"pathHelp": "Normalmente, deixe vazio para buscar {{launcher}} 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", "automatic": "Busca no sistema",
"checkError": "Não foi possível verificar. Reabra as configurações e tente novamente.", "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.", "saveError": "Não foi possível salvar. O rascunho foi mantido; tente novamente.",
@@ -496,11 +497,12 @@
"disable": "Desativar isolamento", "disable": "Desativar isolamento",
"notice": { "notice": {
"title": "Os comandos precisam de atenção", "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.", "missing": "O gateway não encontrou {{launcher}}. Se estiver instalado, configure o caminho completo. Caso contrário, contate o mantenedor do pacote ou administrador. Você pode continuar conversando.",
"path": "O componente configurado está indisponível. Verifique o local e as permissões de acesso.", "path": "O gateway não pode usar o caminho configurado de {{launcher}}. Verifique o caminho completo 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.", "permissions": "{{launcher}} não está em um local protegido. Contate o mantenedor do pacote ou administrador.",
"startup": "O ambiente de isolamento não pôde iniciar. Verifique a instalação e as restrições do sistema.", "startup": "{{launcher}} não pôde iniciar. Verifique a instalação do gateway e as restrições do sistema.",
"openSettings": "Verificar configurações" "configurePath": "Configurar caminho de {{launcher}}",
"openSettings": "Abrir configurações do sandbox"
}, },
"states": { "states": {
"disabled": "Comandos desativados", "disabled": "Comandos desativados",
@@ -522,7 +524,7 @@
"checking": "Executando um teste com limite de tempo…" "checking": "Executando um teste com limite de tempo…"
}, },
"reasons": { "reasons": {
"launcher_missing": "Iniciador não encontrado. Instale-o no gateway ou informe um caminho absoluto confiável.", "launcher_missing": "O gateway não encontrou {{launcher}}. Se estiver instalado, informe o caminho completo abaixo. Caso contrário, contate o mantenedor do pacote ou administrador.",
"path_not_absolute": "Informe um caminho absoluto, não um nome de comando.", "path_not_absolute": "Informe um caminho absoluto, não um nome de comando.",
"not_executable": "O caminho deve apontar para um arquivo executável.", "not_executable": "O caminho deve apontar para um arquivo executável.",
"agent_writable": "O agente pode gravar nesse caminho. Peça uma instalação protegida ao mantenedor do pacote.", "agent_writable": "O agente pode gravar nesse caminho. Peça uma instalação protegida ao mantenedor do pacote.",
+9 -7
View File
@@ -486,7 +486,8 @@
"checking": "Đang kiểm tra…", "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.", "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", "path": "Đường dẫn trình khởi chạy tin cậy",
"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.", "launcher": "trình khởi chạy sandbox",
"pathHelp": "Thông thường hãy để trống để tìm {{launcher}} 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", "automatic": "Tìm trong hệ thống",
"checkError": "Chưa kiểm tra được. Mở lại cài đặt và thử lại.", "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.", "saveError": "Không lưu được. Bản nháp được giữ lại; hãy thử lại.",
@@ -496,11 +497,12 @@
"disable": "Tắt cô lập", "disable": "Tắt cô lập",
"notice": { "notice": {
"title": "Cần kiểm tra lệnh", "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.", "missing": "Gateway không tìm thấy {{launcher}}. Nếu đã cài, hãy đặt đường dẫn đầy đủ. Nếu chưa, hãy liên hệ người duy trì gói hoặc quản trị viên. 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.", "path": "Gateway không thể dùng đường dẫn {{launcher}} đã cấu hình. Hãy kiểm tra đường dẫn đầy đủ 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.", "permissions": "{{launcher}} không nằm ở vị trí được bảo vệ. Hãy liên hệ người duy 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.", "startup": "{{launcher}} không khởi động được. Hãy kiểm tra cài đặt gateway và giới hạn hệ thống.",
"openSettings": "Kiểm tra cài đặt" "configurePath": "Đặt đường dẫn {{launcher}}",
"openSettings": "Mở cài đặt sandbox"
}, },
"states": { "states": {
"disabled": "Đã tắt lệnh", "disabled": "Đã tắt lệnh",
@@ -522,7 +524,7 @@
"checking": "Đang chạy kiểm tra sandbox có giới hạn thời gian…" "checking": "Đang chạy kiểm tra sandbox có giới hạn thời gian…"
}, },
"reasons": { "reasons": {
"launcher_missing": "Không tìm thấy trình khởi chạy. Cài trên gateway hoặc nhập đường dẫn tuyệt đối tin cậy bên dưới.", "launcher_missing": "Gateway không tìm thấy {{launcher}}. Nếu đã cài, hãy nhập đường dẫn đầy đủ bên dưới. Nếu chưa, hãy liên hệ người duy trì gói hoặc quản trị viên.",
"path_not_absolute": "Nhập đường dẫn tuyệt đối, không phải tên lệnh.", "path_not_absolute": "Nhập đường dẫn tuyệt đối, không phải tên lệnh.",
"not_executable": "Đường dẫn phải trỏ đến tệp thực thi.", "not_executable": "Đường dẫn phải trỏ đến tệp thực thi.",
"agent_writable": "Agent có thể ghi vào đường dẫn này. Hãy nhờ người duy trì gói cung cấp vị trí cài đặt được bảo vệ.", "agent_writable": "Agent có thể ghi vào đường dẫn này. Hãy nhờ người duy trì gói cung cấp vị trí cài đặt được bảo vệ.",
+9 -7
View File
@@ -486,7 +486,8 @@
"checking": "检测中…", "checking": "检测中…",
"scope": "仅使用临时文件检测已保存的启动器,不代表完整安全审计。保存后需重启网关,命令执行才会使用新配置。", "scope": "仅使用临时文件检测已保存的启动器,不代表完整安全审计。保存后需重启网关,命令执行才会使用新配置。",
"path": "可信启动器路径", "path": "可信启动器路径",
"pathHelp": "通常留空,由系统自动查找。特殊安装请向安装包维护者索取启动器的完整路径。文件及上级目录须归 root 所有、不可被组或其他用户写入,且不在 Agent 可写范围内。", "launcher": "沙箱启动器",
"pathHelp": "通常留空,由系统自动查找 {{launcher}}。特殊安装请向安装包维护者索取启动器的完整路径。文件及上级目录须归 root 所有、不可被组或其他用户写入,且不在 Agent 可写范围内。",
"automatic": "系统自动查找", "automatic": "系统自动查找",
"checkError": "检测未完成,请重新打开设置后重试。", "checkError": "检测未完成,请重新打开设置后重试。",
"saveError": "保存失败,草稿已保留,请重试。", "saveError": "保存失败,草稿已保留,请重试。",
@@ -496,11 +497,12 @@
"disable": "关闭隔离", "disable": "关闭隔离",
"notice": { "notice": {
"title": "命令暂时不可用", "title": "命令暂时不可用",
"missing": "未找到命令运行组件。请检查安装位置,聊天仍可继续。", "missing": "网关未找到 {{launcher}}。已安装请填写完整路径;未安装请联系安装包维护者或管理员。聊天仍可继续。",
"path": "配置的运行组件路径不可用。请检查位置和访问权限。", "path": "网关无法使用配置的 {{launcher}} 路径。请检查完整路径和访问权限。",
"permissions": "运行组件所在位置不符合安全要求。请联系安装包维护者或管理员。", "permissions": "{{launcher}} 所在位置不符合安全要求。请联系安装包维护者或管理员。",
"startup": "隔离环境未能启动。请检查安装和系统限制。", "startup": "{{launcher}} 未能启动。请检查网关的安装和系统限制。",
"openSettings": "检查设置" "configurePath": "配置 {{launcher}} 路径",
"openSettings": "打开沙箱设置"
}, },
"states": { "states": {
"disabled": "命令已停用", "disabled": "命令已停用",
@@ -522,7 +524,7 @@
"checking": "正在进行有时间限制的沙箱测试…" "checking": "正在进行有时间限制的沙箱测试…"
}, },
"reasons": { "reasons": {
"launcher_missing": "未找到启动器,请在网关安装,或在下方填写可信绝对路径。", "launcher_missing": "网关未找到 {{launcher}}。已安装请在下方填写完整路径;未安装请联系安装包维护者或管理员。",
"path_not_absolute": "请填写绝对路径,而不是命令名称。", "path_not_absolute": "请填写绝对路径,而不是命令名称。",
"not_executable": "该路径必须指向可执行文件。", "not_executable": "该路径必须指向可执行文件。",
"agent_writable": "启动器位于 Agent 可写范围,请联系安装包维护者提供受保护的安装位置。", "agent_writable": "启动器位于 Agent 可写范围,请联系安装包维护者提供受保护的安装位置。",
+9 -7
View File
@@ -486,7 +486,8 @@
"checking": "檢測中…", "checking": "檢測中…",
"scope": "僅使用暫存檔檢測已儲存的啟動器,不代表完整安全稽核。儲存後須重新啟動閘道,命令執行才會使用新設定。", "scope": "僅使用暫存檔檢測已儲存的啟動器,不代表完整安全稽核。儲存後須重新啟動閘道,命令執行才會使用新設定。",
"path": "可信啟動器路徑", "path": "可信啟動器路徑",
"pathHelp": "通常留空,由系統自動查找。特殊安裝請向安裝套件維護者索取啟動器的完整路徑。檔案及上層目錄須由 root 擁有、不可供群組或其他使用者寫入,且不在 Agent 可寫範圍內。", "launcher": "沙箱啟動器",
"pathHelp": "通常留空,由系統自動查找 {{launcher}}。特殊安裝請向安裝套件維護者索取啟動器的完整路徑。檔案及上層目錄須由 root 擁有、不可供群組或其他使用者寫入,且不在 Agent 可寫範圍內。",
"automatic": "系統自動查找", "automatic": "系統自動查找",
"checkError": "檢測未完成,請重新開啟設定後再試。", "checkError": "檢測未完成,請重新開啟設定後再試。",
"saveError": "儲存失敗,草稿已保留,請再試。", "saveError": "儲存失敗,草稿已保留,請再試。",
@@ -496,11 +497,12 @@
"disable": "關閉隔離", "disable": "關閉隔離",
"notice": { "notice": {
"title": "指令暫時無法使用", "title": "指令暫時無法使用",
"missing": "找不到指令執行元件。請檢查安裝位置,仍可繼續聊天。", "missing": "閘道未找到 {{launcher}}。已安裝請填寫完整路徑;未安裝請聯絡安裝套件維護者或管理員。聊天仍可繼續。",
"path": "設定的執行元件路徑無法使用。請檢查位置與存取權限。", "path": "閘道無法使用設定的 {{launcher}} 路徑。請檢查完整路徑和存取權限。",
"permissions": "執行元件所在位置不符合安全要求。請聯絡安裝套件維護者或管理員。", "permissions": "{{launcher}} 所在位置不符合安全要求。請聯絡安裝套件維護者或管理員。",
"startup": "無法啟動隔離環境。請檢查安裝與系統限制。", "startup": "{{launcher}} 未能啟動。請檢查閘道的安裝和系統限制。",
"openSettings": "檢查設定" "configurePath": "設定 {{launcher}} 路徑",
"openSettings": "開啟沙箱設定"
}, },
"states": { "states": {
"disabled": "命令已停用", "disabled": "命令已停用",
@@ -522,7 +524,7 @@
"checking": "正在進行有時間限制的沙箱測試…" "checking": "正在進行有時間限制的沙箱測試…"
}, },
"reasons": { "reasons": {
"launcher_missing": "找不到啟動器,請在閘道安裝,或在下方填寫可信絕對路徑。", "launcher_missing": "閘道未找到 {{launcher}}。已安裝請在下方填寫完整路徑;未安裝請聯絡安裝套件維護者或管理員。",
"path_not_absolute": "請填寫絕對路徑,而非命令名稱。", "path_not_absolute": "請填寫絕對路徑,而非命令名稱。",
"not_executable": "此路徑必須指向可執行檔。", "not_executable": "此路徑必須指向可執行檔。",
"agent_writable": "啟動器位於 Agent 可寫範圍,請聯絡套件維護者提供受保護的安裝位置。", "agent_writable": "啟動器位於 Agent 可寫範圍,請聯絡套件維護者提供受保護的安裝位置。",
+8
View File
@@ -0,0 +1,8 @@
import type { SandboxCheck } from "./types";
/** Names come from the gateway's supported backend, never the browser's OS. */
export function sandboxLauncherDisplay(backend: SandboxCheck["supported_backend"] | undefined) {
if (backend === "bwrap") return { name: "Bubblewrap (bwrap)", executable: "bwrap" };
if (backend === "seatbelt") return { name: "macOS Seatbelt (sandbox-exec)", executable: "sandbox-exec" };
return null;
}
+5 -3
View File
@@ -31,8 +31,8 @@ function tool(receive: (event: InboundEvent) => void, values: Partial<ToolProgre
describe("Live sandbox guidance", () => { describe("Live sandbox guidance", () => {
it.each([ it.each([
["sandbox_path_unavailable", "Check its location and access permissions"], ["sandbox_path_unavailable", "Check its full path and access permissions"],
["sandbox_start_failed", "Check the installation and system restrictions"], ["sandbox_start_failed", "Check the gateway installation and system restrictions"],
])("explains the known launcher failure %s", (error_code, copy) => { ])("explains the known launcher failure %s", (error_code, copy) => {
const { client, receive } = createStreamClient(); const { client, receive } = createStreamClient();
render(<Harness client={client} />); render(<Harness client={client} />);
@@ -56,8 +56,10 @@ describe("Live sandbox guidance", () => {
expect(screen.getByRole("status")).toHaveAttribute("aria-live", "polite"); expect(screen.getByRole("status")).toHaveAttribute("aria-live", "polite");
expect(draft).toHaveFocus(); expect(draft).toHaveFocus();
expect(draft).toHaveValue("Keep my draft"); expect(draft).toHaveValue("Keep my draft");
expect(screen.getByRole("status")).toHaveTextContent("sandbox launcher");
expect(screen.getByRole("status")).not.toHaveTextContent(/bwrap|sandbox-exec/);
expect(onOpen).not.toHaveBeenCalled(); expect(onOpen).not.toHaveBeenCalled();
fireEvent.click(screen.getByRole("button", { name: "Check settings" })); fireEvent.click(screen.getByRole("button", { name: "Open sandbox settings" }));
expect(onOpen).toHaveBeenCalledOnce(); expect(onOpen).toHaveBeenCalledOnce();
}); });
+10 -3
View File
@@ -26,7 +26,7 @@ describe("Saved sandbox settings", () => {
it("checks saved configuration explicitly without changing the isolation policy", async () => { it("checks saved configuration explicitly without changing the isolation policy", async () => {
const sandbox = open(); const sandbox = open();
expect(sandbox.getByText(/Launcher not found/)).toBeVisible(); expect(sandbox.getByText(/Bubblewrap \(bwrap\) was not found on the gateway/)).toBeVisible();
expect(requestMutationMock).not.toHaveBeenCalled(); expect(requestMutationMock).not.toHaveBeenCalled();
requestMutationMock.mockResolvedValue({ sandbox: { requestMutationMock.mockResolvedValue({ sandbox: {
...payload().advanced.exec_sandbox_status, state: "passed", reason: "", launcher: "/usr/bin/bwrap", ...payload().advanced.exec_sandbox_status, state: "passed", reason: "", launcher: "/usr/bin/bwrap",
@@ -37,13 +37,20 @@ describe("Saved sandbox settings", () => {
expect(sandbox.getByText(/Restart the gateway/)).toBeVisible(); expect(sandbox.getByText(/Restart the gateway/)).toBeVisible();
}); });
it("opens the launcher editor from a recovery link without editing or checking automatically", () => { it.each([
renderSettingsView({ initialSection: "advanced", initialSettings: payload(), webuiCapabilities: capability, ["bwrap", "Bubblewrap (bwrap)"],
["seatbelt", "macOS Seatbelt (sandbox-exec)"],
] as const)("opens the gateway's %s path editor without editing or checking automatically", (backend, launcher) => {
const settings = payload();
settings.runtime_config!["tools.exec.sandbox"] = backend;
settings.advanced.exec_sandbox_status!.supported_backend = backend;
renderSettingsView({ initialSection: "advanced", initialSettings: settings, webuiCapabilities: capability,
focusTarget: "sandbox-launcher" }); focusTarget: "sandbox-launcher" });
const sandbox = within(screen.getByRole("region", { name: "Command sandbox" })); const sandbox = within(screen.getByRole("region", { name: "Command sandbox" }));
expect(sandbox.getByRole("button", { name: "Advanced options" })).toHaveAttribute("aria-expanded", "true"); 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" })).toHaveFocus();
expect(sandbox.getByRole("textbox", { name: "Trusted launcher path" })).toHaveValue(""); expect(sandbox.getByRole("textbox", { name: "Trusted launcher path" })).toHaveValue("");
expect(sandbox.getByText(/Usually leave this blank for system lookup of/)).toHaveTextContent(launcher);
expect(requestMutationMock).not.toHaveBeenCalled(); expect(requestMutationMock).not.toHaveBeenCalled();
}); });
+38
View File
@@ -1705,6 +1705,44 @@ describe("ThreadShell", () => {
expect(await screen.findByText("backup")).toBeInTheDocument(); expect(await screen.findByText("backup")).toBeInTheDocument();
}); });
it.each([
["bwrap", "MacIntel", "Bubblewrap (bwrap)", "Configure bwrap path"],
["seatbelt", "Linux x86_64", "macOS Seatbelt (sandbox-exec)", "Configure sandbox-exec path"],
] as const)("uses the gateway's %s launcher and links to its path editor", async (backend, browserPlatform, launcher, action) => {
const platform = vi.spyOn(navigator, "platform", "get").mockReturnValue(browserPlatform);
try {
const client = makeClient();
const openSettings = vi.fn();
const settings = modelSettings("test-model", "deepseek");
settings.advanced.exec_sandbox_status = {
state: "unavailable", reason: "launcher_missing", launcher: null,
revision: "gateway-launcher", supported_backend: backend,
};
render(wrap(client, <ThreadShell session={session("sandbox-notice")} title="Sandbox notice"
onToggleSidebar={() => {}} settingsSnapshot={settings} onOpenSandboxSettings={openSettings}
/>, undefined, "tok", ["webui.sandbox-settings.v1"]));
const input = await screen.findByRole("textbox");
fireEvent.change(input, { target: { value: "Keep my draft" } });
input.focus();
act(() => {
client._emitChat("sandbox-notice", { event: "user_message", chat_id: "sandbox-notice",
turn_id: "sandbox-turn", starts_turn: true, text: "Run a command" });
client._emitChat("sandbox-notice", { event: "message", chat_id: "sandbox-notice", text: "",
turn_id: "sandbox-turn", kind: "progress", tool_events: [{
name: "exec", phase: "error", error_code: "sandbox_launcher_missing", call_id: "sandbox-command",
}] });
});
const banner = (await screen.findByRole("button", { name: action })).closest<HTMLElement>('[role="status"]')!;
expect(banner).toHaveTextContent(launcher);
expect(input).toHaveFocus();
fireEvent.click(within(banner).getByRole("button", { name: action }));
expect(openSettings).toHaveBeenCalledWith("sandbox-launcher");
expect(input).toHaveValue("Keep my draft");
} finally {
platform.mockRestore();
}
});
it("shows a dismissible, session-scoped fallback notice without changing the composer preset", async () => { it("shows a dismissible, session-scoped fallback notice without changing the composer preset", async () => {
const client = makeClient(); const client = makeClient();
const openSettings = vi.fn(); const openSettings = vi.fn();