返回 CodeWhale
docs-sandbox.ts
根目录 / web / lib / i18n / dictionaries / en / docs-sandbox.ts
1 import type { DocsSandboxDict } from "../types";
2
3 /**
4 * English reference dictionary for `app/[locale]/docs/sandbox/page.tsx`.
5 * Copy moved verbatim from the page's `isZh` ternaries — any wording change
6 * belongs in its own commit, never mixed into a structural move.
7 */
8 export const docsSandbox: DocsSandboxDict = {
9 metaTitle: "Sandbox & Approval · Codewhale Docs",
10 metaDescription:
11 "The honest boundary: macOS Seatbelt, opt-in Linux bubblewrap, platform gaps, and approval policy.",
12 bodyClassName: "text-ink-soft leading-relaxed",
13 overviewTitle: "Sandbox & Approval",
14 overviewLead:
15 "Codewhale can launch shell commands proposed by a model. Approval policy, workspace-aware tools, and an operating-system command wrapper are separate controls: an approval is not a sandbox, and selecting workspace-write does not prove the current platform has an OS wrapper available. This page describes only behavior wired into the command execution path.",
16 platforms: [
17 [
18 "macOS · Seatbelt",
19 "Codewhale probes /usr/bin/sandbox-exec; when the probe succeeds and the policy requests a sandbox, the child command is wrapped in a generated Seatbelt profile: broad filesystem reads, policy-limited writes, and network only when the policy enables it. A failed probe is reported honestly as no OS sandbox.",
20 ],
21 [
22 "Linux · opt-in bubblewrap",
23 "Linux command sandboxing is opt-in: set prefer_bwrap = true and keep /usr/bin/bwrap executable. The child gets a read-only root view with writable mounts derived from the resolved policy; the network namespace is isolated by default and --share-net is added only when the policy enables network access. Without the opt-in, Codewhale reports none.",
24 ],
25 [
26 "Windows · no OS sandbox",
27 "The Windows command path currently reports no OS sandbox. Host permissions and approval policy still apply, but they are not a Codewhale OS command sandbox.",
28 ],
29 [
30 "External OpenSandbox execution",
31 'With sandbox_backend = "opensandbox", shell execution is sent to the configured OpenSandbox-compatible HTTP endpoint instead of starting a local child. Isolation guarantees belong to the configured service and its operator.',
32 ],
33 ],
34 policiesTitle: "Policies and fallbacks",
35 policiesLead:
36 "The local {sandboxMode} values are {readOnly}, {workspaceWrite}, {dangerFullAccess}, and {externalSandbox}. The first two are enforced by Seatbelt or bubblewrap only when that wrapper is selected and available; {dangerFullAccess} deliberately bypasses the local OS wrapper; {externalSandbox} declares that execution is already externally isolated. When no wrapper is selected, the shell command runs without Codewhale OS isolation — approval rules and workspace-aware native file tools remain separate controls.",
37 diagnosticsTitle: "Diagnostics and limits",
38 diagnosticsLead:
39 "codewhale setup --status, codewhale doctor, codewhale doctor --json, and the diagnostics tool report the locally available wrapper after applying the resolved bubblewrap preference. Denial attribution is intentionally conservative: a child command's generic Permission denied is not by itself proof that Codewhale's sandbox blocked it, and unsandboxed command failures are never labeled sandbox denials.",
40 diagnosticsLimits:
41 "The limitations are stated just as plainly: availability is checked before launch, yet the selected wrapper can still fail because of host policy, container restrictions, or a race after the probe; bubblewrap ignores a configured writable root that is missing or not a directory; and no sandbox protects against kernel vulnerabilities or all resource-exhaustion and side-channel attacks.",
42 sourceNote: "Source document: docs/SANDBOX.md · Update docs-map.ts when changing.",
43 };
44
44 lines TYPESCRIPT