chore: initialize qiming workspace repository

This commit is contained in:
Codex
2026-05-29 14:22:48 +08:00
commit bfd67a0f2c
10750 changed files with 1885711 additions and 0 deletions

View File

@@ -0,0 +1,212 @@
/**
* 单元测试: constants
*
* 测试应用常量的完整性和一致性
*/
import { describe, it, expect } from "vitest";
import {
APP_DISPLAY_NAME,
APP_NAME_IDENTIFIER,
APP_DATA_DIR_NAME,
DEFAULT_MCP_PROXY_PORT,
DEFAULT_FILE_SERVER_PORT,
DEFAULT_AGENT_RUNNER_PORT,
DEFAULT_LANPROXY_PORT,
DEFAULT_DEV_SERVER_PORT,
LOCALHOST_IP,
LOCALHOST_HOSTNAME,
LOCAL_HOST_URL,
DEFAULT_ANTHROPIC_API_URL,
DEFAULT_SERVER_HOST,
DEFAULT_AI_ENGINE,
isAgentEngineType,
normalizeAgentEngine,
normalizeOptionalPort,
SUPPORTED_AGENT_ENGINES,
DEFAULT_AI_MODEL,
DEFAULT_MAX_TOKENS,
DEFAULT_TEMPERATURE,
MODEL_OPTIONS,
DEFAULT_API_TIMEOUT,
DEFAULT_SSE_RETRY_DELAY,
DEFAULT_SSE_MAX_RETRY_DELAY,
DEFAULT_SSE_HEARTBEAT_INTERVAL,
DEFAULT_STARTUP_DELAY,
CLEANUP_TIMEOUT,
PROCESS_KILL_ESCALATION_TIMEOUT,
ACP_ABORT_TIMEOUT,
ENGINE_DESTROY_TIMEOUT,
DEPS_SYNC_TIMEOUT,
NPM_MIRRORS,
UV_MIRRORS,
DEFAULT_MIRROR_CONFIG,
STORAGE_KEYS,
AUTH_KEYS,
} from "./constants";
describe("Constants", () => {
describe("App Identity", () => {
it("should have consistent app name", () => {
expect(APP_DISPLAY_NAME).toBe("QimingClaw");
expect(APP_NAME_IDENTIFIER).toBe("qimingclaw");
});
it("should have app data dir name with dot prefix", () => {
expect(APP_DATA_DIR_NAME).toBe(".qimingclaw");
});
});
describe("Port Configuration", () => {
it("should have valid port numbers", () => {
expect(DEFAULT_MCP_PROXY_PORT).toBeGreaterThan(0);
expect(DEFAULT_MCP_PROXY_PORT).toBeLessThan(65536);
expect(DEFAULT_FILE_SERVER_PORT).toBe(60005);
expect(DEFAULT_AGENT_RUNNER_PORT).toBe(60006);
expect(DEFAULT_LANPROXY_PORT).toBe(60002);
expect(DEFAULT_DEV_SERVER_PORT).toBe(60173);
});
it("should have non-overlapping ports", () => {
const ports = [
DEFAULT_MCP_PROXY_PORT,
DEFAULT_FILE_SERVER_PORT,
DEFAULT_AGENT_RUNNER_PORT,
DEFAULT_LANPROXY_PORT,
DEFAULT_DEV_SERVER_PORT,
];
const uniquePorts = new Set(ports);
expect(uniquePorts.size).toBe(ports.length);
});
});
describe("Host Configuration", () => {
it("should have localhost configuration", () => {
expect(LOCALHOST_IP).toBe("127.0.0.1");
expect(LOCALHOST_HOSTNAME).toBe("localhost");
expect(LOCAL_HOST_URL).toBe("http://127.0.0.1");
});
});
describe("API URLs", () => {
it("should have valid API URLs", () => {
expect(DEFAULT_ANTHROPIC_API_URL).toMatch(/^https?:\/\//);
expect(DEFAULT_SERVER_HOST).toMatch(/^https?:\/\//);
});
});
describe("AI Configuration", () => {
it("should have valid AI engine type", () => {
expect(["claude-code", "qimingcode"]).toContain(DEFAULT_AI_ENGINE);
expect(SUPPORTED_AGENT_ENGINES).toEqual(["claude-code", "qimingcode"]);
});
it("should normalize legacy or invalid AI engine values", () => {
expect(isAgentEngineType("claude-code")).toBe(true);
expect(isAgentEngineType("qimingcode")).toBe(true);
expect(isAgentEngineType("hermes-agent")).toBe(false);
expect(normalizeAgentEngine("qimingcode")).toBe("qimingcode");
expect(normalizeAgentEngine("hermes-agent")).toBe(DEFAULT_AI_ENGINE);
expect(normalizeAgentEngine(undefined)).toBe(DEFAULT_AI_ENGINE);
});
it("should normalize optional port values", () => {
expect(normalizeOptionalPort(60001)).toBe(60001);
expect(normalizeOptionalPort("60001")).toBe(60001);
expect(normalizeOptionalPort("")).toBeUndefined();
expect(normalizeOptionalPort("abc")).toBeUndefined();
expect(normalizeOptionalPort(0)).toBeUndefined();
expect(normalizeOptionalPort(65536)).toBeUndefined();
});
it("should have non-empty model name", () => {
expect(DEFAULT_AI_MODEL).toBeTruthy();
expect(DEFAULT_AI_MODEL.length).toBeGreaterThan(0);
});
it("should have valid token limits", () => {
expect(DEFAULT_MAX_TOKENS).toBeGreaterThan(0);
});
it("should have valid temperature range", () => {
expect(DEFAULT_TEMPERATURE).toBeGreaterThanOrEqual(0);
expect(DEFAULT_TEMPERATURE).toBeLessThanOrEqual(1);
});
it("should have model options with labels and values", () => {
MODEL_OPTIONS.forEach((option) => {
expect(option.label).toBeTruthy();
expect(option.value).toBeTruthy();
});
});
});
describe("Timeout Configuration", () => {
it("should have positive timeout values", () => {
expect(DEFAULT_API_TIMEOUT).toBeGreaterThan(0);
expect(DEFAULT_SSE_RETRY_DELAY).toBeGreaterThan(0);
expect(DEFAULT_SSE_MAX_RETRY_DELAY).toBeGreaterThan(0);
expect(DEFAULT_SSE_HEARTBEAT_INTERVAL).toBeGreaterThan(0);
expect(DEFAULT_STARTUP_DELAY).toBeGreaterThan(0);
expect(CLEANUP_TIMEOUT).toBeGreaterThan(0);
expect(PROCESS_KILL_ESCALATION_TIMEOUT).toBeGreaterThan(0);
expect(ACP_ABORT_TIMEOUT).toBeGreaterThan(0);
expect(ENGINE_DESTROY_TIMEOUT).toBeGreaterThan(0);
expect(DEPS_SYNC_TIMEOUT).toBeGreaterThan(0);
});
it("should have max retry delay greater than initial retry delay", () => {
expect(DEFAULT_SSE_MAX_RETRY_DELAY).toBeGreaterThanOrEqual(
DEFAULT_SSE_RETRY_DELAY,
);
});
it("should have process kill escalation shorter than cleanup timeout", () => {
expect(PROCESS_KILL_ESCALATION_TIMEOUT).toBeLessThan(CLEANUP_TIMEOUT);
});
it("should have ACP abort timeout shorter than engine destroy timeout", () => {
expect(ACP_ABORT_TIMEOUT).toBeLessThanOrEqual(ENGINE_DESTROY_TIMEOUT);
});
it("should have deps sync timeout as the largest timeout", () => {
expect(DEPS_SYNC_TIMEOUT).toBeGreaterThan(ENGINE_DESTROY_TIMEOUT);
expect(DEPS_SYNC_TIMEOUT).toBeGreaterThan(CLEANUP_TIMEOUT);
});
});
describe("Mirror Configuration", () => {
it("should have npm mirror presets", () => {
expect(NPM_MIRRORS.OFFICIAL).toContain("npmjs.org");
expect(NPM_MIRRORS.TAOBAO).toContain("npmmirror");
expect(NPM_MIRRORS.TENCENT).toContain("tencent");
});
it("should have uv mirror presets", () => {
expect(UV_MIRRORS.OFFICIAL).toContain("pypi.org");
expect(UV_MIRRORS.TUNA).toContain("tsinghua");
expect(UV_MIRRORS.ALIYUN).toContain("aliyun");
expect(UV_MIRRORS.TENCENT).toContain("tencent");
});
it("should have default mirror config", () => {
expect(DEFAULT_MIRROR_CONFIG.npmRegistry).toBeTruthy();
expect(DEFAULT_MIRROR_CONFIG.uvIndexUrl).toBeTruthy();
});
});
describe("Storage Keys", () => {
it("should have all required storage keys", () => {
expect(STORAGE_KEYS.SETUP_STATE).toBe("setup_state");
expect(STORAGE_KEYS.STEP1_CONFIG).toBe("step1_config");
expect(STORAGE_KEYS.AUTH_USER).toBe("auth_user");
expect(STORAGE_KEYS.API_KEY).toBe("anthropic_api_key");
});
it("should have auth keys", () => {
expect(AUTH_KEYS.USERNAME).toBe("auth.username");
expect(AUTH_KEYS.PASSWORD).toBe("auth.password");
expect(AUTH_KEYS.SAVED_KEY).toBe("auth.saved_key");
});
});
});

View File

@@ -0,0 +1,466 @@
/**
* 应用常量配置
*
* 集中管理所有硬编码值包括端口、URL、IP 地址、默认配置值、存储键名等
* 便于统一维护和修改
*/
import type { AgentEngineType } from "@shared/types/electron";
// ==================== 应用名称 ====================
/** 应用对外显示名称(窗口标题、关于、安装包名称等),与 package.json build.productName 保持一致 */
export const APP_DISPLAY_NAME = "QimingClaw";
/** 应用技术标识(进程名、目录名等,小写字母),与 appId 等保持一致 */
export const APP_NAME_IDENTIFIER = "qimingclaw";
/** 主窗口默认宽度(首次创建窗口时使用) */
export const DEFAULT_WINDOW_WIDTH = 1240;
/** 主窗口默认高度(首次创建窗口时使用) */
export const DEFAULT_WINDOW_HEIGHT = 800;
/** 主窗口最小宽度(窗口可调整尺寸下限) */
export const DEFAULT_WINDOW_MIN_WIDTH = 800;
/** 主窗口最小高度(窗口可调整尺寸下限) */
export const DEFAULT_WINDOW_MIN_HEIGHT = 600;
// ==================== 端口配置 ====================
/** MCP Proxy 默认端口 */
export const DEFAULT_MCP_PROXY_PORT = 18099;
/** Agent Runner 默认端口 */
export const DEFAULT_AGENT_RUNNER_PORT = 60006;
/** File Server 默认端口 */
export const DEFAULT_FILE_SERVER_PORT = 60005;
/** Lanproxy 默认端口 */
export const DEFAULT_LANPROXY_PORT = 60002;
/** GUI Agent MCP 默认端口 */
export const DEFAULT_GUI_MCP_PORT = 60008;
/** Admin Server 默认端口(管理接口) */
export const DEFAULT_ADMIN_SERVER_PORT = 60007;
/** 开发服务器默认端口 */
export const DEFAULT_DEV_SERVER_PORT = 60173;
// ==================== 主机 / IP 配置 ====================
/** 本地回环地址 */
export const LOCALHOST_IP = "127.0.0.1";
/** localhost 主机名 */
export const LOCALHOST_HOSTNAME = "localhost";
/** 本地 HTTP 地址前缀 */
export const LOCAL_HOST_URL = "http://127.0.0.1";
// ==================== API URL 配置 ====================
/** Anthropic API 默认地址 */
export const DEFAULT_ANTHROPIC_API_URL = "https://api.anthropic.com";
/** 默认后端服务器地址 */
export const DEFAULT_SERVER_HOST = "https://agent.qiming.com";
// ==================== AI 默认配置 ====================
/** 默认 Agent 引擎类型 */
export const DEFAULT_AI_ENGINE: AgentEngineType = "claude-code";
/** 当前支持的 Agent 引擎类型。历史配置中的其他值会按默认引擎处理。 */
export const SUPPORTED_AGENT_ENGINES = [
"claude-code",
"qimingcode",
] as const satisfies readonly AgentEngineType[];
export function isAgentEngineType(value: unknown): value is AgentEngineType {
return (
typeof value === "string" &&
(SUPPORTED_AGENT_ENGINES as readonly string[]).includes(value)
);
}
export function normalizeAgentEngine(value: unknown): AgentEngineType {
return isAgentEngineType(value) ? value : DEFAULT_AI_ENGINE;
}
export function normalizeOptionalPort(value: unknown): number | undefined {
if (value === undefined || value === null || value === "") return undefined;
const port =
typeof value === "number"
? value
: typeof value === "string"
? Number(value.trim())
: NaN;
return Number.isInteger(port) && port > 0 && port <= 65_535
? port
: undefined;
}
/** 默认 AI 模型 */
export const DEFAULT_AI_MODEL = "claude-sonnet-4-20250514";
/** 默认最大 tokens */
export const DEFAULT_MAX_TOKENS = 4096;
/** 默认温度 */
export const DEFAULT_TEMPERATURE = 0.7;
/** 可用模型选项 */
export const MODEL_OPTIONS = [
{ label: "Claude Opus 4", value: "claude-opus-4-20250514" },
{ label: "Claude Sonnet 4", value: "claude-sonnet-4-20250514" },
{ label: "Claude Haiku 3.5", value: "claude-3-5-haiku-20241022" },
] as const;
// ==================== 超时配置 ====================
/** API 请求默认超时时间 (ms) */
export const DEFAULT_API_TIMEOUT = 60000;
/** SSE 默认重试延迟 (ms) */
export const DEFAULT_SSE_RETRY_DELAY = 5000;
/** SSE 最大重试延迟 (ms) */
export const DEFAULT_SSE_MAX_RETRY_DELAY = 60000;
/** SSE 心跳间隔 (ms) */
export const DEFAULT_SSE_HEARTBEAT_INTERVAL = 30000;
/** 进程启动延迟 (ms) */
export const DEFAULT_STARTUP_DELAY = 3000;
/** 调度器每分钟间隔 (ms) */
export const DEFAULT_SCHEDULER_MINUTE_INTERVAL = 60000;
/** 应用退出清理超时 (ms)。注意:此值小于 ENGINE_DESTROY_TIMEOUT引擎销毁可能被截断但保证应用不会卡死 */
export const CLEANUP_TIMEOUT = 15_000;
/** 进程 SIGTERM→SIGKILL 升级超时 (ms) */
export const PROCESS_KILL_ESCALATION_TIMEOUT = 5000;
/** ACP 会话取消超时 (ms) */
export const ACP_ABORT_TIMEOUT = 15_000;
/**
* 用户主动取消会话时,挂在 `Error` 上的 `code`(与 `message` 语言无关)。
* `message` 经主进程 `t()` 本地化后,`isPromptCancellation` 仍靠此字段识别,避免误触发 MCP 重试。
*/
export const ACP_SESSION_CANCELLED_ERROR_CODE =
"ACP_SESSION_CANCELLED" as const;
/** 引擎销毁超时 (ms) */
export const ENGINE_DESTROY_TIMEOUT = 20_000;
/** 依赖同步超时 (ms) */
export const DEPS_SYNC_TIMEOUT = 120_000;
// ==================== 存储键名 ====================
/** Setup & Auth 相关存储键 */
export const STORAGE_KEYS = {
SETUP_STATE: "setup_state",
STEP1_CONFIG: "step1_config",
AUTH_USER: "auth_user",
API_KEY: "anthropic_api_key",
MCP_CONFIG: "mcp_config",
MCP_PROXY_CONFIG: "mcp_proxy_config",
MCP_PROXY_PORT: "mcp_proxy_port",
LANPROXY_CONFIG: "lanproxy_config",
AGENT_CONFIG: "agent_config",
} as const;
/** Auth 相关存储键 */
export const AUTH_KEYS = {
USERNAME: "auth.username",
PASSWORD: "auth.password",
CONFIG_KEY: "auth.config_key",
SAVED_KEY: "auth.saved_key",
SAVED_KEYS_PREFIX: "auth.saved_keys.",
USER_INFO: "auth.user_info",
ONLINE_STATUS: "auth.online_status",
AUTH_TOKEN: "auth.token",
LANPROXY_SERVER_HOST: "lanproxy.server_host",
LANPROXY_SERVER_PORT: "lanproxy.server_port",
} as const;
// ==================== 镜像源配置 ====================
/** NPM 镜像源预设 */
export const NPM_MIRRORS = {
OFFICIAL: "https://registry.npmjs.org/",
TAOBAO: "https://registry.npmmirror.com/",
TENCENT: "https://mirrors.cloud.tencent.com/npm/",
} as const;
/** UV (PyPI) 镜像源预设 */
export const UV_MIRRORS = {
OFFICIAL: "https://pypi.org/simple/",
TUNA: "https://pypi.tuna.tsinghua.edu.cn/simple/",
ALIYUN: "https://mirrors.aliyun.com/pypi/simple/",
TENCENT: "https://mirrors.cloud.tencent.com/pypi/simple/",
} as const;
/** 默认镜像源配置 */
export const DEFAULT_MIRROR_CONFIG = {
npmRegistry: NPM_MIRRORS.TAOBAO,
uvIndexUrl: UV_MIRRORS.ALIYUN,
} as const;
// ==================== 应用目录 ====================
/** 应用数据目录名称(与 APP_NAME_IDENTIFIER 对应,带点号前缀) */
export const APP_DATA_DIR_NAME = `.${APP_NAME_IDENTIFIER}`;
/** 日志目录名称 */
export const LOGS_DIR_NAME = "logs";
/** MCP 日志目录名称 */
export const MCP_LOGS_DIR_NAME = "mcp";
// ==================== MCP Proxy 配置 ====================
/** MCP Proxy 默认监听地址 */
export const DEFAULT_MCP_PROXY_HOST = LOCALHOST_IP;
// ==================== i18n Key 常量 ====================
/**
* i18n 翻译 key 常量
* 格式:{Client}.{Scope}.{Domain}.{key}
* Client: Claw (Electron 客户端)
*
* 用于在代码中引用翻译 key避免拼写错误
* 后端 /api/i18n/query 返回的翻译 map 以这些 key 为键
*/
export const I18N_KEYS = {
// 通用 Common
Common: {
LOADING: "Claw.Common.loading",
SAVE: "Claw.Common.save",
CANCEL: "Claw.Common.cancel",
CONFIRM: "Claw.Common.confirm",
DELETE: "Claw.Common.delete",
EDIT: "Claw.Common.edit",
ADD: "Claw.Common.add",
OPEN: "Claw.Common.open",
CLOSE: "Claw.Common.close",
RETRY: "Claw.Common.retry",
NO_DATA: "Claw.Common.noData",
BACK: "Claw.Common.back",
REFRESH: "Claw.Common.refresh",
},
// 成功消息 Toast.Success
Toast: {
SUCCESS: {
CONFIG_SAVED: "Claw.Toast.Success.configSaved",
AI_CONFIG_SAVED: "Claw.Toast.Success.aiConfigSaved",
AGENT_STARTED: "Claw.Toast.Success.agentStarted",
AGENT_STOPPED: "Claw.Toast.Success.agentStopped",
MCP_STARTED: "Claw.Toast.Success.mcpStarted",
MCP_STOPPED: "Claw.Toast.Success.mcpStopped",
MCP_RESTARTED: "Claw.Toast.Success.mcpRestarted",
MCP_CONFIG_SAVED: "Claw.Toast.Success.mcpConfigSaved",
SERVICES_STARTED: "Claw.Toast.Success.servicesStarted",
SERVICES_STOPPED: "Claw.Toast.Success.servicesStopped",
LOGIN_SUCCESS: "Claw.Toast.Success.loginSuccess",
LOGOUT_SUCCESS: "Claw.Toast.Success.logoutSuccess",
SETUP_SAVED: "Claw.Toast.Success.setupSaved",
DEPENDENCIES_INSTALLED: "Claw.Toast.Success.dependenciesInstalled",
},
ERROR: {
CONFIG_SAVE_FAILED: "Claw.Toast.Error.configSaveFailed",
AI_CONFIG_SAVE_FAILED: "Claw.Toast.Error.aiConfigSaveFailed",
START_FAILED: "Claw.Toast.Error.startFailed",
STOP_FAILED: "Claw.Toast.Error.stopFailed",
RESTART_FAILED: "Claw.Toast.Error.restartFailed",
SAVE_FAILED: "Claw.Toast.Error.saveFailed",
LOGIN_FAILED: "Claw.Toast.Error.loginFailed",
LOGOUT_FAILED: "Claw.Toast.Error.logoutFailed",
LOAD_FAILED: "Claw.Toast.Error.loadFailed",
DEPENDENCIES_INSTALL_FAILED: "Claw.Toast.Error.dependenciesInstallFailed",
SETUP_LOAD_FAILED: "Claw.Toast.Error.setupLoadFailed",
OPEN_SETTINGS_FAILED: "Claw.Toast.Error.openSettingsFailed",
OPEN_LOGS_FAILED: "Claw.Toast.Error.openLogsFailed",
OPEN_BROWSER_FAILED: "Claw.Toast.Error.openBrowserFailed",
INVALID_SESSION_URL: "Claw.Toast.Error.invalidSessionUrl",
},
WARNING: {
INCOMPLETE_LOGIN_INFO: "Claw.Toast.Warning.incompleteLoginInfo",
MISSING_DEPENDENCIES: "Claw.Toast.Warning.missingDependencies",
SERVER_DOMAIN_REQUIRED: "Claw.Toast.Warning.serverDomainRequired",
AGENT_PORT_REQUIRED: "Claw.Toast.Warning.agentPortRequired",
FILE_SERVER_PORT_REQUIRED: "Claw.Toast.Warning.fileServerPortRequired",
PROXY_PORT_REQUIRED: "Claw.Toast.Warning.proxyPortRequired",
WORKSPACE_DIR_REQUIRED: "Claw.Toast.Warning.workspaceDirRequired",
USERNAME_AND_OTP_REQUIRED: "Claw.Toast.Warning.usernameAndOtpRequired",
SERVER_ID_REQUIRED: "Claw.Toast.Warning.serverIdRequired",
ARGS_REQUIRED: "Claw.Toast.Warning.argsRequired",
LOGIN_FIRST: "Claw.Toast.Warning.loginFirst",
},
INFO: {
ALL_SERVICES_RUNNING: "Claw.Toast.Info.allServicesRunning",
NO_RUNNING_SERVICES: "Claw.Toast.Info.noRunningServices",
NO_DEPENDENCIES_TO_INSTALL: "Claw.Toast.Info.noDependenciesToInstall",
SERVER_ADDED_REMEMBER_SAVE: "Claw.Toast.Info.serverAddedRememberSave",
SERVER_REMOVED_REMEMBER_SAVE: "Claw.Toast.Info.serverRemovedRememberSave",
LOGIN_FIRST_SILENT: "Claw.Toast.Info.loginFirstSilent",
ALREADY_LATEST_VERSION: "Claw.Toast.Info.alreadyLatestVersion",
},
},
// 依赖管理 Components.Dependency
Components: {
Dependency: {
CHECKING: "Claw.Components.Dependency.checking",
INSTALLED: "Claw.Components.Dependency.installed",
MISSING: "Claw.Components.Dependency.missing",
OUTDATED: "Claw.Components.Dependency.outdated",
INSTALLING: "Claw.Components.Dependency.installing",
BUNDLED: "Claw.Components.Dependency.bundled",
ERROR: "Claw.Components.Dependency.error",
},
Action: {
STARTING: "Claw.Components.Action.starting",
STOPPING: "Claw.Components.Action.stopping",
READY: "Claw.Components.Action.ready",
NEED_CONFIG: "Claw.Components.Action.needConfig",
ALL_READY: "Claw.Components.Action.allReady",
ALL_INSTALLED: "Claw.Components.Action.allInstalled",
},
},
// 服务 Pages.Service
Pages: {
Service: {
FILE_SERVER: "Claw.Pages.Service.fileServer",
PROXY: "Claw.Pages.Service.proxy",
AGENT: "Claw.Pages.Service.agent",
MCP_PROXY: "Claw.Pages.Service.mcpProxy",
GUI_MCP: "Claw.Pages.Service.guiMcp",
},
Agent: {
STATUS: {
IDLE: "Claw.Pages.Agent.status.idle",
STARTING: "Claw.Pages.Agent.status.starting",
RUNNING: "Claw.Pages.Agent.status.running",
BUSY: "Claw.Pages.Agent.status.busy",
STOPPED: "Claw.Pages.Agent.status.stopped",
ERROR: "Claw.Pages.Agent.status.error",
},
},
State: {
RUNNING: "Claw.Pages.State.running",
STOPPED: "Claw.Pages.State.stopped",
STARTING: "Claw.Pages.State.starting",
STOPPING: "Claw.Pages.State.stopping",
ERROR: "Claw.Pages.State.error",
},
// 依赖页面 Pages.Dependencies
Dependencies: {
// 标题
SYSTEM_ENV: "Claw.Pages.Dependencies.systemEnv",
DEPENDENCY_PACKAGES: "Claw.Pages.Dependencies.dependencyPackages",
LOADING: "Claw.Pages.Dependencies.loading",
CHECKING: "Claw.Pages.Dependencies.checking",
REFRESH: "Claw.Pages.Dependencies.refresh",
LOAD_DEPENDENCIES: "Claw.Pages.Dependencies.loadDependencies",
// 状态
NOT_INSTALLED: "Claw.Pages.Dependencies.notInstalled",
INTEGRATED: "Claw.Pages.Dependencies.integrated",
NOT_INTEGRATED: "Claw.Pages.Dependencies.notIntegrated",
REQUIRED: "Claw.Pages.Dependencies.required",
UPGRADING: "Claw.Pages.Dependencies.upgrading",
UPDATING: "Claw.Pages.Dependencies.updating",
INSTALLING: "Claw.Pages.Dependencies.installing",
INSTALLED_COUNT: "Claw.Pages.Dependencies.installedCount",
// 操作
INSTALL: "Claw.Pages.Dependencies.install",
UPDATE: "Claw.Pages.Dependencies.update",
UPGRADE: "Claw.Pages.Dependencies.upgrade",
INSTALL_ALL: "Claw.Pages.Dependencies.installAll",
UPGRADE_ALL: "Claw.Pages.Dependencies.upgradeAll",
UPDATE_TO: "Claw.Pages.Dependencies.updateTo",
NO_DEPENDENCIES: "Claw.Pages.Dependencies.noDependencies",
// 消息
MSG_INSTALL_SUCCESS: "Claw.Pages.Dependencies.msgInstallSuccess",
MSG_UPGRADE_SUCCESS: "Claw.Pages.Dependencies.msgUpgradeSuccess",
MSG_FAILED: "Claw.Pages.Dependencies.msgFailed",
MSG_INSTALL_ALL_COMPLETE: "Claw.Pages.Dependencies.msgInstallAllComplete",
MSG_INSTALL_ALL_SUCCESS: "Claw.Pages.Dependencies.msgInstallAllSuccess",
MSG_UPGRADE_ALL_COMPLETE: "Claw.Pages.Dependencies.msgUpgradeAllComplete",
MSG_LOAD_FAILED: "Claw.Pages.Dependencies.msgLoadFailed",
MSG_RESTARTING_SERVICES: "Claw.Pages.Dependencies.msgRestartingServices",
MSG_RESTART_SUCCESS: "Claw.Pages.Dependencies.msgRestartSuccess",
MSG_RESTART_FAILED: "Claw.Pages.Dependencies.msgRestartFailed",
MSG_NO_DEPENDENCIES_TO_INSTALL:
"Claw.Pages.Dependencies.msgNoDependenciesToInstall",
MSG_INSTALL_FAILED: "Claw.Pages.Dependencies.msgInstallFailed",
MSG_SYSTEM_ENV_REQUIRED: "Claw.Pages.Dependencies.msgSystemEnvRequired",
// 依赖名称
DEP_UV: "Claw.Pages.Dependencies.dep.uv",
DEP_PNPM: "Claw.Pages.Dependencies.dep.pnpm",
DEP_ANTHROPIC_SDK: "Claw.Pages.Dependencies.dep.anthropicSdk",
DEP_CLAUDE_CODE_ACP: "Claw.Pages.Dependencies.dep.claudeCodeAcp",
DEP_FILE_SERVER: "Claw.Pages.Dependencies.dep.fileServer",
DEP_MCP_PROXY: "Claw.Pages.Dependencies.dep.mcpProxy",
DEP_QIMINGCODE: "Claw.Pages.Dependencies.dep.qimingcode",
// 依赖描述
DESC_UV: "Claw.Pages.Dependencies.desc.uv",
DESC_PNPM: "Claw.Pages.Dependencies.desc.pnpm",
DESC_ANTHROPIC_SDK: "Claw.Pages.Dependencies.desc.anthropicSdk",
DESC_CLAUDE_CODE_ACP: "Claw.Pages.Dependencies.desc.claudeCodeAcp",
DESC_FILE_SERVER: "Claw.Pages.Dependencies.desc.fileServer",
DESC_MCP_PROXY: "Claw.Pages.Dependencies.desc.mcpProxy",
DESC_QIMINGCODE: "Claw.Pages.Dependencies.desc.qimingcode",
// 版本要求
REQ_NODE_VERSION: "Claw.Pages.Dependencies.reqNodeVersion",
REQ_UV_VERSION: "Claw.Pages.Dependencies.reqUvVersion",
},
// 日志查看器 Pages.LogViewer
LogViewer: {
TITLE: "Claw.LogViewer.title",
AUTO_SCROLL: "Claw.LogViewer.autoScroll",
ALL: "Claw.LogViewer.all",
REFRESH: "Claw.LogViewer.refresh",
OPEN_DIR: "Claw.LogViewer.openDir",
NO_LOGS: "Claw.LogViewer.noLogs",
SCROLL_TO_LOAD_MORE: "Claw.LogViewer.scrollToLoadMore",
TOTAL_LOGS: "Claw.LogViewer.totalLogs",
AUTO_SCROLL_ENABLED: "Claw.LogViewer.autoScrollEnabled",
},
},
// MCP 设置 MCP
MCP: {
LIST_EDIT: "Claw.MCP.list.edit",
LIST_TEST: "Claw.MCP.list.test",
LIST_TEST_SUCCESS: "Claw.MCP.list.testSuccess",
LIST_TEST_FAILED: "Claw.MCP.list.testFailed",
LIST_TESTING: "Claw.MCP.list.testing",
EDITOR_CREATE_TITLE: "Claw.MCP.editor.createTitle",
EDITOR_EDIT_TITLE: "Claw.MCP.editor.editTitle",
EDITOR_BACK: "Claw.MCP.editor.back",
EDITOR_TAB_FORM: "Claw.MCP.editor.tabForm",
EDITOR_TAB_JSON: "Claw.MCP.editor.tabJson",
EDITOR_JSON_HINT: "Claw.MCP.editor.jsonHint",
},
} as const;

View File

@@ -0,0 +1,443 @@
/**
* 沙箱错误类定义
*
* @version 1.0.0
* @updated 2026-03-22
*/
/** Lazy-loaded i18n t() from main process context */
let _i18nT: ((key: string, ...values: string[]) => string) | null = null;
function i18nT(key: string, ...values: string[]): string {
if (!_i18nT) {
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
_i18nT = require("../../main/services/i18n").t;
} catch {
// Not in main process — fall through to English hardcoded below
}
}
return _i18nT ? _i18nT(key, ...values) : key;
}
/**
* 沙箱错误码
*/
export enum SandboxErrorCode {
/** 沙箱不可用 */
SANDBOX_UNAVAILABLE = "SANDBOX_UNAVAILABLE",
/** Docker 不可用 */
DOCKER_UNAVAILABLE = "DOCKER_UNAVAILABLE",
/** Helper 二进制不可用 */
HELPER_UNAVAILABLE = "HELPER_UNAVAILABLE",
/** 工作区未找到 */
WORKSPACE_NOT_FOUND = "WORKSPACE_NOT_FOUND",
/** 工作区已存在 */
WORKSPACE_EXISTS = "WORKSPACE_EXISTS",
/** 工作区创建失败 */
WORKSPACE_CREATE_FAILED = "WORKSPACE_CREATE_FAILED",
/** 工作区销毁失败 */
WORKSPACE_DESTROY_FAILED = "WORKSPACE_DESTROY_FAILED",
/** 工作区状态无效 */
WORKSPACE_INVALID_STATE = "WORKSPACE_INVALID_STATE",
/** 权限被拒绝 */
PERMISSION_DENIED = "PERMISSION_DENIED",
/** 权限请求超时 */
PERMISSION_TIMEOUT = "PERMISSION_TIMEOUT",
/** 权限策略违规 */
PERMISSION_POLICY_VIOLATION = "PERMISSION_POLICY_VIOLATION",
/** 命令执行失败 */
EXECUTION_FAILED = "EXECUTION_FAILED",
/** 命令执行超时 */
EXECUTION_TIMEOUT = "EXECUTION_TIMEOUT",
/** 命令被拦截 */
EXECUTION_BLOCKED = "EXECUTION_BLOCKED",
/** 命令不存在 */
COMMAND_NOT_FOUND = "COMMAND_NOT_FOUND",
/** 文件未找到 */
FILE_NOT_FOUND = "FILE_NOT_FOUND",
/** 文件写入失败 */
FILE_WRITE_FAILED = "FILE_WRITE_FAILED",
/** 文件读取失败 */
FILE_READ_FAILED = "FILE_READ_FAILED",
/** 文件删除失败 */
FILE_DELETE_FAILED = "FILE_DELETE_FAILED",
/** 目录操作失败 */
DIRECTORY_OPERATION_FAILED = "DIRECTORY_OPERATION_FAILED",
/** 清理失败 */
CLEANUP_FAILED = "CLEANUP_FAILED",
/** 清理超时 */
CLEANUP_TIMEOUT = "CLEANUP_TIMEOUT",
/** 配置无效 */
CONFIG_INVALID = "CONFIG_INVALID",
/** 配置缺失 */
CONFIG_MISSING = "CONFIG_MISSING",
/** 容器操作失败Docker 特有) */
CONTAINER_OPERATION_FAILED = "CONTAINER_OPERATION_FAILED",
/** 容器启动失败 */
CONTAINER_START_FAILED = "CONTAINER_START_FAILED",
/** 容器停止失败 */
CONTAINER_STOP_FAILED = "CONTAINER_STOP_FAILED",
/** 资源不足 */
RESOURCE_INSUFFICIENT = "RESOURCE_INSUFFICIENT",
/** 内存不足 */
OUT_OF_MEMORY = "OUT_OF_MEMORY",
/** 磁盘空间不足 */
OUT_OF_DISK_SPACE = "OUT_OF_DISK_SPACE",
/** 内部错误 */
INTERNAL_ERROR = "INTERNAL_ERROR",
/** 未知错误 */
UNKNOWN_ERROR = "UNKNOWN_ERROR",
}
/**
* 沙箱错误类
*/
export class SandboxError extends Error {
/** 错误码 */
public readonly code: SandboxErrorCode;
/** 关联的会话 ID */
public readonly sessionId?: string;
/** 工作区 ID */
public readonly workspaceId?: string;
/** 原始错误 */
public readonly cause?: Error;
/** 时间戳 */
public readonly timestamp: Date;
/** 附加信息 */
public readonly details?: Record<string, unknown>;
constructor(
message: string,
code: SandboxErrorCode,
options?: {
sessionId?: string;
workspaceId?: string;
cause?: Error;
details?: Record<string, unknown>;
},
) {
super(message);
this.name = "SandboxError";
this.code = code;
this.sessionId = options?.sessionId;
this.workspaceId = options?.workspaceId;
this.cause = options?.cause;
this.details = options?.details;
this.timestamp = new Date();
// 保持正确的原型链
Object.setPrototypeOf(this, SandboxError.prototype);
// 捕获堆栈跟踪
if (Error.captureStackTrace) {
Error.captureStackTrace(this, SandboxError);
}
}
/**
* 转换为 JSON 格式
*/
toJSON(): Record<string, unknown> {
return {
name: this.name,
message: this.message,
code: this.code,
sessionId: this.sessionId,
workspaceId: this.workspaceId,
timestamp: this.timestamp.toISOString(),
details: this.details,
cause: this.cause?.message,
stack: this.stack,
};
}
/**
* 获取用户友好的错误消息(走 i18n
*/
getUserMessage(): string {
const id = this.workspaceId || this.sessionId || "";
switch (this.code) {
case SandboxErrorCode.SANDBOX_UNAVAILABLE:
return i18nT("Claw.Sandbox.unavailable");
case SandboxErrorCode.DOCKER_UNAVAILABLE:
return i18nT("Claw.Sandbox.dockerUnavailable");
case SandboxErrorCode.HELPER_UNAVAILABLE:
return i18nT("Claw.Sandbox.helperUnavailable");
case SandboxErrorCode.WORKSPACE_NOT_FOUND:
return i18nT("Claw.Sandbox.workspaceNotFound", id);
case SandboxErrorCode.WORKSPACE_EXISTS:
return i18nT("Claw.Sandbox.workspaceExists", this.sessionId || "");
case SandboxErrorCode.WORKSPACE_CREATE_FAILED:
return i18nT("Claw.Sandbox.workspaceCreateFailed");
case SandboxErrorCode.WORKSPACE_DESTROY_FAILED:
return i18nT("Claw.Sandbox.workspaceDestroyFailed");
case SandboxErrorCode.WORKSPACE_INVALID_STATE:
return i18nT("Claw.Sandbox.workspaceInvalidState");
case SandboxErrorCode.PERMISSION_DENIED:
return i18nT("Claw.Permissions.denied");
case SandboxErrorCode.PERMISSION_TIMEOUT:
return i18nT("Claw.Permissions.timeout");
case SandboxErrorCode.PERMISSION_POLICY_VIOLATION:
return i18nT("Claw.Permissions.policyViolation");
case SandboxErrorCode.EXECUTION_FAILED:
return i18nT("Claw.Sandbox.executionFailed");
case SandboxErrorCode.EXECUTION_TIMEOUT:
return i18nT("Claw.Sandbox.executionTimeout");
case SandboxErrorCode.EXECUTION_BLOCKED:
return i18nT("Claw.Sandbox.executionBlocked");
case SandboxErrorCode.COMMAND_NOT_FOUND:
return i18nT("Claw.Sandbox.commandNotFound");
case SandboxErrorCode.FILE_NOT_FOUND:
return i18nT("Claw.Sandbox.fileNotFound");
case SandboxErrorCode.FILE_WRITE_FAILED:
return i18nT("Claw.Sandbox.fileWriteFailed");
case SandboxErrorCode.FILE_READ_FAILED:
return i18nT("Claw.Sandbox.fileReadFailed");
case SandboxErrorCode.FILE_DELETE_FAILED:
return i18nT("Claw.Sandbox.fileDeleteFailed");
case SandboxErrorCode.DIRECTORY_OPERATION_FAILED:
return i18nT("Claw.Sandbox.directoryOperationFailed");
case SandboxErrorCode.CLEANUP_FAILED:
return i18nT("Claw.Sandbox.cleanupFailed");
case SandboxErrorCode.CLEANUP_TIMEOUT:
return i18nT("Claw.Sandbox.cleanupTimeout");
case SandboxErrorCode.CONFIG_INVALID:
return i18nT("Claw.Sandbox.configInvalid");
case SandboxErrorCode.CONFIG_MISSING:
return i18nT("Claw.Sandbox.configMissing");
case SandboxErrorCode.CONTAINER_OPERATION_FAILED:
return i18nT("Claw.Sandbox.containerOperationFailed");
case SandboxErrorCode.CONTAINER_START_FAILED:
return i18nT("Claw.Sandbox.containerStartFailed");
case SandboxErrorCode.CONTAINER_STOP_FAILED:
return i18nT("Claw.Sandbox.containerStopFailed");
case SandboxErrorCode.RESOURCE_INSUFFICIENT:
return i18nT("Claw.Sandbox.resourceInsufficient");
case SandboxErrorCode.OUT_OF_MEMORY:
return i18nT("Claw.Sandbox.outOfMemory");
case SandboxErrorCode.OUT_OF_DISK_SPACE:
return i18nT("Claw.Sandbox.outOfDiskSpace");
default:
return this.message || i18nT("Claw.Sandbox.unknownError");
}
}
/**
* 判断是否为可恢复错误
*/
isRecoverable(): boolean {
const recoverableCodes = [
SandboxErrorCode.EXECUTION_TIMEOUT,
SandboxErrorCode.PERMISSION_TIMEOUT,
SandboxErrorCode.CLEANUP_TIMEOUT,
SandboxErrorCode.CONTAINER_STOP_FAILED,
];
return recoverableCodes.includes(this.code);
}
/**
* 判断是否需要用户干预
*/
requiresUserIntervention(): boolean {
const userInterventionCodes = [
SandboxErrorCode.PERMISSION_DENIED,
SandboxErrorCode.PERMISSION_POLICY_VIOLATION,
SandboxErrorCode.EXECUTION_BLOCKED,
SandboxErrorCode.DOCKER_UNAVAILABLE,
SandboxErrorCode.HELPER_UNAVAILABLE,
SandboxErrorCode.OUT_OF_DISK_SPACE,
];
return userInterventionCodes.includes(this.code);
}
}
// ============================================================================
// 特化错误类
// ============================================================================
/**
* Sandbox unavailable error
*/
export class SandboxUnavailableError extends SandboxError {
constructor(
sandboxType: string,
options?: { cause?: Error; details?: Record<string, unknown> },
) {
super(
i18nT("Claw.Sandbox.unavailableWithType", sandboxType),
SandboxErrorCode.SANDBOX_UNAVAILABLE,
options,
);
this.name = "SandboxUnavailableError";
}
}
/**
* 工作区错误
*/
export class WorkspaceError extends SandboxError {
constructor(
message: string,
code: SandboxErrorCode,
options?: {
sessionId?: string;
workspaceId?: string;
cause?: Error;
details?: Record<string, unknown>;
},
) {
super(message, code, options);
this.name = "WorkspaceError";
}
}
/**
* 权限错误
*/
export class PermissionError extends SandboxError {
constructor(
message: string,
options?: {
sessionId?: string;
cause?: Error;
details?: Record<string, unknown>;
},
) {
super(message, SandboxErrorCode.PERMISSION_DENIED, options);
this.name = "PermissionError";
}
}
/**
* 执行错误
*/
export class ExecutionError extends SandboxError {
constructor(
message: string,
code: SandboxErrorCode = SandboxErrorCode.EXECUTION_FAILED,
options?: {
sessionId?: string;
cause?: Error;
details?: Record<string, unknown>;
},
) {
super(message, code, options);
this.name = "ExecutionError";
}
}
/**
* 文件操作错误
*/
export class FileOperationError extends SandboxError {
constructor(
message: string,
code: SandboxErrorCode,
options?: {
sessionId?: string;
cause?: Error;
details?: Record<string, unknown>;
},
) {
super(message, code, options);
this.name = "FileOperationError";
}
}
/**
* 配置错误
*/
export class ConfigError extends SandboxError {
constructor(
message: string,
code: SandboxErrorCode = SandboxErrorCode.CONFIG_INVALID,
options?: { cause?: Error; details?: Record<string, unknown> },
) {
super(message, code, options);
this.name = "ConfigError";
}
}
/**
* 资源错误
*/
export class ResourceError extends SandboxError {
constructor(
message: string,
code: SandboxErrorCode,
options?: { cause?: Error; details?: Record<string, unknown> },
) {
super(message, code, options);
this.name = "ResourceError";
}
}
// ============================================================================
// 错误工具函数
// ============================================================================
/**
* 判断是否为沙箱错误
*/
export function isSandboxError(error: unknown): error is SandboxError {
return error instanceof SandboxError;
}
/**
* Create SandboxError from unknown error
*/
export function toSandboxError(
error: unknown,
defaultMessage?: string,
defaultCode: SandboxErrorCode = SandboxErrorCode.UNKNOWN_ERROR,
options?: { sessionId?: string; workspaceId?: string },
): SandboxError {
if (isSandboxError(error)) {
return error;
}
const msg = defaultMessage ?? i18nT("Claw.Sandbox.unknownError");
if (error instanceof Error) {
return new SandboxError(error.message || msg, defaultCode, {
...options,
cause: error,
});
}
return new SandboxError(msg, defaultCode, {
...options,
details: { originalError: String(error) },
});
}
/**
* 包装异步函数,自动转换错误
*/
export function wrapSandboxError<T>(
fn: () => Promise<T>,
defaultMessage: string,
defaultCode: SandboxErrorCode = SandboxErrorCode.INTERNAL_ERROR,
options?: { sessionId?: string; workspaceId?: string },
): Promise<T> {
return fn().catch((error) => {
throw toSandboxError(error, defaultMessage, defaultCode, options);
});
}

View File

@@ -0,0 +1,68 @@
/**
* Feature Flags - 统一管理功能开关
*
* 通过 .env.development / .env.production 文件配置环境变量:
* - 开发模式 (npm run dev): 通常开启调试相关开关
* - 生产构建 (npm run build): 由 .env.production 控制各开关
*
* 渲染进程 (Vite 打包): 使用 vite.config.ts define 静态替换 __XXX__ 变量
* 主进程 (tsc 编译): 直接使用 process.env 读取环境变量
*
* @example
* import { FEATURES } from '@shared/featureFlags';
* if (FEATURES.INJECT_GUI_MCP) {
* // ...
* }
*/
// 渲染进程Vite define 只能替换静态标识符,不能替换动态 globalThis["__X__"] 访问。
// 这里使用 typeof + 静态常量名,保证:
// 1) 渲染进程可被 Vite 正确注入;
// 2) 主进程未注入时不会抛 ReferenceError。
function getViteFlagInjectGuiMcp(): boolean {
return (
typeof __INJECT_GUI_MCP__ !== "undefined" &&
(__INJECT_GUI_MCP__ === true || __INJECT_GUI_MCP__ === "true")
);
}
function getViteFlagLogFullSecrets(): boolean {
return (
typeof __LOG_FULL_SECRETS__ !== "undefined" &&
(__LOG_FULL_SECRETS__ === true || __LOG_FULL_SECRETS__ === "true")
);
}
function getViteFlagEnableGuiAgentServer(): boolean {
return (
typeof __ENABLE_GUI_AGENT_SERVER__ !== "undefined" &&
(__ENABLE_GUI_AGENT_SERVER__ === true ||
__ENABLE_GUI_AGENT_SERVER__ === "true")
);
}
function hasViteFlagEnableGuiAgentServer(): boolean {
return typeof __ENABLE_GUI_AGENT_SERVER__ !== "undefined";
}
function getProcessFlag(envKey: string, defaultValue = false): boolean {
try {
const value = process?.env?.[envKey];
if (value == null || value === "") return defaultValue;
return value === "true";
} catch {
return defaultValue;
}
}
export const FEATURES = {
INJECT_GUI_MCP: getViteFlagInjectGuiMcp() || getProcessFlag("INJECT_GUI_MCP"),
LOG_FULL_SECRETS:
getViteFlagLogFullSecrets() ||
getProcessFlag("QIMING_AGENT_LOG_FULL_SECRETS"),
ENABLE_GUI_AGENT_SERVER: hasViteFlagEnableGuiAgentServer()
? getViteFlagEnableGuiAgentServer()
: getProcessFlag("ENABLE_GUI_AGENT_SERVER", true),
} as const;
export type FeatureFlag = keyof typeof FEATURES;

View File

@@ -0,0 +1,9 @@
/**
* Vite define 全局常量声明
* 由 vite.config.ts define 配置在构建时注入
*/
declare const __APP_VERSION__: string;
declare const __INJECT_GUI_MCP__: string | boolean;
declare const __LOG_FULL_SECRETS__: string | boolean;
declare const __ENABLE_GUI_AGENT_SERVER__: string | boolean;

View File

@@ -0,0 +1,80 @@
import fs from "node:fs";
import path from "node:path";
import { describe, expect, it } from "vitest";
const LOCALE_FILES = [
"en-US.json",
"zh-CN.json",
"zh-TW.json",
"zh-HK.json",
] as const;
const LOCALES_DIR = path.resolve(process.cwd(), "src/shared/locales");
type LocaleName = (typeof LOCALE_FILES)[number];
type LocaleMap = Record<string, string>;
function loadLocale(name: LocaleName): LocaleMap {
const filePath = path.join(LOCALES_DIR, name);
return JSON.parse(fs.readFileSync(filePath, "utf-8")) as LocaleMap;
}
function extractPlaceholders(template: string): string[] {
return (template.match(/\{[^}]*\}/g) || []).sort();
}
describe("i18n locale consistency", () => {
const localeMaps = Object.fromEntries(
LOCALE_FILES.map((name) => [name, loadLocale(name)]),
) as Record<LocaleName, LocaleMap>;
it("all locale files should have the exact same key set", () => {
const baselineKeys = new Set(Object.keys(localeMaps["en-US.json"]));
for (const localeName of LOCALE_FILES.slice(1)) {
const currentKeys = new Set(Object.keys(localeMaps[localeName]));
const missing = [...baselineKeys].filter((k) => !currentKeys.has(k));
const extra = [...currentKeys].filter((k) => !baselineKeys.has(k));
expect(
{ localeName, missing, extra },
`${localeName} keys mismatch with en-US.json`,
).toEqual({ localeName, missing: [], extra: [] });
}
});
it("all i18n keys should match renderer key format", () => {
const keyRegex =
/^(Claw|PC|Mobile)\.[A-Z][A-Za-z0-9]*\.([A-Za-z0-9]+\.)*[A-Za-z][A-Za-z0-9]*$/;
const invalidKeys = Object.keys(localeMaps["en-US.json"]).filter(
(key) => !keyRegex.test(key),
);
expect(invalidKeys).toEqual([]);
});
it("placeholder tokens should stay consistent across locales", () => {
const baseline = localeMaps["en-US.json"];
for (const key of Object.keys(baseline)) {
const basePlaceholders = extractPlaceholders(String(baseline[key] || ""));
for (const localeName of LOCALE_FILES.slice(1)) {
const localized = localeMaps[localeName][key];
const localizedPlaceholders = extractPlaceholders(
String(localized || ""),
);
expect(
{ key, localeName, basePlaceholders, localizedPlaceholders },
`placeholder mismatch for ${key} in ${localeName}`,
).toEqual({
key,
localeName,
basePlaceholders,
localizedPlaceholders: basePlaceholders,
});
}
}
});
});

View File

@@ -0,0 +1,882 @@
{
"Claw.Common.loading": "Loading...",
"Claw.Common.save": "Save",
"Claw.Common.cancel": "Cancel",
"Claw.Common.confirm": "Confirm",
"Claw.Common.delete": "Delete",
"Claw.Common.edit": "Edit",
"Claw.Common.add": "Add",
"Claw.Common.open": "Open",
"Claw.Common.close": "Close",
"Claw.Common.retry": "Retry",
"Claw.Common.noData": "No data",
"Claw.Common.back": "Back",
"Claw.Common.refresh": "Refresh",
"Claw.Toast.Success.configSaved": "Config saved",
"Claw.Toast.Success.aiConfigSaved": "AI config saved",
"Claw.Toast.Success.agentStarted": "Agent started",
"Claw.Toast.Success.agentStopped": "Agent stopped",
"Claw.Toast.Success.mcpStarted": "MCP started",
"Claw.Toast.Success.mcpStopped": "MCP stopped",
"Claw.Toast.Success.mcpRestarted": "MCP restarted",
"Claw.Toast.Success.mcpConfigSaved": "MCP config saved",
"Claw.Toast.Success.servicesStarted": "Services started",
"Claw.Toast.Success.servicesStopped": "Services stopped",
"Claw.Toast.Success.loginSuccess": "Login successful",
"Claw.Toast.Success.logoutSuccess": "Logged out",
"Claw.Toast.Success.setupSaved": "Setup saved",
"Claw.Toast.Success.dependenciesInstalled": "Dependencies installed",
"Claw.Toast.Error.configSaveFailed": "Failed to save config",
"Claw.Toast.Error.aiConfigSaveFailed": "Failed to save AI config",
"Claw.Toast.Error.startFailed": "Start failed",
"Claw.Toast.Error.stopFailed": "Stop failed",
"Claw.Toast.Error.restartFailed": "Restart failed",
"Claw.Toast.Error.saveFailed": "Save failed",
"Claw.Toast.Error.loginFailed": "Login failed",
"Claw.Toast.Error.logoutFailed": "Logout failed",
"Claw.Toast.Error.loadFailed": "Load failed",
"Claw.Toast.Error.dependenciesInstallFailed": "Failed to install dependencies",
"Claw.Toast.Error.setupLoadFailed": "Failed to load setup",
"Claw.Toast.Error.openSettingsFailed": "Failed to open settings",
"Claw.Toast.Error.openLogsFailed": "Failed to open logs",
"Claw.Toast.Error.openBrowserFailed": "Failed to open browser",
"Claw.Toast.Error.invalidSessionUrl": "Invalid session URL",
"Claw.Toast.Warning.incompleteLoginInfo": "Incomplete login information",
"Claw.Toast.Warning.missingDependencies": "Missing dependencies detected",
"Claw.Toast.Warning.serverDomainRequired": "Please enter service domain",
"Claw.Toast.Warning.agentPortRequired": "Please enter Agent port",
"Claw.Toast.Warning.fileServerPortRequired": "Please enter file server port",
"Claw.Toast.Warning.proxyPortRequired": "Please enter proxy port",
"Claw.Toast.Warning.workspaceDirRequired": "Please select workspace directory",
"Claw.Toast.Warning.usernameAndOtpRequired": "Please enter username and OTP",
"Claw.Toast.Warning.serverIdRequired": "Please enter Server ID",
"Claw.Toast.Warning.argsRequired": "Please enter arguments",
"Claw.Toast.Warning.loginFirst": "Please log in first",
"Claw.Toast.Info.allServicesRunning": "All services are already running",
"Claw.Toast.Info.noRunningServices": "No running services",
"Claw.Toast.Info.noDependenciesToInstall": "No dependencies to install",
"Claw.Toast.Info.serverAddedRememberSave": "Server added. Remember to save config",
"Claw.Toast.Info.serverRemovedRememberSave": "Server removed. Remember to save config",
"Claw.Toast.Info.loginFirstSilent": "Please log in first",
"Claw.Toast.Info.alreadyLatestVersion": "Already on the latest version",
"Claw.Errors.mcpReconnectRetryLater": "MCP connection is unstable. Auto-reconnecting — please try again later.",
"Claw.WindowsMcp.portInUseHint": "Common cause: port {port} already in use. Try later, change GUI MCP port in settings, or end the process in Task Manager.",
"Claw.Pages.Dependencies.systemEnv": "System Environment",
"Claw.Pages.Dependencies.dependencyPackages": "Dependencies",
"Claw.Pages.Dependencies.checking": "Checking...",
"Claw.Pages.Dependencies.notInstalled": "Not Installed",
"Claw.Pages.Dependencies.integrated": "Integrated",
"Claw.Pages.Dependencies.notIntegrated": "Not Integrated",
"Claw.Pages.Dependencies.required": "Required",
"Claw.Pages.Dependencies.upgrading": "Upgrading...",
"Claw.Pages.Dependencies.updating": "Updating...",
"Claw.Pages.Dependencies.installing": "Installing...",
"Claw.Pages.Dependencies.install": "Install",
"Claw.Pages.Dependencies.update": "Update",
"Claw.Pages.Dependencies.upgrade": "Upgrade",
"Claw.Pages.Dependencies.installAll": "Install All",
"Claw.Pages.Dependencies.upgradeAll": "Upgrade All",
"Claw.Pages.Dependencies.updateTo": "Update to {0}",
"Claw.Pages.Dependencies.noDependencies": "No Dependencies",
"Claw.Pages.Dependencies.installedCount": "{0}/{1} installed",
"Claw.Pages.Dependencies.dep.uv": "uv",
"Claw.Pages.Dependencies.dep.pnpm": "pnpm",
"Claw.Pages.Dependencies.dep.anthropicSdk": "Anthropic SDK",
"Claw.Pages.Dependencies.dep.claudeCodeAcp": "ACP Protocol",
"Claw.Pages.Dependencies.dep.fileServer": "File Server",
"Claw.Pages.Dependencies.dep.mcpProxy": "MCP Proxy",
"Claw.Pages.Dependencies.dep.qimingcode": "qimingcode",
"Claw.Pages.Dependencies.desc.uv": "High-performance Python package manager (bundled)",
"Claw.Pages.Dependencies.desc.pnpm": "High-performance Node.js package manager",
"Claw.Pages.Dependencies.desc.anthropicSdk": "Claude API client",
"Claw.Pages.Dependencies.desc.claudeCodeAcp": "ACP protocol implementation",
"Claw.Pages.Dependencies.desc.fileServer": "Local file HTTP service",
"Claw.Pages.Dependencies.desc.mcpProxy": "MCP protocol aggregation proxy",
"Claw.Pages.Dependencies.desc.qimingcode": "Agent engine (bundled)",
"Claw.Pages.Dependencies.reqNodeVersion": "Requires >= {0}",
"Claw.Pages.Dependencies.reqUvVersion": "Requires >= {0}",
"Claw.Pages.Dependencies.msgInstallSuccess": "{0} {1} succeeded",
"Claw.Pages.Dependencies.msgUpgradeSuccess": "{0} upgraded successfully",
"Claw.Pages.Dependencies.msgFailed": "{0} {1} failed",
"Claw.Pages.Dependencies.msgInstallAllComplete": "Dependencies installed and upgraded",
"Claw.Pages.Dependencies.msgUpgradeAllComplete": "Dependencies upgraded",
"Claw.Pages.Dependencies.msgInstallAllSuccess": "Dependencies installed",
"Claw.Pages.Dependencies.msgLoadFailed": "Failed to load dependencies",
"Claw.Pages.Dependencies.msgRestartingServices": "Restarting services...",
"Claw.Pages.Dependencies.msgRestartSuccess": "Services restarted",
"Claw.Pages.Dependencies.msgRestartFailed": "Failed to restart services",
"Claw.Pages.Dependencies.msgNoDependenciesToInstall": "No dependencies to install or upgrade",
"Claw.Pages.Dependencies.msgInstallFailed": "Installation failed: {0}",
"Claw.Pages.Dependencies.msgSystemEnvRequired": "Please meet system environment requirements before installing dependencies",
"Claw.Components.Dependency.checking": "Checking",
"Claw.Components.Dependency.installed": "Installed",
"Claw.Components.Dependency.missing": "Missing",
"Claw.Components.Dependency.outdated": "Outdated",
"Claw.Components.Dependency.installing": "Installing",
"Claw.Components.Dependency.bundled": "Bundled",
"Claw.Components.Dependency.error": "Error",
"Claw.Components.Action.starting": "Starting...",
"Claw.Components.Action.stopping": "Stopping...",
"Claw.Components.Action.ready": "Ready",
"Claw.Components.Action.needConfig": "Needs Config",
"Claw.Components.Action.allReady": "All Ready",
"Claw.Components.Action.allInstalled": "Ready",
"Claw.Tray.showWindow": "Show Window",
"Claw.Tray.restartServices": "Restart Services",
"Claw.Tray.stopServices": "Stop Services",
"Claw.Tray.autoLaunch": "Auto Launch",
"Claw.Tray.checkUpdate": "Check for Updates",
"Claw.Tray.about": "About {0} v{1}",
"Claw.Tray.quit": "Quit",
"Claw.Tray.Status.running": "Running",
"Claw.Tray.Status.stopped": "Stopped",
"Claw.Tray.Status.error": "Error",
"Claw.Tray.Status.starting": "Starting",
"Claw.Dialog.error": "Error",
"Claw.Dialog.autoLaunchFailed": "Failed to enable auto-start on boot",
"Claw.AutoUpdater.networkFailed": "Network request failed",
"Claw.AutoUpdater.newVersionFound": "New Version Found",
"Claw.AutoUpdater.downloadFailed": "Download Failed",
"Claw.AutoUpdater.updateDownloaded": "Update Downloaded",
"Claw.AutoUpdater.updateReady": "Update Ready",
"Claw.AutoUpdater.checking": "Checking for Updates",
"Claw.AutoUpdater.alreadyLatest": "Already the Latest Version",
"Claw.AutoUpdater.unsupportedInstall": "The current installation method does not support automatic updates. Please visit the download page on the official website to get the latest installer.",
"Claw.AutoUpdater.downloadInstallNow": "Would you like to download and install the update now?",
"Claw.AutoUpdater.downloadNow": "Download Now",
"Claw.AutoUpdater.later": "Later",
"Claw.AutoUpdater.close": "Close",
"Claw.AutoUpdater.downloadPage": "Go to Download Page",
"Claw.AutoUpdater.installNow": "Install Now",
"Claw.AutoUpdater.installOnExit": "Install on Exit",
"Claw.AutoUpdater.checkFailed": "Update Check Failed",
"Claw.AutoUpdater.devModeUnsupported": "Downloading updates is not supported in development mode. Please use a packaged version for testing.",
"Claw.AutoUpdater.installDevUnsupported": "Dev mode does not support installing updates",
"Claw.AutoUpdater.getDownloadLinkFailed": "Failed to get download link",
"Claw.AutoUpdater.getDownloadLinkFailedDetail": "Unable to get download link from server.\n\nError: {0}\n\nPlease check your network connection and try again.",
"Claw.AutoUpdater.versionFound": "New version v{} found",
"Claw.AutoUpdater.getUpdateInfoFailed": "Failed to get {} channel update info",
"Claw.AutoUpdater.invalidMetadataVersion": "Update metadata version is invalid (only x.y.z supported): {}",
"Claw.Agent.Status.idle": "Ready",
"Claw.Agent.Status.starting": "Starting",
"Claw.Agent.Status.running": "Running",
"Claw.Agent.Status.busy": "Busy",
"Claw.Agent.Status.stopped": "Stopped",
"Claw.Agent.Status.error": "Error",
"Claw.Menu.client": "Client",
"Claw.Menu.session": "Session",
"Claw.Menu.mcp": "MCP",
"Claw.Menu.settings": "Settings",
"Claw.Menu.dependencies": "Dependencies",
"Claw.Menu.authorization": "Authorization",
"Claw.Menu.logs": "Logs",
"Claw.Menu.about": "About",
"Claw.App.ConfigSyncFailed": "Config Sync Failed",
"Claw.App.ConfigSyncFailedDetail": "Unable to connect to server for latest config. Services not restarted. Please check your network and try again.",
"Claw.App.Retry": "Retry",
"Claw.App.RestartingServices": "Restarting services...",
"Claw.App.RestartSuccess": "Services restarted",
"Claw.App.RestartFailed": "Failed to restart services",
"Claw.App.AutoReconnectFailed": "Auto reconnect failed",
"Claw.App.AutoReconnectFailedDetail": "Unable to connect to server. Starting with locally saved config. For latest config, check network and login again.",
"Claw.App.ServicesRestarting": "Services are restarting...",
"Claw.App.ServicesRestartSuccess": "Services restarted successfully",
"Claw.App.Loading": "Loading...",
"Claw.App.User": "User",
"Claw.App.defaultUsername": "User",
"Claw.App.agentInterfaceFailed": "Agent interface service failed to start: {0}",
"Claw.App.agentInterfaceNotRunning": "Agent interface service not running",
"Claw.App.channelCheckFailed": "Channel check failed: {0}",
"Claw.App.serviceRestartFailed": "Service restart failed: {0}",
"Claw.App.back": "Back",
"Claw.App.refresh": "Refresh",
"Claw.App.UpdateTag.newVersion": "v{version} available",
"Claw.App.UpdateTag.download": "Update v{version}",
"Claw.App.UpdateTag.downloading": "Downloading {percent}%",
"Claw.Service.file": "File Service",
"Claw.Service.fileDesc": "Remote file management service for Agent workspace",
"Claw.Service.agent": "Agent Service",
"Claw.Service.agentDesc": "Agent core service",
"Claw.Service.mcp": "MCP Service",
"Claw.Service.mcpDesc": "MCP protocol aggregation proxy",
"Claw.Service.guiMcp": "GUI MCP Service",
"Claw.Service.guiMcpDesc": "Desktop automation visual operation service",
"Claw.Service.proxy": "Proxy Service",
"Claw.Service.proxyDesc": "Network channel",
"Claw.Service.admin": "Admin Service",
"Claw.Service.adminDesc": "Admin interface service (restart/health check)",
"Claw.Client.domainRequired": "Please enter service domain",
"Claw.Client.accountRequired": "Please enter your username",
"Claw.Client.codeRequired": "Please enter a dynamic code",
"Claw.Client.logoutConfirm": "Confirm Logout",
"Claw.Client.logoutConfirmDetail": "Logging out will stop all running services. You will need to log in again to use online features.",
"Claw.Client.logoutFailed": "Logout failed",
"Claw.Client.getSessionUrlFailed": "Failed to get session address",
"Claw.Auth.loggingIn": "Logging in...",
"Claw.Auth.loggedOut": "Logged out",
"Claw.Auth.syncingConfig": "Syncing configuration...",
"Claw.Auth.configSyncedSuccess": "Config synced successfully",
"Claw.Auth.error.userNotFound": "User does not exist, please check input",
"Claw.Auth.error.wrongPassword": "Incorrect password. Please try again.",
"Claw.Auth.error.accountDisabled": "Account has been disabled. Please contact admin.",
"Claw.Auth.error.clientNotFound": "Client does not exist or has been removed",
"Claw.Auth.error.clientDisabled": "Client has been disabled",
"Claw.Auth.error.configNotFound": "Config not found. Please log in again.",
"Claw.Auth.error.loginExpired": "Login expired, please login again",
"Claw.Auth.error.systemError": "System error, please try again later",
"Claw.Auth.error.forbidden": "No permission to perform this operation",
"Claw.Auth.error.notFound": "The requested resource does not exist",
"Claw.Auth.error.serverError": "Server error, please try again later",
"Claw.Auth.error.loginFailed": "Login failed. Please check your network connection.",
"Claw.Api.success": "Operation succeeded",
"Claw.Api.notLoggedIn": "Not logged in, please login again",
"Claw.Api.loginExpired": "Login expired, please login again",
"Claw.Api.clientNotFound": "Client does not exist or has been removed",
"Claw.Api.systemError": "System error, please try again later",
"Claw.Api.timeout": "Request timeout (>{0}ms). Please check your network or server status.",
"Claw.Errors.loginFirstForClientKey": "Please log in first to get your client key",
"Claw.Errors.loginRedirect": "A login issue occurred. Please check your configured domain or service status and try again.",
"Claw.Log.csvHeader": "Time,Level,Source,Message",
"Claw.Setup.wizardComplete": "Wizard complete!",
"Claw.Setup.resetComplete": "Reset complete, refresh page to re-enter wizard",
"Claw.Client.loginFirst": "Please log in first to get proxy service config",
"Claw.Client.startFailed": "Failed to start",
"Claw.Client.loginFirstToStart": "Please log in first before starting services",
"Claw.Client.missingDeps": "Missing dependencies detected. Please install them first.",
"Claw.Client.allServicesRunning": "All auto-start services are already running",
"Claw.Client.startAllServicesFirst": "Please start all services first.",
"Claw.Client.domainPlaceholder": "Service domain (e.g., https://agent.qiming.com)",
"Claw.Client.usernamePlaceholder": "Username / Phone / Email",
"Claw.Client.passwordPlaceholder": "Enter your password or dynamic code (open your domain in a browser to log in, then check your user profile)",
"Claw.Client.missingDepsCannotStart": "Required dependencies are missing. Cannot start the service.",
"Claw.Client.qrCode": "Scan to Use",
"Claw.EmbeddedWebview.loadFailed": "Load failed: {0} ({1})",
"Claw.EmbeddedWebview.back": "Back",
"Claw.EmbeddedWebview.refresh": "Refresh",
"Claw.EmbeddedWebview.unknownError": "Unknown error",
"Claw.AgentRunner.configSaved": "Config saved",
"Claw.AgentRunner.stopped": "Agent Runner stopped",
"Claw.AgentRunner.started": "Agent Runner started",
"Claw.AgentRunner.error": "Error: {0}",
"Claw.AgentRunner.running": "● Running",
"Claw.AgentRunner.stoppedStatus": "○ Stopped",
"Claw.AgentRunner.backendAddress": "Backend Address",
"Claw.AgentRunner.proxyAddress": "Proxy Address",
"Claw.AgentRunner.stop": "Stop",
"Claw.AgentRunner.start": "Start",
"Claw.AgentRunner.config": "Config",
"Claw.AgentRunner.executablePath": "Executable Path",
"Claw.AgentRunner.backendPort": "Backend Port",
"Claw.AgentRunner.proxyPort": "Proxy Port",
"Claw.AgentRunner.apiKey": "API Key",
"Claw.AgentRunner.apiBaseUrl": "API Base URL",
"Claw.AgentRunner.defaultModel": "Default Model",
"Claw.AgentRunner.saveConfig": "Save Config",
"Claw.IMSettings.title": "IM Integration",
"Claw.IMSettings.platform.dingtalk": "DingTalk",
"Claw.IMSettings.platform.feishu": "Feishu",
"Claw.IMSettings.configSaved": "Config saved",
"Claw.IMSettings.connected": "{0} connected",
"Claw.IMSettings.error": "Error: {0}",
"Claw.IMSettings.disconnected": "Disconnected",
"Claw.IMSettings.enable": "Enable {0}",
"Claw.IMSettings.botConfig": "Bot Config",
"Claw.IMSettings.appConfig": "App Config",
"Claw.IMSettings.allowedUsers": "Allowed user IDs (comma-separated)",
"Claw.IMSettings.options": "Options",
"Claw.IMSettings.autoReply": "Auto Reply",
"Claw.IMSettings.disconnect": "Disconnect",
"Claw.IMSettings.connecting": "Connecting...",
"Claw.IMSettings.connect": "Connect",
"Claw.IMSettings.saveConfig": "Save Config",
"Claw.SkillsSync.title": "Skills Sync (File Service)",
"Claw.SkillsSync.fileServiceConnection": "File Service Connection",
"Claw.SkillsSync.serviceAddress": "Service Address",
"Claw.SkillsSync.connected": "Connected",
"Claw.SkillsSync.testConnection": "Test Connection",
"Claw.SkillsSync.configSaved": "Config saved",
"Claw.SkillsSync.uploadSkillPackage": "Upload Skill Package (ZIP)",
"Claw.SkillsSync.uploadHint": "Upload a ZIP file containing <code>skills/</code> and/or <code>agents/</code> directories. It will be extracted to the <code>.claude/</code> directory in your workspace.",
"Claw.SkillsSync.syncSkills": "Sync Skills",
"Claw.SkillsSync.uploading": "Uploading...",
"Claw.SkillsSync.logs": "Logs",
"Claw.SkillsSync.selectZipFile": "Please select a ZIP file",
"Claw.SkillsSync.onlyZipSupported": "Only ZIP files are supported",
"Claw.SkillsSync.creatingWorkspaceAndSyncing": "Creating workspace and syncing skills...",
"Claw.SkillsSync.workspaceCreatedSuccess": "Workspace created successfully",
"Claw.SkillsSync.syncSuccess": "Skills synced successfully",
"Claw.SkillsSync.errorPrefix": "Error: {0}",
"Claw.SkillsSync.fileSelected": "Selected: {0} ({1} KB)",
"Claw.Lanproxy.title": "Network Tunneling (Lanproxy)",
"Claw.Lanproxy.notLoggedIn": "(Not logged in)",
"Claw.Lanproxy.configSaved": "Config saved",
"Claw.Lanproxy.tunnelStopped": "Network tunnel stopped",
"Claw.Lanproxy.tunnelStarted": "Network tunnel started",
"Claw.Lanproxy.errorWithDetail": "Error: {0}",
"Claw.Lanproxy.platformNotSupported": "Network tunneling (Lanproxy) is not supported on this platform (lanproxy binary not detected). Please use an installation package with lanproxy or obtain the platform-specific binary from Tauri builds.",
"Claw.Lanproxy.running": "● Running",
"Claw.Lanproxy.stopped": "○ Stopped",
"Claw.Lanproxy.start": "Start",
"Claw.Lanproxy.stop": "Stop",
"Claw.Lanproxy.config": "Config",
"Claw.Lanproxy.serverIp": "Server IP",
"Claw.Lanproxy.serverPort": "Server Port",
"Claw.Lanproxy.clientKey": "Client Key (auto-obtained after login)",
"Claw.Lanproxy.ssl": "SSL",
"Claw.Lanproxy.enable": "Enable",
"Claw.Lanproxy.disable": "Disable",
"Claw.Lanproxy.saveConfig": "Save Config",
"Claw.TaskSettings.title": "Scheduled Tasks",
"Claw.TaskSettings.taskCount": "{0} task(s)",
"Claw.TaskSettings.addTask": "+ Add Task",
"Claw.TaskSettings.cancel": " Cancel",
"Claw.TaskSettings.taskNameRequired": "Task Name *",
"Claw.TaskSettings.taskNamePlaceholder": "Daily News Summary",
"Claw.TaskSettings.description": "Description",
"Claw.TaskSettings.descriptionPlaceholder": "Get daily tech news",
"Claw.TaskSettings.scheduleType": "Schedule Type",
"Claw.TaskSettings.interval": "Interval",
"Claw.TaskSettings.once": "Execute Once",
"Claw.TaskSettings.cron": "Cron Expression",
"Claw.TaskSettings.minutesOption": "Minutes",
"Claw.TaskSettings.hoursOption": "Hours",
"Claw.TaskSettings.daysOption": "Days",
"Claw.TaskSettings.actionType": "Action Type",
"Claw.TaskSettings.sendMessage": "Send Message",
"Claw.TaskSettings.executeCommand": "Execute Command",
"Claw.TaskSettings.webhook": "Webhook",
"Claw.TaskSettings.contentRequired": "Content *",
"Claw.TaskSettings.contentPlaceholder": "Get latest tech news",
"Claw.TaskSettings.commandPlaceholder": "npm run build",
"Claw.TaskSettings.webhookUrlPlaceholder": "https://api.example.com/webhook",
"Claw.TaskSettings.requestBodyPlaceholder": "Request Body (JSON)",
"Claw.TaskSettings.createTask": "Create Task",
"Claw.TaskSettings.noTasks": "No scheduled tasks",
"Claw.TaskSettings.noTasksHint": "Create a task to automate your workflow",
"Claw.TaskSettings.nextRun": "Next: {0}",
"Claw.TaskSettings.lastRun": "Last: {0} ago",
"Claw.TaskSettings.saveTask": "Save Task",
"Claw.TaskSettings.taskSaved": "Task saved",
"Claw.TaskSettings.fillRequiredFields": "Please fill in required fields",
"Claw.TaskSettings.taskCreated": "Task created",
"Claw.TaskSettings.taskDeleted": "Task deleted",
"Claw.TaskSettings.executingTask": "Executing task...",
"Claw.TaskSettings.taskCompleted": "Task completed",
"Claw.TaskSettings.taskError": "Error: {0}",
"Claw.TaskSettings.none": "None",
"Claw.TaskSettings.immediate": "Immediate",
"Claw.TaskSettings.seconds": "{0} second(s)",
"Claw.TaskSettings.minutes": "{0} minute(s)",
"Claw.TaskSettings.hours": "{0} hour(s)",
"Claw.Setup.basicConfig.title": "Basic Settings",
"Claw.Setup.basicConfig.description": "Config will be automatically saved after completion",
"Claw.Setup.basicConfig.fileServerPort": "File Server Port",
"Claw.Setup.basicConfig.agentPort": "Agent Port",
"Claw.Setup.basicConfig.workspaceDir": "Workspace Directory",
"Claw.Setup.basicConfig.workspaceDirPlaceholder": "Use the button on the right to select a directory",
"Claw.Setup.basicConfig.select": "Select",
"Claw.Setup.basicConfig.nextStep": "Next: Account Login",
"Claw.Setup.basicConfig.fileServerPortRequired": "Please enter file server port",
"Claw.Setup.basicConfig.agentPortRequired": "Please enter Agent port",
"Claw.Setup.basicConfig.workspaceDirRequired": "Please select workspace directory",
"Claw.Setup.basicConfig.saved": "Basic configuration saved",
"Claw.Setup.basicConfig.saveFailed": "Failed to save configuration",
"Claw.Setup.login.title": "Account Login",
"Claw.Setup.login.alreadyLoggedIn": "Logged In",
"Claw.Setup.login.currentDomain": "Current domain: {domain}",
"Claw.Setup.login.logout": "Logout",
"Claw.Setup.login.nextStep": "Next",
"Claw.Setup.login.accountAndCodeRequired": "Please enter account and verification code",
"Claw.Setup.login.domainRequired": "Please enter service domain",
"Claw.Setup.login.success": "Logged in successfully",
"Claw.Setup.login.logoutFailed": "Logout failed",
"Claw.Setup.login.failed": "Login Failed",
"Claw.Setup.login.domain": "Service Domain",
"Claw.Setup.login.domainPlaceholder": "e.g., https://agent.qiming.com",
"Claw.Setup.login.account": "Account",
"Claw.Setup.login.accountPlaceholder": "Username / Phone / Email",
"Claw.Setup.login.code": "Verification Code",
"Claw.Setup.login.codePlaceholder": "Enter your password or dynamic authentication code (open your domain in a browser to log in, then check your user profile)",
"Claw.Setup.login.prevStep": "Previous",
"Claw.Setup.login.pleaseWait": "Please wait ({seconds}s)",
"Claw.Setup.login.loginButton": "Log In",
"Claw.Setup.login.supportMultipleAccountTypes": "Supports username, email, and phone login",
"Claw.Setup.completed.title": "Setup Complete",
"Claw.Setup.completed.subTitle": "Entering main interface...",
"Claw.Setup.dependencies.checking": "Checking and installing required dependencies",
"Claw.Setup.quickInit.configuring": "Auto configuring...",
"Claw.Setup.wizardTitle": "Setup Wizard",
"Claw.Setup.wizardSubtitle": "Complete configuration to get started",
"Claw.Setup.footer.autoSaved": "Progress automatically saved",
"Claw.GUIAgent.title": "Vision Model",
"Claw.GUIAgent.provider.zhipu": "Zhipu AI",
"Claw.GUIAgent.provider.qwen": "Qwen",
"Claw.GUIAgent.provider.custom": "Custom...",
"Claw.GUIAgent.coordinateMode.auto": "Auto (matched by model)",
"Claw.GUIAgent.coordinateMode.imageAbsolute": "Image Absolute Coordinates",
"Claw.GUIAgent.coordinateMode.normalized1000": "Normalized 0-1000",
"Claw.GUIAgent.coordinateMode.normalized999": "Normalized 0-999",
"Claw.GUIAgent.coordinateMode.normalized0to1": "Normalized 0-1",
"Claw.GUIAgent.protocol.anthropic": "Anthropic",
"Claw.GUIAgent.protocol.openai": "OpenAI",
"Claw.GUIAgent.display.primary": "Primary Display",
"Claw.GUIAgent.display.secondary": "Display",
"Claw.GUIAgent.error.customProviderNameRequired": "Please enter custom provider name",
"Claw.GUIAgent.message.configSaved": "Config saved",
"Claw.GUIAgent.message.saveFailed": "Save failed",
"Claw.GUIAgent.form.provider": "Provider",
"Claw.GUIAgent.error.providerRequired": "Please select a provider",
"Claw.GUIAgent.placeholder.selectProvider": "Select provider",
"Claw.GUIAgent.form.customProviderName": "Custom Provider Name",
"Claw.GUIAgent.error.providerNameRequired": "Please enter provider name",
"Claw.GUIAgent.placeholder.customProviderName": "Enter provider name, e.g. my-provider",
"Claw.GUIAgent.form.apiProtocol": "API Protocol",
"Claw.GUIAgent.tooltip.apiProtocol": "Anthropic Protocol: x-api-key auth + /v1/messages endpoint. OpenAI Protocol: Bearer auth + /chat/completions endpoint. Domestic models (Zhipu, Qwen, DeepSeek, etc.) typically use OpenAI-compatible protocols.",
"Claw.GUIAgent.form.visionModel": "Vision Model",
"Claw.GUIAgent.error.modelRequired": "Please select or enter model name",
"Claw.GUIAgent.placeholder.selectModel": "Select or enter model name",
"Claw.GUIAgent.placeholder.modelId": "Enter model ID, e.g. glm-4v-plus",
"Claw.GUIAgent.form.baseUrl": "Base URL",
"Claw.GUIAgent.tooltip.baseUrl": "Base URL for the API. Preset providers are auto-filled. Custom providers must provide this.",
"Claw.GUIAgent.error.baseUrlRequired": "Custom providers require a Base URL",
"Claw.GUIAgent.placeholder.baseUrl": "e.g. https://api.example.com/v1",
"Claw.GUIAgent.form.apiKey": "API Key (leave empty for global)",
"Claw.GUIAgent.placeholder.apiKey": "Leave empty to use global API Key",
"Claw.GUIAgent.form.targetDisplay": "Target Display",
"Claw.GUIAgent.form.coordinateMode": "Coordinate Mode",
"Claw.GUIAgent.tooltip.coordinateModeAuto": "Auto mode matches coordinate system by model name. Current model: {0} -> {1}",
"Claw.GUIAgent.tooltip.coordinateModeManual": "Manually specifying coordinate mode overrides auto-match. Please confirm your model supports the selected coordinate system.",
"Claw.GUIAgent.display.autoMatch": "Auto-matched for current model",
"Claw.GUIAgent.form.maxSteps": "Max Steps",
"Claw.GUIAgent.form.stepDelay": "Step Delay (ms)",
"Claw.GUIAgent.form.jpegQuality": "Screenshot Quality",
"Claw.GUIAgent.description": "GUI Agent automatically executes desktop tasks through screenshot analysis and keyboard/mouse simulation",
"Claw.Dependencies.uvConfirmed": "uv detected ({context}, {version})",
"Claw.Dependencies.dependencyList": "Dependency List",
"Claw.Dependencies.showOnlyProblems": "Show only issues",
"Claw.Dependencies.showAll": "Show all",
"Claw.Dependencies.noProblemItems": "No issues found",
"Claw.Dependencies.install": "Install",
"Claw.Dependencies.checkFailed": "Dependency check failed",
"Claw.Dependencies.installPkgFailed": "{0} installation failed",
"Claw.Dependencies.installFailed": "Installation failed",
"Claw.Dependencies.installAndUpgrade": "Install & Upgrade",
"Claw.Dependencies.retryInstallAndUpgrade": "Retry Install & Upgrade",
"Claw.Dependencies.retryInstall": "Retry Install",
"Claw.Dependencies.checkingEnv": "Checking dependency environment...",
"Claw.Dependencies.installingDep": "{verb} {pkg}...",
"Claw.Dependencies.installingAllDep": "{verb} dependencies...",
"Claw.Dependencies.enteringNextStep": "Entering next step...",
"Claw.Dependencies.upgradeFailed": "Upgrade failed",
"Claw.Dependencies.pleaseInstallSystemDeps": "Please install required system dependencies, then click 'Recheck'",
"Claw.Dependencies.recheck": "Recheck",
"Claw.Sessions.loginFirst": "Login information incomplete. Please log in first.",
"Claw.Sessions.getSessionUrlFailed": "Failed to get session address",
"Claw.Sessions.sessionStopped": "Session stopped",
"Claw.Sessions.stopSessionFailed": "Failed to stop session",
"Claw.Sessions.statusActive": "Active",
"Claw.Sessions.statusPending": "Pending",
"Claw.Sessions.statusTerminating": "Terminating",
"Claw.Sessions.statusIdle": "Idle",
"Claw.Sessions.engine01": "Agent Engine 1",
"Claw.Sessions.engine02": "Agent Engine 2",
"Claw.Sessions.title": "Sessions",
"Claw.Sessions.refresh": "Refresh",
"Claw.Sessions.newSession": "New Session",
"Claw.Sessions.noActiveSessions": "No active sessions",
"Claw.Sessions.lastActivity": "Last activity",
"Claw.Sessions.open": "Open",
"Claw.Sessions.stop": "Stop",
"Claw.Agent.loadConfigFailed": "Failed to load config",
"Claw.Agent.checkStatusFailed": "Status check failed",
"Claw.Agent.configSaved": "Config saved",
"Claw.Agent.stopped": "Agent stopped",
"Claw.Agent.started": "Agent started successfully",
"Claw.Agent.startFailedWithReason": "Start failed: {reason}",
"Claw.Agent.operationError": "Error: {message}",
"Claw.Agent.engineSettings": "Agent Engine Settings",
"Claw.Agent.running": "Running",
"Claw.Agent.stoppedStatus": "Stopped",
"Claw.Agent.start": "Start",
"Claw.Agent.stop": "Stop",
"Claw.Agent.engineType": "Engine Type",
"Claw.Agent.type": "Type",
"Claw.Agent.claudeCodeAcpDesc": "Anthropic official ACP protocol",
"Claw.Agent.qimingcodeDesc": "Based on OpenCode",
"Claw.Agent.portConfig": "Port Config",
"Claw.Agent.backendPort": "Backend Port (Direct Connection)",
"Claw.Agent.backendPortHint": "Directly connect to Agent service, no proxy needed",
"Claw.Agent.apiConfig": "API Config",
"Claw.Agent.executablePath": "Executable Path",
"Claw.Agent.apiKey": "API Key",
"Claw.Agent.apiBaseUrl": "API Base URL",
"Claw.Agent.model": "Model",
"Claw.Agent.saveConfig": "Save Config",
"Claw.About.checking": "Checking...",
"Claw.About.alreadyLatest": "Already the latest version",
"Claw.About.checkFailed": "Update check failed",
"Claw.About.checkFailedWithDetail": "Update check failed: {error}",
"Claw.About.channelSwitching": "Switch to Beta Channel",
"Claw.About.betaWarning": "Beta channel contains updates that have not been fully verified and may be unstable or have functional defects.",
"Claw.About.confirmSwitch": "Are you sure you want to switch?",
"Claw.About.confirmSwitchBtn": "Confirm Switch",
"Claw.About.switchedToBeta": "Switched to beta channel, checking for updates...",
"Claw.About.switchedToStable": "Switched to stable channel, checking for updates...",
"Claw.About.channelSwitchFailed": "Failed to switch update channel. Please try again later.",
"Claw.About.updateDownloaded": "Update Downloaded",
"Claw.About.updateDownloadedConfirm": "v{version} has been downloaded. Restart now to install?",
"Claw.About.restartNow": "Restart Now",
"Claw.About.later": "Install Later",
"Claw.About.installFailed": "Update installation failed",
"Claw.About.downloadFailed": "Download failed",
"Claw.About.getDebugInfoFailed": "Failed to retrieve debug information",
"Claw.About.versionFound": "New version found: v{version}",
"Claw.About.goToDownloadPage": "Go to Download Page",
"Claw.About.downloadUpdate": "Download Update",
"Claw.About.downloading": "Downloading v{version}... {percent}%",
"Claw.About.versionDownloaded": "v{version} downloaded",
"Claw.About.installUpdate": "Restart to Install",
"Claw.About.readOnlyVolumeError": "The app is running from a read-only location (e.g., opened directly from Downloads) and cannot be updated in place. Please move the app to the Applications folder and try again, or use the button below to download the latest version manually.",
"Claw.About.updateError": "Update error",
"Claw.About.checkUpdate": "Check for Updates",
"Claw.About.crossPlatformDescription": "Cross-platform AI agent desktop client",
"Claw.About.website": "Website",
"Claw.About.betaChannel": "Beta Upgrade Channel",
"Claw.About.betaDisclaimer": "Enabling will switch to the beta channel, which may contain unverified changes.",
"Claw.About.showDebugInfo": "Show Debug Info",
"Claw.About.hideDebugInfo": "Hide Debug Info",
"Claw.About.debugInfoTitle": "Update Detection Debug Info",
"Claw.About.platform": "Platform",
"Claw.About.arch": "Architecture",
"Claw.About.packaged": "Packaged",
"Claw.About.devMode": "No (Dev Mode)",
"Claw.About.appVersion": "App Version",
"Claw.About.appName": "App Name",
"Claw.About.installerType": "Installer Type",
"Claw.About.upgradeSupported": "✅ Auto-upgrade supported",
"Claw.About.manualDownload": "⚠️ Manual download required",
"Claw.About.canAutoUpdate": "Can Auto Update",
"Claw.About.appDir": "App Directory",
"Claw.About.exePath": "Executable Path",
"Claw.About.uninstaller": "Uninstaller",
"Claw.About.totalAppFiles": "Total App Files",
"Claw.About.switchOn": "On",
"Claw.About.switchOff": "Off",
"Claw.Common.yes": "Yes",
"Claw.Common.no": "No",
"Claw.Settings.tabs.basic": "Basic",
"Claw.Settings.tabs.system": "System",
"Claw.Settings.tabs.mcp": "MCP",
"Claw.Settings.tabs.experimental": "Experimental",
"Claw.Settings.tabs.devtools": "Dev Tools",
"Claw.Settings.saveConfig.title": "Service Config",
"Claw.Settings.saveConfig.edit": "Edit",
"Claw.Settings.saveConfig.cancel": "Cancel",
"Claw.Settings.saveConfig.save": "Save",
"Claw.Settings.saveConfig.fileServerPort": "File Server Port",
"Claw.Settings.saveConfig.agentPort": "Agent Port",
"Claw.Settings.saveConfig.guiMcpPort": "GUI MCP Port",
"Claw.Settings.saveConfig.guiMcpEnabled": "Enable GUI MCP",
"Claw.Settings.saveConfig.adminServerPort": "Admin Service Port",
"Claw.Settings.saveConfig.adminServerPortExtra": "Default 60007, for admin interface (restart/health check)",
"Claw.Settings.saveConfig.enterPort": "Please enter port",
"Claw.Settings.saveConfig.restartHint": "Restart services for configuration changes to take effect",
"Claw.Settings.workspace.title": "Workspace Directory",
"Claw.Settings.workspace.selectDir": "Please select workspace directory",
"Claw.Settings.workspace.clickToSelect": "Select a directory",
"Claw.Settings.workspace.select": "Select",
"Claw.Settings.experimental.title": "Experimental Features",
"Claw.Settings.experimental.mutualExclusionHint": "Sandbox and GUI MCP are mutually exclusive experimental features. Enabling one automatically disables the other.",
"Claw.Settings.sandbox.title": "Sandbox",
"Claw.Settings.sandbox.enable": "Enable Sandbox",
"Claw.Settings.sandbox.enableDesc": "When disabled, commands execute directly in workspace",
"Claw.Settings.sandbox.mode": "Sandbox Mode",
"Claw.Settings.sandbox.modeDesc": "Strict: strict minimal permissions · Compat: compatibility first (default) · Permissive: relaxed (troubleshooting only)",
"Claw.Settings.sandbox.modeRestartHint": "Takes effect after restarting the current Agent session or starting a new one",
"Claw.Settings.sandbox.modeStrict": "Strict",
"Claw.Settings.sandbox.modeCompat": "Compat",
"Claw.Settings.sandbox.modePermissive": "Permissive",
"Claw.Settings.sandbox.statusDegraded": "Sandbox isolation not active (degraded per policy)",
"Claw.Settings.sandbox.statusAvailable": "Sandbox isolation available",
"Claw.Settings.sandbox.statusUnavailable": "Sandbox isolation unavailable",
"Claw.Settings.sandbox.statusNotLoaded": "Not loaded",
"Claw.Settings.guiMcp.title": "GUI MCP",
"Claw.Settings.guiMcp.enable": "Enable GUI MCP",
"Claw.Settings.guiMcp.enableDesc": "Desktop automation visual operation service",
"Claw.Settings.guiMcp.statusEnabled": "Enabled",
"Claw.Settings.guiMcp.statusDisabled": "Disabled",
"Claw.Settings.system.title": "System",
"Claw.Settings.system.autoLaunch": "Auto Launch",
"Claw.Settings.system.autoLaunchDesc": "Automatically run {appName} at system startup",
"Claw.Settings.system.theme": "Theme",
"Claw.Settings.system.themeDesc": "Select interface color scheme",
"Claw.Settings.system.themeSystem": "Follow System",
"Claw.Settings.system.themeLight": "Light",
"Claw.Settings.system.themeDark": "Dark",
"Claw.Settings.system.appDataDir": "App Data Directory",
"Claw.Settings.system.logDir": "Log Directory",
"Claw.Settings.system.loading": "Loading...",
"Claw.Settings.system.workspaceDir": "Workspace Directory",
"Claw.Settings.system.notSet": "Not set",
"Claw.Settings.system.open": "Open",
"Claw.Settings.system.language": "Language",
"Claw.Settings.system.languageDesc": "Select your preferred language",
"Claw.Settings.system.langEnglish": "English",
"Claw.Settings.system.langChinese": "简体中文",
"Claw.Settings.system.langChineseTW": "繁體中文(台灣)",
"Claw.Settings.system.langChineseHK": "繁體中文(香港)",
"Claw.Settings.messages.languageChanged": "Language changed successfully, refreshing...",
"Claw.Settings.messages.languageChangeFailed": "Failed to change language",
"Claw.Settings.languageConfirm.title": "Switch Language",
"Claw.Settings.languageConfirm.content": "Switching language will restart the app and interrupt running services. Continue?",
"Claw.Settings.languageConfirm.ok": "Switch",
"Claw.Settings.languageConfirm.cancel": "Cancel",
"Claw.Settings.dialog.selectWorkspace": "Select Workspace Directory",
"Claw.Settings.messages.saveConfig": "Save Config",
"Claw.Settings.messages.saveConfigConfirm": "Restart services for changes to take effect. Save anyway?",
"Claw.Settings.messages.autoLaunchEnabled": "Auto launch enabled",
"Claw.Settings.messages.autoLaunchDisabled": "Auto launch disabled",
"Claw.Settings.messages.workspaceNotConfigured": "Workspace directory not configured",
"Claw.Settings.messages.openWorkspaceFailed": "Failed to open workspace directory",
"Claw.Settings.messages.sandboxPolicyUpdated": "Sandbox policy updated",
"Claw.Settings.messages.updateSandboxPolicyFailed": "Failed to update sandbox policy",
"Claw.Settings.messages.sandboxLinuxNotAvailableYet": "Sandbox is not available on Linux yet",
"Claw.Settings.guiMcp.messages.enableSuccess": "GUI MCP enabled",
"Claw.Settings.guiMcp.messages.disableSuccess": "GUI MCP disabled",
"Claw.Settings.guiMcp.messages.updateFailed": "Failed to update GUI MCP settings",
"Claw.Settings.messages.settingFailed": "Setting failed",
"Claw.MCP.title": "MCP Proxy Service Mgmt",
"Claw.MCP.status.ready": "Ready",
"Claw.MCP.status.notReady": "Not Ready",
"Claw.MCP.status.serverCount": "Server(s)",
"Claw.MCP.checkAvailability": "Check Availability",
"Claw.MCP.serverManagement.title": "MCP Servers Config",
"Claw.MCP.serverManagement.noServers": "No MCP Server configured",
"Claw.MCP.serverManagement.confirmRemove": "Confirm removal?",
"Claw.MCP.transport.sse": "SSE",
"Claw.MCP.transport.http": "HTTP",
"Claw.MCP.transport.stdio": "stdio",
"Claw.MCP.transport.auto": "Auto Detect",
"Claw.MCP.transport.streamableHttp": "Streamable HTTP",
"Claw.MCP.addServer.url": "URL",
"Claw.MCP.addServer.argsPlaceholder": "Args",
"Claw.MCP.addServer.idPlaceholder": "Server ID (e.g., my-mcp-server)",
"Claw.MCP.addServer.stdio": "Command Line (stdio)",
"Claw.MCP.addServer.remote": "Remote URL (HTTP/SSE)",
"Claw.MCP.addServer.commandPlaceholder": "Command",
"Claw.MCP.addServer.argsPlaceholderFull": "Args (e.g., -y chrome-devtools-mcp@latest)",
"Claw.MCP.addServer.urlPlaceholder": "URL (e.g., https://example.com/mcp)",
"Claw.MCP.addServer.authTokenPlaceholder": "AuthToken (optional)",
"Claw.MCP.addServer.button": "Add MCP Server",
"Claw.MCP.addServer.idRequired": "Please enter Server ID",
"Claw.MCP.addServer.argsRequired": "Please enter Args",
"Claw.MCP.message.serverAdded": "Added. Remember to save config.",
"Claw.MCP.message.serverRemoved": "Removed. Remember to save config.",
"Claw.MCP.toolFilter.title": "Tool Filter",
"Claw.MCP.toolFilter.none": "No Filter",
"Claw.MCP.toolFilter.allowList": "Allow List",
"Claw.MCP.toolFilter.denyList": "Deny List",
"Claw.MCP.toolFilter.allowPlaceholder": "Enter allowed tool names, comma-separated (e.g., generate_bar_chart, generate_column_chart)",
"Claw.MCP.toolFilter.denyPlaceholder": "Enter tool names to exclude, comma-separated (e.g., screenshot, navigate)",
"Claw.MCP.toolFilter.hintNone": "Load all tools provided by MCP Servers",
"Claw.MCP.toolFilter.hintAllow": "Only load tools in the allow list, exclude all others",
"Claw.MCP.toolFilter.hintDeny": "Exclude tools in the deny list, load all others",
"Claw.MCP.saveConfig": "Save Config",
"Claw.MCP.saveConfigHint": "Config changes must be saved. They take effect on next Agent initialization.",
"Claw.MCP.message.configSaved": "MCP configuration saved",
"Claw.MCP.message.proxyReady": "MCP Proxy Ready",
"Claw.MCP.message.checkFailed": "Check failed: {0}",
"Claw.MCP.message.error": "Error: {0}",
"Claw.Common.saveFailed": "Save failed",
"Claw.Client.startSession": "Start Session",
"Claw.Client.login": "Login",
"Claw.Client.logout": "Logout",
"Claw.Client.cancel": "Cancel",
"Claw.Client.defaultUser": "User",
"Claw.Client.loginHint": "Supports username, email, or phone number",
"Claw.Client.starting": "Starting",
"Claw.Client.stopping": "Stopping",
"Claw.Client.running": "Running",
"Claw.Client.stopped": "Stopped",
"Claw.Client.stop": "Stop",
"Claw.Client.start": "Start",
"Claw.Client.goInstall": "Go to Install",
"Claw.Client.settings": "Settings",
"Claw.Client.dependencies": "Dependencies",
"Claw.Client.about": "About",
"Claw.Client.accountStatus": "Account Status",
"Claw.Client.services": "Services",
"Claw.Client.refresh": "Refresh",
"Claw.Client.startAll": "Start All",
"Claw.Client.stopAll": "Stop All",
"Claw.Client.quickActions": "Quick Actions",
"Claw.Client.serviceStartFailed": "{0} failed to start: {1}",
"Claw.Client.stopFailed": "Failed to stop: {0}",
"Claw.Process.exitImmediately": "Process exited immediately after starting",
"Claw.Sandbox.workspaceNotFound": "Workspace not found: {0}",
"Claw.Lanproxy.missingServerConfig": "Server config missing",
"Claw.Permissions.command": "Command",
"Claw.Permissions.envVars": "Environment Variables",
"Claw.Permissions.file": "File",
"Claw.Permissions.tool": "Tool",
"Claw.Permissions.second": "Seconds",
"Claw.Permissions.deny": "Deny",
"Claw.Permissions.allowOnce": "Allow Once",
"Claw.Permissions.allowAlways": "Allow Always",
"Claw.Permissions.url": "URL",
"Claw.PermissionRules.defaultToolRead": "Read File (tool)",
"Claw.PermissionRules.defaultToolEdit": "Edit File (tool)",
"Claw.PermissionRules.defaultBash": "Bash Command",
"Claw.PermissionRules.defaultNetwork": "Network Request",
"Claw.PermissionRules.defaultFileRead": "File Read",
"Claw.PermissionRules.defaultFileWrite": "File Write",
"Claw.PermissionsPage.granted": "Granted",
"Claw.PermissionsPage.denied": "Denied",
"Claw.PermissionsPage.unknown": "Unknown",
"Claw.PermissionsPage.title": "System Authorization",
"Claw.PermissionsPage.description": "The following permissions may affect normal operation of the app. Please grant as needed.",
"Claw.PermissionsPage.refresh": "Refresh",
"Claw.PermissionsPage.openSettings": "Open Settings",
"Claw.PermissionsPage.allGranted": "All permissions granted",
"Claw.PermissionsPage.cannotOpenSettings": "Cannot open system settings",
"Claw.PermissionsPage.macosAccessibility": "Accessibility",
"Claw.PermissionsPage.macosAccessibilityDesc": "Allows the app to control your computer",
"Claw.PermissionsPage.macosScreenRecording": "Screen Recording",
"Claw.PermissionsPage.macosScreenRecordingDesc": "Allows the app to record screen content",
"Claw.PermissionsPage.macosFullDiskAccess": "Full Disk Access",
"Claw.PermissionsPage.macosFullDiskAccessDesc": "Allows the app to access all files",
"Claw.Sandbox.unavailable": "Sandbox unavailable, please check sandbox configuration",
"Claw.Sandbox.unavailableWithType": "Sandbox unavailable: {0}",
"Claw.Sandbox.dockerUnavailable": "Docker is unavailable. Please ensure Docker Desktop is installed and running.",
"Claw.Sandbox.helperUnavailable": "Sandbox helper unavailable, please confirm qiming-sandbox-helper is installed",
"Claw.Sandbox.workspaceExists": "Workspace already exists: {0}",
"Claw.Sandbox.workspaceCreateFailed": "Failed to create workspace, please check disk space and permissions",
"Claw.Sandbox.workspaceDestroyFailed": "Failed to destroy workspace. Please clean up manually.",
"Claw.Sandbox.workspaceInvalidState": "Workspace state invalid, please retry or recreate",
"Claw.Sandbox.executionFailed": "Command execution failed",
"Claw.Sandbox.executionTimeout": "Command execution timed out",
"Claw.Sandbox.executionBlocked": "Command blocked by security policy",
"Claw.Sandbox.commandNotFound": "Command not found",
"Claw.Sandbox.fileNotFound": "File not found",
"Claw.Sandbox.fileWriteFailed": "File write failed",
"Claw.Sandbox.fileReadFailed": "File read failed",
"Claw.Sandbox.fileDeleteFailed": "File delete failed",
"Claw.Sandbox.directoryOperationFailed": "Directory operation failed",
"Claw.Sandbox.cleanupFailed": "Cleanup failed",
"Claw.Sandbox.cleanupTimeout": "Cleanup timed out",
"Claw.Sandbox.configInvalid": "Invalid configuration",
"Claw.Sandbox.configMissing": "Missing configuration",
"Claw.Sandbox.containerOperationFailed": "Container operation failed",
"Claw.Sandbox.containerStartFailed": "Container start failed",
"Claw.Sandbox.containerStopFailed": "Container stop failed",
"Claw.Sandbox.resourceInsufficient": "Insufficient resources",
"Claw.Sandbox.outOfMemory": "Out of memory",
"Claw.Sandbox.outOfDiskSpace": "Out of disk space",
"Claw.Sandbox.unknownError": "Unknown error",
"Claw.Sandbox.helperReady": "Windows Sandbox helper ready",
"Claw.GUIAgent.entryNotFound": "agent-gui-server entry file not found. Please run npm run prepare:gui-server first.",
"Claw.GUIAgent.nodeNotFound": "Node.js not found. GUI Agent Server cannot start.",
"Claw.GUIAgent.missingApiKey": "API Key not found. GUI Agent Server may not work properly.",
"Claw.MCP.notInstalled": "qiming-mcp-stdio-proxy not installed, please install via dependency management or ensure npm install has been run",
"Claw.MCP.entryNotFound": "qiming-mcp-stdio-proxy entry file not found",
"Claw.MCP.discoverTools": "Discover Tools",
"Claw.MCP.discoveredTools": "Discovered Tools",
"Claw.MCP.tools": "Tools",
"Claw.MCP.message.toolsDiscovered": "Discovered {0} tools",
"Claw.MCP.message.discoveryFailed": "Tool discovery failed: {0}",
"Claw.MCP.message.discoveryError": "Tool discovery error: {0}",
"Claw.MCP.batch.operations": "Batch Operations",
"Claw.MCP.batch.enableAll": "Enable All",
"Claw.MCP.batch.disableAll": "Disable All",
"Claw.MCP.batch.discoverAll": "Discover All Tools",
"Claw.MCP.batch.discovering": "Discovering tools in batch...",
"Claw.MCP.batch.enableAllSuccess": "All servers enabled",
"Claw.MCP.batch.disableAllSuccess": "All servers disabled",
"Claw.MCP.batch.discoverAllSuccess": "Batch discovery completed: {0}/{1} succeeded",
"Claw.MCP.importExport.export": "Export Config",
"Claw.MCP.importExport.import": "Import Config",
"Claw.MCP.importExport.exportSuccess": "Config exported to: {0}",
"Claw.MCP.importExport.exportFailed": "Export failed: {0}",
"Claw.MCP.importExport.exportError": "Export error: {0}",
"Claw.MCP.importExport.exportWarningTitle": "Export Configuration Confirmation",
"Claw.MCP.importExport.exportWarningContent": "The configuration file may contain sensitive information (such as API tokens, passwords, etc.). Please keep the exported file secure to avoid leakage.",
"Claw.MCP.importExport.importConfirm": "Import MCP Config",
"Claw.MCP.importExport.importStrategy": "Choose import strategy",
"Claw.MCP.importExport.replace": "Replace",
"Claw.MCP.importExport.merge": "Merge",
"Claw.MCP.importExport.invalidFormat": "Invalid config file format",
"Claw.MCP.importExport.importSuccess": "Successfully imported {0} servers",
"Claw.MCP.importExport.importError": "Import error: {0}",
"Claw.MCP.template.selectTitle": "Select MCP Template",
"Claw.MCP.template.category.all": "All",
"Claw.MCP.template.category.file": "File",
"Claw.MCP.template.category.network": "Network",
"Claw.MCP.template.category.data": "Data",
"Claw.MCP.template.category.ai": "AI",
"Claw.MCP.template.category.dev": "Development",
"Claw.MCP.template.noTemplates": "No templates",
"Claw.MCP.template.fillParams": "Fill in parameters",
"Claw.MCP.template.paramRequired": "Please fill in {0}",
"Claw.MCP.template.addSuccess": "Added {0}",
"Claw.MCP.template.apply": "Apply Template",
"Claw.MCP.template.params": "Template Parameters",
"Claw.MCP.Tools.toolCount": "tools",
"Claw.MCP.Tools.discoverTools": "Discover Tools",
"Claw.MCP.Tools.discoveredTools": "Discovered Tools",
"Claw.MCP.addServer.fromTemplate": "Add from Template",
"Claw.MCP.addServer.custom": "Custom Add",
"Claw.MCP.editor.title": "JSON Configuration Editor",
"Claw.MCP.editor.description": "Edit MCP configuration in JSON format, supports stdio and remote server types.",
"Claw.MCP.editor.config": "Configuration",
"Claw.MCP.editor.placeholder": "Enter MCP configuration in JSON format...",
"Claw.MCP.editor.parseError": "JSON Parse Error",
"Claw.MCP.editor.format": "Format",
"Claw.MCP.editor.exampleTitle": "Configuration Example",
"Claw.MCP.editor.previewTitle": "JSON Syntax Highlight Preview",
"Claw.MCP.view.list": "List Mode",
"Claw.MCP.view.json": "JSON Mode",
"Claw.MCP.list.title": "MCP server list (enable manually to activate)",
"Claw.MCP.list.enabledSummary": "Enabled {0} / {1}",
"Claw.MCP.list.disableAll": "Disable All",
"Claw.MCP.list.disableAllSuccess": "All MCP servers are disabled",
"Claw.MCP.list.addServer": "Add Server",
"Claw.MCP.list.edit": "Edit",
"Claw.MCP.list.test": "Test",
"Claw.MCP.list.testSuccess": "Test passed: {0} tools found",
"Claw.MCP.list.testFailed": "Test failed: {0}",
"Claw.MCP.list.testing": "Testing...",
"Claw.MCP.editor.createTitle": "Add MCP Server",
"Claw.MCP.editor.editTitle": "Edit MCP Server",
"Claw.MCP.editor.back": "Back",
"Claw.MCP.editor.tabForm": "Form",
"Claw.MCP.editor.tabJson": "JSON",
"Claw.MCP.editor.jsonHint": "Paste a single server entry {\"server-name\": {...}} or a full mcpServers config",
"Claw.MCP.switch.enable": "Enable",
"Claw.MCP.switch.disable": "Disable",
"Claw.MCP.addServer.modalTitle": "Add MCP Server",
"Claw.MCP.addServer.type": "Server Type",
"Claw.MCP.addServer.serverId": "Server ID",
"Claw.MCP.addServer.add": "Add",
"Claw.MCP.addServer.idDuplicate": "Server ID already exists. Please use another one.",
"Claw.MCP.addServer.commandRequired": "Command is required in stdio mode",
"Claw.MCP.addServer.urlRequired": "URL is required in remote mode",
"Claw.MCP.addServer.argsInvalid": "Args format is invalid. Use JSON array (e.g. [\"-y\",\"pkg\"]) or quoted shell-like args.",
"Claw.MCP.addServer.addSuccess": "Server added (disabled by default, enable it manually)",
"Claw.MCP.addServer.argsPlaceholderAdvanced": "Prefer JSON array, e.g. [\"-y\",\"@modelcontextprotocol/server-filesystem\",\"/path with space\"]",
"Claw.MCP.message.invalidJson": "Invalid JSON format, please check and retry",
"Claw.MCP.message.formatted": "Formatted successfully",
"Claw.MCP.message.formatFailed": "Format failed",
"Claw.MCP.status.running": "Running",
"Claw.MCP.status.stopped": "Stopped",
"Claw.MCP.action.start": "Start",
"Claw.MCP.action.restart": "Restart",
"Claw.LogViewer.title": "App Logs",
"Claw.LogViewer.autoScroll": "Auto Scroll",
"Claw.LogViewer.all": "All",
"Claw.LogViewer.refresh": "Refresh",
"Claw.LogViewer.openDir": "Open Directory",
"Claw.LogViewer.noLogs": "No logs",
"Claw.LogViewer.scrollToLoadMore": "Scroll up to load older logs",
"Claw.LogViewer.totalLogs": "{0} log entries",
"Claw.LogViewer.autoScrollEnabled": "Auto scroll enabled"
}

View File

@@ -0,0 +1,882 @@
{
"Claw.Common.loading": "加载中...",
"Claw.Common.save": "保存",
"Claw.Common.cancel": "取消",
"Claw.Common.confirm": "确认",
"Claw.Common.delete": "删除",
"Claw.Common.edit": "编辑",
"Claw.Common.add": "添加",
"Claw.Common.open": "打开",
"Claw.Common.close": "关闭",
"Claw.Common.retry": "重试",
"Claw.Common.noData": "暂无数据",
"Claw.Common.back": "返回",
"Claw.Common.refresh": "刷新",
"Claw.Toast.Success.configSaved": "配置已保存",
"Claw.Toast.Success.aiConfigSaved": "AI 配置已保存",
"Claw.Toast.Success.agentStarted": "Agent 已启动",
"Claw.Toast.Success.agentStopped": "Agent 已停止",
"Claw.Toast.Success.mcpStarted": "MCP 服务已启动",
"Claw.Toast.Success.mcpStopped": "MCP 服务已停止",
"Claw.Toast.Success.mcpRestarted": "MCP 服务已重启",
"Claw.Toast.Success.mcpConfigSaved": "MCP 配置已保存",
"Claw.Toast.Success.servicesStarted": "服务已启动",
"Claw.Toast.Success.servicesStopped": "服务已停止",
"Claw.Toast.Success.loginSuccess": "登录成功",
"Claw.Toast.Success.logoutSuccess": "已退出登录",
"Claw.Toast.Success.setupSaved": "设置已保存",
"Claw.Toast.Success.dependenciesInstalled": "依赖安装完成",
"Claw.Toast.Error.configSaveFailed": "配置保存失败",
"Claw.Toast.Error.aiConfigSaveFailed": "AI 配置保存失败",
"Claw.Toast.Error.startFailed": "启动失败",
"Claw.Toast.Error.stopFailed": "停止失败",
"Claw.Toast.Error.restartFailed": "重启失败",
"Claw.Toast.Error.saveFailed": "保存失败",
"Claw.Toast.Error.loginFailed": "登录失败",
"Claw.Toast.Error.logoutFailed": "退出登录失败",
"Claw.Toast.Error.loadFailed": "加载失败",
"Claw.Toast.Error.dependenciesInstallFailed": "依赖安装失败",
"Claw.Toast.Error.setupLoadFailed": "设置加载失败",
"Claw.Toast.Error.openSettingsFailed": "打开设置失败",
"Claw.Toast.Error.openLogsFailed": "打开日志失败",
"Claw.Toast.Error.openBrowserFailed": "打开浏览器失败",
"Claw.Toast.Error.invalidSessionUrl": "无效的会话地址",
"Claw.Toast.Warning.incompleteLoginInfo": "登录信息不完整",
"Claw.Toast.Warning.missingDependencies": "存在缺失依赖,请先安装",
"Claw.Toast.Warning.serverDomainRequired": "请输入服务域名",
"Claw.Toast.Warning.agentPortRequired": "请输入 Agent 端口",
"Claw.Toast.Warning.fileServerPortRequired": "请输入文件服务端口",
"Claw.Toast.Warning.proxyPortRequired": "请输入代理端口",
"Claw.Toast.Warning.workspaceDirRequired": "请选择工作区目录",
"Claw.Toast.Warning.usernameAndOtpRequired": "请输入账号和动态认证码",
"Claw.Toast.Warning.serverIdRequired": "请输入 Server ID",
"Claw.Toast.Warning.argsRequired": "请输入参数",
"Claw.Toast.Warning.loginFirst": "请先登录",
"Claw.Toast.Info.allServicesRunning": "所有服务已在运行",
"Claw.Toast.Info.noRunningServices": "当前没有运行中的服务",
"Claw.Toast.Info.noDependenciesToInstall": "没有需要安装的依赖",
"Claw.Toast.Info.serverAddedRememberSave": "已添加服务,记得保存配置",
"Claw.Toast.Info.serverRemovedRememberSave": "已移除服务,记得保存配置",
"Claw.Toast.Info.loginFirstSilent": "请先登录",
"Claw.Toast.Info.alreadyLatestVersion": "当前已是最新版本",
"Claw.Errors.mcpReconnectRetryLater": "MCP 连接波动,正在自动重连,请稍后重试",
"Claw.WindowsMcp.portInUseHint": "常见原因:端口 {port} 已被占用。请稍后重试、在设置中修改 GUI MCP 端口,或在任务管理器中结束相关进程。",
"Claw.Pages.Dependencies.systemEnv": "系统环境",
"Claw.Pages.Dependencies.dependencyPackages": "依赖包",
"Claw.Pages.Dependencies.checking": "检测中...",
"Claw.Pages.Dependencies.notInstalled": "未安装",
"Claw.Pages.Dependencies.integrated": "应用集成",
"Claw.Pages.Dependencies.notIntegrated": "未集成",
"Claw.Pages.Dependencies.required": "必需",
"Claw.Pages.Dependencies.upgrading": "升级中...",
"Claw.Pages.Dependencies.updating": "更新中...",
"Claw.Pages.Dependencies.installing": "安装中...",
"Claw.Pages.Dependencies.install": "安装",
"Claw.Pages.Dependencies.update": "更新",
"Claw.Pages.Dependencies.upgrade": "升级",
"Claw.Pages.Dependencies.installAll": "全部安装",
"Claw.Pages.Dependencies.upgradeAll": "全部升级",
"Claw.Pages.Dependencies.updateTo": "更新到 {0}",
"Claw.Pages.Dependencies.noDependencies": "暂无依赖包",
"Claw.Pages.Dependencies.installedCount": "{0}/{1} 已安装",
"Claw.Pages.Dependencies.dep.uv": "uv",
"Claw.Pages.Dependencies.dep.pnpm": "pnpm 包管理器",
"Claw.Pages.Dependencies.dep.anthropicSdk": "Anthropic SDK",
"Claw.Pages.Dependencies.dep.claudeCodeAcp": "ACP 协议",
"Claw.Pages.Dependencies.dep.fileServer": "文件服务",
"Claw.Pages.Dependencies.dep.mcpProxy": "MCP 代理",
"Claw.Pages.Dependencies.dep.qimingcode": "qimingcode",
"Claw.Pages.Dependencies.desc.uv": "高性能 Python 包管理器(已集成)",
"Claw.Pages.Dependencies.desc.pnpm": "高性能 Node.js 包管理器(应用内安装)",
"Claw.Pages.Dependencies.desc.anthropicSdk": "Claude API 客户端",
"Claw.Pages.Dependencies.desc.claudeCodeAcp": "ACP 协议实现",
"Claw.Pages.Dependencies.desc.fileServer": "本地文件 HTTP 服务",
"Claw.Pages.Dependencies.desc.mcpProxy": "MCP 协议聚合代理",
"Claw.Pages.Dependencies.desc.qimingcode": "Agent 执行引擎(应用内集成)",
"Claw.Pages.Dependencies.reqNodeVersion": "需 >= {0}",
"Claw.Pages.Dependencies.reqUvVersion": "需 >= {0}",
"Claw.Pages.Dependencies.msgInstallSuccess": "{0} {1}成功",
"Claw.Pages.Dependencies.msgUpgradeSuccess": "{0} 升级成功",
"Claw.Pages.Dependencies.msgFailed": "{0} {1}失败",
"Claw.Pages.Dependencies.msgInstallAllComplete": "依赖安装并升级完成",
"Claw.Pages.Dependencies.msgUpgradeAllComplete": "依赖升级完成",
"Claw.Pages.Dependencies.msgInstallAllSuccess": "依赖安装完成",
"Claw.Pages.Dependencies.msgLoadFailed": "加载依赖数据失败",
"Claw.Pages.Dependencies.msgRestartingServices": "正在重启服务…",
"Claw.Pages.Dependencies.msgRestartSuccess": "服务已重启",
"Claw.Pages.Dependencies.msgRestartFailed": "重启服务失败",
"Claw.Pages.Dependencies.msgNoDependenciesToInstall": "没有需要安装或升级的依赖",
"Claw.Pages.Dependencies.msgInstallFailed": "安装失败: {0}",
"Claw.Pages.Dependencies.msgSystemEnvRequired": "请先满足系统环境要求,再安装依赖包",
"Claw.Components.Dependency.checking": "检查中",
"Claw.Components.Dependency.installed": "已安装",
"Claw.Components.Dependency.missing": "缺失",
"Claw.Components.Dependency.outdated": "版本过低",
"Claw.Components.Dependency.installing": "安装中",
"Claw.Components.Dependency.bundled": "应用集成",
"Claw.Components.Dependency.error": "错误",
"Claw.Components.Action.starting": "启动中...",
"Claw.Components.Action.stopping": "停止中...",
"Claw.Components.Action.ready": "就绪",
"Claw.Components.Action.needConfig": "需配置",
"Claw.Components.Action.allReady": "所有依赖已就绪",
"Claw.Components.Action.allInstalled": "已就绪",
"Claw.Tray.showWindow": "显示主窗口",
"Claw.Tray.restartServices": "重启服务",
"Claw.Tray.stopServices": "停止服务",
"Claw.Tray.autoLaunch": "开机自启动",
"Claw.Tray.checkUpdate": "检查更新",
"Claw.Tray.about": "关于 {0} v{1}",
"Claw.Tray.quit": "退出",
"Claw.Tray.Status.running": "运行中",
"Claw.Tray.Status.stopped": "已停止",
"Claw.Tray.Status.error": "错误",
"Claw.Tray.Status.starting": "启动中",
"Claw.Dialog.error": "错误",
"Claw.Dialog.autoLaunchFailed": "设置开机自启动失败",
"Claw.AutoUpdater.networkFailed": "网络请求失败",
"Claw.AutoUpdater.newVersionFound": "发现新版本",
"Claw.AutoUpdater.downloadFailed": "下载失败",
"Claw.AutoUpdater.updateDownloaded": "更新已下载",
"Claw.AutoUpdater.updateReady": "更新已就绪",
"Claw.AutoUpdater.checking": "检查更新",
"Claw.AutoUpdater.alreadyLatest": "当前已是最新版本",
"Claw.AutoUpdater.unsupportedInstall": "当前安装方式不支持自动更新,请前往官网下载页下载最新安装包。",
"Claw.AutoUpdater.downloadInstallNow": "是否立即下载并安装更新?",
"Claw.AutoUpdater.downloadNow": "立即更新",
"Claw.AutoUpdater.later": "稍后再说",
"Claw.AutoUpdater.close": "关闭",
"Claw.AutoUpdater.downloadPage": "前往下载页",
"Claw.AutoUpdater.installNow": "立即重启",
"Claw.AutoUpdater.installOnExit": "退出时安装",
"Claw.AutoUpdater.checkFailed": "检查更新失败",
"Claw.AutoUpdater.devModeUnsupported": "开发模式不支持下载更新,请使用打包版本测试",
"Claw.AutoUpdater.installDevUnsupported": "开发模式不支持安装更新",
"Claw.AutoUpdater.getDownloadLinkFailed": "获取下载链接失败",
"Claw.AutoUpdater.getDownloadLinkFailedDetail": "无法从服务器获取下载链接\n\n错误: {0}\n\n请检查网络连接后重试。",
"Claw.AutoUpdater.versionFound": "发现新版本 v{}",
"Claw.AutoUpdater.getUpdateInfoFailed": "无法获取{}通道更新信息",
"Claw.AutoUpdater.invalidMetadataVersion": "更新元数据版本号不合法(仅支持 x.y.z{}",
"Claw.Agent.Status.idle": "就绪",
"Claw.Agent.Status.starting": "启动中",
"Claw.Agent.Status.running": "运行中",
"Claw.Agent.Status.busy": "繁忙",
"Claw.Agent.Status.stopped": "已停止",
"Claw.Agent.Status.error": "错误",
"Claw.Menu.client": "客户端",
"Claw.Menu.session": "会话",
"Claw.Menu.mcp": "MCP",
"Claw.Menu.settings": "设置",
"Claw.Menu.dependencies": "依赖",
"Claw.Menu.authorization": "授权",
"Claw.Menu.logs": "日志",
"Claw.Menu.about": "关于",
"Claw.App.ConfigSyncFailed": "配置同步失败",
"Claw.App.ConfigSyncFailedDetail": "无法连接到服务器获取最新配置,服务未重启。请检查网络后重试。",
"Claw.App.Retry": "重试",
"Claw.App.RestartingServices": "正在重启服务…",
"Claw.App.RestartSuccess": "服务已重启",
"Claw.App.RestartFailed": "重启服务失败",
"Claw.App.AutoReconnectFailed": "自动重连失败",
"Claw.App.AutoReconnectFailedDetail": "无法连接到服务器。正在使用本地已保存的配置尝试启动服务;若需最新配置请检查网络后重新登录。",
"Claw.App.ServicesRestarting": "服务正在重启…",
"Claw.App.ServicesRestartSuccess": "服务重启成功",
"Claw.App.Loading": "加载中...",
"Claw.App.User": "用户",
"Claw.App.defaultUsername": "用户",
"Claw.App.agentInterfaceFailed": "Agent 接口服务启动失败: {0}",
"Claw.App.agentInterfaceNotRunning": "Agent 接口服务未运行",
"Claw.App.channelCheckFailed": "通道检查失败: {0}",
"Claw.App.serviceRestartFailed": "服务重启失败: {0}",
"Claw.App.back": "返回",
"Claw.App.refresh": "刷新",
"Claw.App.UpdateTag.newVersion": "新版本 v{version}",
"Claw.App.UpdateTag.download": "v{version} 更新",
"Claw.App.UpdateTag.downloading": "下载中 {percent}%",
"Claw.Service.file": "文件服务",
"Claw.Service.fileDesc": "Agent 工作目录文件远程管理服务",
"Claw.Service.agent": "Agent 服务",
"Claw.Service.agentDesc": "Agent 核心服务",
"Claw.Service.mcp": "MCP 服务",
"Claw.Service.mcpDesc": "MCP 协议聚合代理",
"Claw.Service.guiMcp": "GUI MCP 服务",
"Claw.Service.guiMcpDesc": "桌面自动化视觉操作服务",
"Claw.Service.proxy": "代理服务",
"Claw.Service.proxyDesc": "网络通道",
"Claw.Service.admin": "管理服务",
"Claw.Service.adminDesc": "管理接口服务(重启/健康检查)",
"Claw.Client.domainRequired": "请输入服务域名",
"Claw.Client.accountRequired": "请输入账号",
"Claw.Client.codeRequired": "请填写动态认证码",
"Claw.Client.logoutConfirm": "确认退出登录",
"Claw.Client.logoutConfirmDetail": "退出后将停止所有运行中的服务,需要重新登录才能使用在线功能。",
"Claw.Client.logoutFailed": "退出登录失败",
"Claw.Client.getSessionUrlFailed": "无法获取会话地址",
"Claw.Auth.loggingIn": "正在登录…",
"Claw.Auth.loggedOut": "已退出登录",
"Claw.Auth.syncingConfig": "正在同步配置…",
"Claw.Auth.configSyncedSuccess": "配置同步成功",
"Claw.Auth.error.userNotFound": "用户不存在,请检查输入",
"Claw.Auth.error.wrongPassword": "密码错误,请重新输入",
"Claw.Auth.error.accountDisabled": "账户已被禁用,请联系管理员",
"Claw.Auth.error.clientNotFound": "客户端不存在或已下架",
"Claw.Auth.error.clientDisabled": "客户端已被禁用",
"Claw.Auth.error.configNotFound": "配置不存在,请重新登录",
"Claw.Auth.error.loginExpired": "登录已过期,请重新登录",
"Claw.Auth.error.systemError": "系统错误,请稍后重试",
"Claw.Auth.error.forbidden": "没有权限执行此操作",
"Claw.Auth.error.notFound": "请求的资源不存在",
"Claw.Auth.error.serverError": "服务器错误,请稍后重试",
"Claw.Auth.error.loginFailed": "登录失败,请检查网络连接",
"Claw.Api.success": "操作成功",
"Claw.Api.notLoggedIn": "用户未登录,请重新登录",
"Claw.Api.loginExpired": "登录已过期,请重新登录",
"Claw.Api.clientNotFound": "客户端不存在或已下架",
"Claw.Api.systemError": "系统错误,请稍后重试",
"Claw.Api.timeout": "请求超时(>{0}ms请检查网络或服务器状态",
"Claw.Errors.loginFirstForClientKey": "请先登录以获取客户端密钥",
"Claw.Errors.loginRedirect": "登录遇到问题,请检查配置域名信息或服务状态后重试",
"Claw.Log.csvHeader": "时间,级别,来源,消息",
"Claw.Setup.wizardComplete": "向导完成!",
"Claw.Setup.resetComplete": "已重置,刷新页面可重新进入向导",
"Claw.Client.loginFirst": "请先登录以获取代理服务配置",
"Claw.Client.startFailed": "启动失败",
"Claw.Client.loginFirstToStart": "请先登录后再启动服务",
"Claw.Client.missingDeps": "存在缺失依赖,请先安装",
"Claw.Client.allServicesRunning": "所有可自动启动的服务已在运行",
"Claw.Client.startAllServicesFirst": "请先启动全部服务",
"Claw.Client.domainPlaceholder": "服务域名例如https://agent.qiming.com",
"Claw.Client.usernamePlaceholder": "用户名 / 手机号 / 邮箱",
"Claw.Client.passwordPlaceholder": "请输入密码或动态认证码(在浏览器打开你的域名登录,然后在用户资料中查看)",
"Claw.Client.missingDepsCannotStart": "缺少必需依赖,无法启动服务",
"Claw.Client.qrCode": "扫码使用",
"Claw.EmbeddedWebview.loadFailed": "加载失败: {0} ({1})",
"Claw.EmbeddedWebview.back": "返回",
"Claw.EmbeddedWebview.refresh": "刷新",
"Claw.EmbeddedWebview.unknownError": "未知错误",
"Claw.AgentRunner.configSaved": "配置已保存",
"Claw.AgentRunner.stopped": "Agent Runner 已停止",
"Claw.AgentRunner.started": "Agent Runner 已启动",
"Claw.AgentRunner.error": "错误: {0}",
"Claw.AgentRunner.running": "● 运行中",
"Claw.AgentRunner.stoppedStatus": "○ 已停止",
"Claw.AgentRunner.backendAddress": "后端地址",
"Claw.AgentRunner.proxyAddress": "代理地址",
"Claw.AgentRunner.stop": "停止",
"Claw.AgentRunner.start": "启动",
"Claw.AgentRunner.config": "配置",
"Claw.AgentRunner.executablePath": "可执行文件路径",
"Claw.AgentRunner.backendPort": "后端端口",
"Claw.AgentRunner.proxyPort": "代理端口",
"Claw.AgentRunner.apiKey": "API 密钥",
"Claw.AgentRunner.apiBaseUrl": "API 基础 URL",
"Claw.AgentRunner.defaultModel": "默认模型",
"Claw.AgentRunner.saveConfig": "保存配置",
"Claw.IMSettings.title": "即时通讯集成",
"Claw.IMSettings.platform.dingtalk": "钉钉",
"Claw.IMSettings.platform.feishu": "飞书",
"Claw.IMSettings.configSaved": "配置已保存",
"Claw.IMSettings.connected": "{0} 已连接",
"Claw.IMSettings.error": "错误: {0}",
"Claw.IMSettings.disconnected": "已断开连接",
"Claw.IMSettings.enable": "启用 {0}",
"Claw.IMSettings.botConfig": "机器人配置",
"Claw.IMSettings.appConfig": "应用配置",
"Claw.IMSettings.allowedUsers": "允许的用户 ID逗号分隔",
"Claw.IMSettings.options": "选项",
"Claw.IMSettings.autoReply": "自动回复",
"Claw.IMSettings.disconnect": "断开连接",
"Claw.IMSettings.connecting": "连接中...",
"Claw.IMSettings.connect": "连接",
"Claw.IMSettings.saveConfig": "保存配置",
"Claw.SkillsSync.title": "技能同步(文件服务)",
"Claw.SkillsSync.fileServiceConnection": "文件服务连接",
"Claw.SkillsSync.serviceAddress": "服务地址",
"Claw.SkillsSync.connected": "已连接",
"Claw.SkillsSync.testConnection": "测试连接",
"Claw.SkillsSync.configSaved": "配置已保存",
"Claw.SkillsSync.uploadSkillPackage": "上传技能包ZIP",
"Claw.SkillsSync.uploadHint": "上传包含 <code>skills/</code> 和/或 <code>agents/</code> 目录的 ZIP 文件,将被解压到工作区的 <code>.claude/</code> 目录中。",
"Claw.SkillsSync.syncSkills": "同步技能",
"Claw.SkillsSync.uploading": "上传中...",
"Claw.SkillsSync.logs": "日志",
"Claw.SkillsSync.selectZipFile": "请选择一个 ZIP 文件",
"Claw.SkillsSync.onlyZipSupported": "仅支持 ZIP 文件",
"Claw.SkillsSync.creatingWorkspaceAndSyncing": "正在创建工作区并同步技能...",
"Claw.SkillsSync.workspaceCreatedSuccess": "工作区创建成功",
"Claw.SkillsSync.syncSuccess": "技能同步成功",
"Claw.SkillsSync.errorPrefix": "错误: {0}",
"Claw.SkillsSync.fileSelected": "已选择: {0} ({1} KB)",
"Claw.Lanproxy.title": "内网穿透 (Lanproxy)",
"Claw.Lanproxy.notLoggedIn": "(未登录)",
"Claw.Lanproxy.configSaved": "配置已保存",
"Claw.Lanproxy.tunnelStopped": "内网穿透已停止",
"Claw.Lanproxy.tunnelStarted": "内网穿透已启动",
"Claw.Lanproxy.errorWithDetail": "错误: {0}",
"Claw.Lanproxy.platformNotSupported": "当前平台暂不支持内网穿透(未检测到 lanproxy 二进制)。请使用带 lanproxy 的安装包或从 Tauri 构建获取对应平台二进制。",
"Claw.Lanproxy.running": "● 运行中",
"Claw.Lanproxy.stopped": "○ 已停止",
"Claw.Lanproxy.start": "启动",
"Claw.Lanproxy.stop": "停止",
"Claw.Lanproxy.config": "配置",
"Claw.Lanproxy.serverIp": "服务器 IP",
"Claw.Lanproxy.serverPort": "服务器端口",
"Claw.Lanproxy.clientKey": "客户端密钥(登录后自动获取)",
"Claw.Lanproxy.ssl": "SSL",
"Claw.Lanproxy.enable": "启用",
"Claw.Lanproxy.disable": "禁用",
"Claw.Lanproxy.saveConfig": "保存配置",
"Claw.TaskSettings.title": "定时任务",
"Claw.TaskSettings.taskCount": "{0} 个任务",
"Claw.TaskSettings.addTask": "+ 添加任务",
"Claw.TaskSettings.cancel": " 取消",
"Claw.TaskSettings.taskNameRequired": "任务名称 *",
"Claw.TaskSettings.taskNamePlaceholder": "每日新闻摘要",
"Claw.TaskSettings.description": "描述",
"Claw.TaskSettings.descriptionPlaceholder": "获取每日科技新闻",
"Claw.TaskSettings.scheduleType": "调度方式",
"Claw.TaskSettings.interval": "间隔",
"Claw.TaskSettings.once": "执行一次",
"Claw.TaskSettings.cron": "Cron 表达式",
"Claw.TaskSettings.minutesOption": "分钟",
"Claw.TaskSettings.hoursOption": "小时",
"Claw.TaskSettings.daysOption": "天",
"Claw.TaskSettings.actionType": "动作类型",
"Claw.TaskSettings.sendMessage": "发送消息",
"Claw.TaskSettings.executeCommand": "执行命令",
"Claw.TaskSettings.webhook": "Webhook",
"Claw.TaskSettings.contentRequired": "内容 *",
"Claw.TaskSettings.contentPlaceholder": "获取最新的科技新闻",
"Claw.TaskSettings.commandPlaceholder": "npm run build",
"Claw.TaskSettings.webhookUrlPlaceholder": "https://api.example.com/webhook",
"Claw.TaskSettings.requestBodyPlaceholder": "请求体JSON",
"Claw.TaskSettings.createTask": "创建任务",
"Claw.TaskSettings.noTasks": "暂无定时任务",
"Claw.TaskSettings.noTasksHint": "创建任务以自动化您的工作流程",
"Claw.TaskSettings.nextRun": "下次: {0}",
"Claw.TaskSettings.lastRun": "上次: {0} 前",
"Claw.TaskSettings.saveTask": "保存任务",
"Claw.TaskSettings.taskSaved": "任务已保存",
"Claw.TaskSettings.fillRequiredFields": "请填写必填字段",
"Claw.TaskSettings.taskCreated": "任务已创建",
"Claw.TaskSettings.taskDeleted": "任务已删除",
"Claw.TaskSettings.executingTask": "正在执行任务...",
"Claw.TaskSettings.taskCompleted": "任务执行完成",
"Claw.TaskSettings.taskError": "错误: {0}",
"Claw.TaskSettings.none": "无",
"Claw.TaskSettings.immediate": "立即",
"Claw.TaskSettings.seconds": "{0} 秒",
"Claw.TaskSettings.minutes": "{0} 分钟",
"Claw.TaskSettings.hours": "{0} 小时",
"Claw.Setup.basicConfig.title": "基础设置",
"Claw.Setup.basicConfig.description": "完成配置后即可使用,进度自动保存",
"Claw.Setup.basicConfig.fileServerPort": "文件服务端口",
"Claw.Setup.basicConfig.agentPort": "Agent 端口",
"Claw.Setup.basicConfig.workspaceDir": "工作区目录",
"Claw.Setup.basicConfig.workspaceDirPlaceholder": "点击右侧按钮选择目录",
"Claw.Setup.basicConfig.select": "选择",
"Claw.Setup.basicConfig.nextStep": "下一步:账号登录",
"Claw.Setup.basicConfig.fileServerPortRequired": "请输入文件服务端口",
"Claw.Setup.basicConfig.agentPortRequired": "请输入 Agent 端口",
"Claw.Setup.basicConfig.workspaceDirRequired": "请选择工作区目录",
"Claw.Setup.basicConfig.saved": "基础配置已保存",
"Claw.Setup.basicConfig.saveFailed": "保存配置失败",
"Claw.Setup.login.title": "账号登录",
"Claw.Setup.login.alreadyLoggedIn": "已登录",
"Claw.Setup.login.currentDomain": "当前域名:{domain}",
"Claw.Setup.login.logout": "退出登录",
"Claw.Setup.login.nextStep": "下一步",
"Claw.Setup.login.accountAndCodeRequired": "请输入账号和动态认证码",
"Claw.Setup.login.domainRequired": "请输入服务域名",
"Claw.Setup.login.success": "登录成功",
"Claw.Setup.login.logoutFailed": "退出登录失败",
"Claw.Setup.login.failed": "登录失败",
"Claw.Setup.login.domain": "服务域名",
"Claw.Setup.login.domainPlaceholder": "例如https://agent.qiming.com",
"Claw.Setup.login.account": "账号",
"Claw.Setup.login.accountPlaceholder": "用户名 / 手机号 / 邮箱",
"Claw.Setup.login.code": "动态认证码",
"Claw.Setup.login.codePlaceholder": "请输入密码或动态认证码(在浏览器打开你的域名登录,然后在用户资料中查看)",
"Claw.Setup.login.prevStep": "上一步",
"Claw.Setup.login.pleaseWait": "请稍后 ({seconds}s)",
"Claw.Setup.login.loginButton": "登录",
"Claw.Setup.login.supportMultipleAccountTypes": "支持用户名、邮箱、手机号登录",
"Claw.Setup.completed.title": "初始化完成",
"Claw.Setup.completed.subTitle": "正在进入主界面...",
"Claw.Setup.dependencies.checking": "检查和安装必需依赖",
"Claw.Setup.quickInit.configuring": "正在自动配置...",
"Claw.Setup.wizardTitle": "初始化向导",
"Claw.Setup.wizardSubtitle": "完成配置后即可使用",
"Claw.Setup.footer.autoSaved": "进度自动保存",
"Claw.GUIAgent.title": "GUI Agent 视觉模型",
"Claw.GUIAgent.provider.zhipu": "智谱 AI",
"Claw.GUIAgent.provider.qwen": "通义千问",
"Claw.GUIAgent.provider.custom": "自定义...",
"Claw.GUIAgent.coordinateMode.auto": "自动(根据模型匹配)",
"Claw.GUIAgent.coordinateMode.imageAbsolute": "图像绝对坐标",
"Claw.GUIAgent.coordinateMode.normalized1000": "归一化 0-1000",
"Claw.GUIAgent.coordinateMode.normalized999": "归一化 0-999",
"Claw.GUIAgent.coordinateMode.normalized0to1": "归一化 0-1",
"Claw.GUIAgent.protocol.anthropic": "Anthropic 协议",
"Claw.GUIAgent.protocol.openai": "OpenAI 协议",
"Claw.GUIAgent.display.primary": "主显示器",
"Claw.GUIAgent.display.secondary": "显示器",
"Claw.GUIAgent.error.customProviderNameRequired": "请输入自定义提供商名称",
"Claw.GUIAgent.message.configSaved": "GUI Agent 配置已保存",
"Claw.GUIAgent.message.saveFailed": "保存失败",
"Claw.GUIAgent.form.provider": "模型提供商",
"Claw.GUIAgent.error.providerRequired": "请选择提供商",
"Claw.GUIAgent.placeholder.selectProvider": "选择提供商",
"Claw.GUIAgent.form.customProviderName": "自定义提供商名称",
"Claw.GUIAgent.error.providerNameRequired": "请输入提供商名称",
"Claw.GUIAgent.placeholder.customProviderName": "输入提供商名称,如 my-provider",
"Claw.GUIAgent.form.apiProtocol": "API 协议",
"Claw.GUIAgent.tooltip.apiProtocol": "Anthropic 协议: x-api-key 认证 + /v1/messages 端点。OpenAI 协议: Bearer 认证 + /chat/completions 端点。国内模型智谱、通义、DeepSeek 等)通常使用 OpenAI 兼容协议。",
"Claw.GUIAgent.form.visionModel": "视觉模型",
"Claw.GUIAgent.error.modelRequired": "请选择或输入模型名称",
"Claw.GUIAgent.placeholder.selectModel": "选择或输入模型名称",
"Claw.GUIAgent.placeholder.modelId": "输入模型 ID如 glm-4v-plus",
"Claw.GUIAgent.form.baseUrl": "Base URL",
"Claw.GUIAgent.tooltip.baseUrl": "API 的基础地址。预设提供商已自动填充,也可手动覆盖。自定义提供商必须填写。",
"Claw.GUIAgent.error.baseUrlRequired": "自定义提供商需要填写 Base URL",
"Claw.GUIAgent.placeholder.baseUrl": "如 https://api.example.com/v1",
"Claw.GUIAgent.form.apiKey": "API Key (留空使用全局)",
"Claw.GUIAgent.placeholder.apiKey": "留空则使用全局 API Key",
"Claw.GUIAgent.form.targetDisplay": "目标显示器",
"Claw.GUIAgent.form.coordinateMode": "坐标模式",
"Claw.GUIAgent.tooltip.coordinateModeAuto": "自动模式将根据模型名匹配坐标系。当前模型「{0}」→ {1}",
"Claw.GUIAgent.tooltip.coordinateModeManual": "手动指定坐标模式会覆盖自动匹配,请确认模型支持所选坐标系",
"Claw.GUIAgent.display.autoMatch": "当前模型自动匹配",
"Claw.GUIAgent.form.maxSteps": "最大步数",
"Claw.GUIAgent.form.stepDelay": "步骤延迟 (ms)",
"Claw.GUIAgent.form.jpegQuality": "截图质量",
"Claw.GUIAgent.description": "GUI Agent 通过截图分析 + 键鼠模拟自动执行桌面任务",
"Claw.Dependencies.uvConfirmed": "uv 已确认({context}{version}",
"Claw.Dependencies.dependencyList": "依赖清单",
"Claw.Dependencies.showOnlyProblems": "仅显示问题",
"Claw.Dependencies.showAll": "展开全部",
"Claw.Dependencies.noProblemItems": "暂无问题项",
"Claw.Dependencies.install": "安装",
"Claw.Dependencies.checkFailed": "检测依赖失败",
"Claw.Dependencies.installPkgFailed": "{0} 安装失败",
"Claw.Dependencies.installFailed": "安装失败",
"Claw.Dependencies.installAndUpgrade": "安装并升级",
"Claw.Dependencies.retryInstallAndUpgrade": "重试安装并升级",
"Claw.Dependencies.retryInstall": "重试安装",
"Claw.Dependencies.checkingEnv": "正在检测依赖环境...",
"Claw.Dependencies.installingDep": "正在{verb} {pkg}...",
"Claw.Dependencies.installingAllDep": "正在{verb}依赖...",
"Claw.Dependencies.enteringNextStep": "正在进入下一步...",
"Claw.Dependencies.upgradeFailed": "升级失败",
"Claw.Dependencies.pleaseInstallSystemDeps": "请安装所需系统依赖,然后点击「重新检测」",
"Claw.Dependencies.recheck": "重新检测",
"Claw.Sessions.loginFirst": "登录信息不完整,请先登录",
"Claw.Sessions.getSessionUrlFailed": "获取会话地址失败",
"Claw.Sessions.sessionStopped": "会话已停止",
"Claw.Sessions.stopSessionFailed": "停止会话失败",
"Claw.Sessions.statusActive": "活跃",
"Claw.Sessions.statusPending": "等待中",
"Claw.Sessions.statusTerminating": "终止中",
"Claw.Sessions.statusIdle": "空闲",
"Claw.Sessions.engine01": "Agent 引擎01",
"Claw.Sessions.engine02": "Agent 引擎02",
"Claw.Sessions.title": "会话",
"Claw.Sessions.refresh": "刷新",
"Claw.Sessions.newSession": "新建会话",
"Claw.Sessions.noActiveSessions": "暂无活跃会话",
"Claw.Sessions.lastActivity": "最后活动",
"Claw.Sessions.open": "打开",
"Claw.Sessions.stop": "停止",
"Claw.Agent.loadConfigFailed": "加载配置失败",
"Claw.Agent.checkStatusFailed": "检查状态失败",
"Claw.Agent.configSaved": "配置已保存",
"Claw.Agent.stopped": "Agent 已停止",
"Claw.Agent.started": "Agent 启动成功",
"Claw.Agent.startFailedWithReason": "启动失败:{reason}",
"Claw.Agent.operationError": "错误:{message}",
"Claw.Agent.engineSettings": "Agent 引擎设置",
"Claw.Agent.running": "运行中",
"Claw.Agent.stoppedStatus": "已停止",
"Claw.Agent.start": "启动",
"Claw.Agent.stop": "停止",
"Claw.Agent.engineType": "引擎类型",
"Claw.Agent.type": "类型",
"Claw.Agent.claudeCodeAcpDesc": "Anthropic 官方 ACP 协议",
"Claw.Agent.qimingcodeDesc": "基于 OpenCode 开发",
"Claw.Agent.portConfig": "端口配置",
"Claw.Agent.backendPort": "后端端口(直接连接)",
"Claw.Agent.backendPortHint": "直接连接 Agent 服务,无需代理",
"Claw.Agent.apiConfig": "API 配置",
"Claw.Agent.executablePath": "可执行文件路径",
"Claw.Agent.apiKey": "API 密钥",
"Claw.Agent.apiBaseUrl": "API 基础 URL",
"Claw.Agent.model": "模型",
"Claw.Agent.saveConfig": "保存配置",
"Claw.About.checking": "检查中...",
"Claw.About.alreadyLatest": "当前已是最新版本",
"Claw.About.checkFailed": "检查更新失败",
"Claw.About.checkFailedWithDetail": "检查更新失败: {error}",
"Claw.About.channelSwitching": "切换到预发测试版通道",
"Claw.About.betaWarning": "预发测试版包含尚未全面验证的更新,可能存在不稳定或功能缺陷。",
"Claw.About.confirmSwitch": "是否确认切换?",
"Claw.About.confirmSwitchBtn": "确认切换",
"Claw.About.switchedToBeta": "已切换到预发测试版通道,正在检查更新...",
"Claw.About.switchedToStable": "已切换到稳定正式版通道,正在检查更新...",
"Claw.About.channelSwitchFailed": "更新通道切换失败,请稍后重试",
"Claw.About.updateDownloaded": "更新已下载完成",
"Claw.About.updateDownloadedConfirm": "v{version} 已下载完成,是否立即重启安装?",
"Claw.About.restartNow": "立即重启",
"Claw.About.later": "稍后安装",
"Claw.About.installFailed": "安装更新失败",
"Claw.About.downloadFailed": "下载失败",
"Claw.About.getDebugInfoFailed": "获取调试信息失败",
"Claw.About.versionFound": "发现新版本: v{version}",
"Claw.About.goToDownloadPage": "前往下载页",
"Claw.About.downloadUpdate": "下载更新",
"Claw.About.downloading": "正在下载 v{version}... {percent}%",
"Claw.About.versionDownloaded": "v{version} 已下载完成",
"Claw.About.installUpdate": "立即重启安装",
"Claw.About.readOnlyVolumeError": "当前应用在只读位置运行(如从「下载」直接打开),无法就地更新。请将应用移到「应用程序」文件夹后重试,或通过下方按钮前往下载页手动下载新版本。",
"Claw.About.updateError": "更新出错",
"Claw.About.checkUpdate": "检查更新",
"Claw.About.crossPlatformDescription": "跨平台 AI 智能体桌面客户端",
"Claw.About.website": "官网",
"Claw.About.betaChannel": "Beta 升级通道",
"Claw.About.betaDisclaimer": "开启后将切换到预发测试版通道,可能包含未验证改动。",
"Claw.About.showDebugInfo": "显示调试信息",
"Claw.About.hideDebugInfo": "隐藏调试信息",
"Claw.About.debugInfoTitle": "升级检测调试信息",
"Claw.About.platform": "平台",
"Claw.About.arch": "架构",
"Claw.About.packaged": "打包状态",
"Claw.About.devMode": "否 (开发模式)",
"Claw.About.appVersion": "应用版本",
"Claw.About.appName": "应用名称",
"Claw.About.installerType": "安装类型",
"Claw.About.upgradeSupported": "✅ 支持应用内升级",
"Claw.About.manualDownload": "⚠️ 需手动下载",
"Claw.About.canAutoUpdate": "可自动更新",
"Claw.About.appDir": "应用目录",
"Claw.About.exePath": "可执行文件",
"Claw.About.uninstaller": "卸载程序",
"Claw.About.totalAppFiles": "目录文件数",
"Claw.About.switchOn": "开",
"Claw.About.switchOff": "关",
"Claw.Common.yes": "是",
"Claw.Common.no": "否",
"Claw.Settings.tabs.basic": "基础设置",
"Claw.Settings.tabs.system": "系统设置",
"Claw.Settings.tabs.mcp": "MCP 管理",
"Claw.Settings.tabs.experimental": "实验功能",
"Claw.Settings.tabs.devtools": "开发工具",
"Claw.Settings.saveConfig.title": "服务配置",
"Claw.Settings.saveConfig.edit": "编辑",
"Claw.Settings.saveConfig.cancel": "取消",
"Claw.Settings.saveConfig.save": "保存",
"Claw.Settings.saveConfig.fileServerPort": "文件服务端口",
"Claw.Settings.saveConfig.agentPort": "Agent 端口",
"Claw.Settings.saveConfig.guiMcpPort": "GUI MCP 端口",
"Claw.Settings.saveConfig.guiMcpEnabled": "启用 GUI MCP",
"Claw.Settings.saveConfig.adminServerPort": "管理服务端口",
"Claw.Settings.saveConfig.adminServerPortExtra": "默认 60007用于重启服务等管理接口",
"Claw.Settings.saveConfig.enterPort": "请输入端口",
"Claw.Settings.saveConfig.restartHint": "修改配置后需要重启服务才能生效",
"Claw.Settings.workspace.title": "工作区目录",
"Claw.Settings.workspace.selectDir": "请选择工作区目录",
"Claw.Settings.workspace.clickToSelect": "点击选择目录",
"Claw.Settings.workspace.select": "选择",
"Claw.Settings.experimental.title": "实验功能",
"Claw.Settings.experimental.mutualExclusionHint": "Sandbox 与 GUI MCP 为互斥实验能力:开启其中一个会自动关闭另一个。",
"Claw.Settings.sandbox.title": "沙箱",
"Claw.Settings.sandbox.enable": "启用沙箱",
"Claw.Settings.sandbox.enableDesc": "关闭后命令将直接在工作区执行",
"Claw.Settings.sandbox.mode": "沙箱运行模式",
"Claw.Settings.sandbox.modeDesc": "Strict: 严格最小权限 · Compat: 兼容优先(默认) · Permissive: 宽松(仅排障)",
"Claw.Settings.sandbox.modeRestartHint": "切换后重启当前 Agent 会话或新开会话生效",
"Claw.Settings.sandbox.modeStrict": "Strict严格最小权限",
"Claw.Settings.sandbox.modeCompat": "Compat兼容优先",
"Claw.Settings.sandbox.modePermissive": "Permissive宽松排障",
"Claw.Settings.sandbox.statusDegraded": "沙箱隔离未生效(已按策略降级)",
"Claw.Settings.sandbox.statusAvailable": "沙箱隔离可用",
"Claw.Settings.sandbox.statusUnavailable": "沙箱隔离不可用",
"Claw.Settings.sandbox.statusNotLoaded": "未加载",
"Claw.Settings.guiMcp.title": "GUI MCP",
"Claw.Settings.guiMcp.enable": "启用 GUI MCP",
"Claw.Settings.guiMcp.enableDesc": "桌面自动化视觉操作服务",
"Claw.Settings.guiMcp.statusEnabled": "已启用",
"Claw.Settings.guiMcp.statusDisabled": "已禁用",
"Claw.Settings.system.title": "系统",
"Claw.Settings.system.autoLaunch": "开机自启动",
"Claw.Settings.system.autoLaunchDesc": "系统启动时自动运行 {appName}",
"Claw.Settings.system.theme": "主题",
"Claw.Settings.system.themeDesc": "选择界面配色方案",
"Claw.Settings.system.themeSystem": "跟随系统",
"Claw.Settings.system.themeLight": "亮色",
"Claw.Settings.system.themeDark": "暗色",
"Claw.Settings.system.appDataDir": "应用数据目录",
"Claw.Settings.system.logDir": "日志目录",
"Claw.Settings.system.loading": "加载中...",
"Claw.Settings.system.workspaceDir": "工作空间目录",
"Claw.Settings.system.notSet": "未设置",
"Claw.Settings.system.open": "打开",
"Claw.Settings.system.language": "语言",
"Claw.Settings.system.languageDesc": "选择界面显示语言",
"Claw.Settings.system.langEnglish": "English",
"Claw.Settings.system.langChinese": "简体中文",
"Claw.Settings.system.langChineseTW": "繁體中文(台灣)",
"Claw.Settings.system.langChineseHK": "繁體中文(香港)",
"Claw.Settings.messages.languageChanged": "语言切换成功,正在刷新...",
"Claw.Settings.messages.languageChangeFailed": "语言切换失败",
"Claw.Settings.languageConfirm.title": "切换语言",
"Claw.Settings.languageConfirm.content": "切换语言将重启应用并中断正在运行的服务,是否继续?",
"Claw.Settings.languageConfirm.ok": "切换",
"Claw.Settings.languageConfirm.cancel": "取消",
"Claw.Settings.dialog.selectWorkspace": "选择工作区目录",
"Claw.Settings.messages.saveConfig": "保存配置",
"Claw.Settings.messages.saveConfigConfirm": "保存后需要重启服务才能生效,确定保存吗?",
"Claw.Settings.messages.autoLaunchEnabled": "已开启开机自启动",
"Claw.Settings.messages.autoLaunchDisabled": "已关闭开机自启动",
"Claw.Settings.messages.workspaceNotConfigured": "未配置工作空间目录",
"Claw.Settings.messages.openWorkspaceFailed": "打开工作空间目录失败",
"Claw.Settings.messages.sandboxPolicyUpdated": "沙箱策略已更新",
"Claw.Settings.messages.updateSandboxPolicyFailed": "更新沙箱策略失败",
"Claw.Settings.messages.sandboxLinuxNotAvailableYet": "Linux 平台 Sandbox 暂未开放",
"Claw.Settings.guiMcp.messages.enableSuccess": "GUI MCP 已启用",
"Claw.Settings.guiMcp.messages.disableSuccess": "GUI MCP 已禁用",
"Claw.Settings.guiMcp.messages.updateFailed": "更新 GUI MCP 设置失败",
"Claw.Settings.messages.settingFailed": "设置失败",
"Claw.MCP.title": "MCP Proxy 服务管理",
"Claw.MCP.status.ready": "就绪",
"Claw.MCP.status.notReady": "未就绪",
"Claw.MCP.status.serverCount": "个 Server",
"Claw.MCP.checkAvailability": "检测可用性",
"Claw.MCP.serverManagement.title": "MCP Servers 配置",
"Claw.MCP.serverManagement.noServers": "暂无 MCP Server 配置",
"Claw.MCP.serverManagement.confirmRemove": "确定移除?",
"Claw.MCP.transport.sse": "SSE",
"Claw.MCP.transport.http": "HTTP",
"Claw.MCP.transport.stdio": "stdio",
"Claw.MCP.transport.auto": "自动检测",
"Claw.MCP.transport.streamableHttp": "Streamable HTTP",
"Claw.MCP.addServer.url": "URL",
"Claw.MCP.addServer.argsPlaceholder": "参数",
"Claw.MCP.addServer.idPlaceholder": "Server ID如 my-mcp-server",
"Claw.MCP.addServer.stdio": "命令行 (stdio)",
"Claw.MCP.addServer.remote": "远程 URL (HTTP/SSE)",
"Claw.MCP.addServer.commandPlaceholder": "命令",
"Claw.MCP.addServer.argsPlaceholderFull": "参数(如 -y chrome-devtools-mcp@latest",
"Claw.MCP.addServer.urlPlaceholder": "URL如 https://example.com/mcp",
"Claw.MCP.addServer.authTokenPlaceholder": "AuthToken可选",
"Claw.MCP.addServer.button": "添加 MCP Server",
"Claw.MCP.addServer.idRequired": "请输入 Server ID",
"Claw.MCP.addServer.argsRequired": "请输入参数",
"Claw.MCP.message.serverAdded": "已添加,记得保存配置",
"Claw.MCP.message.serverRemoved": "已移除,记得保存配置",
"Claw.MCP.toolFilter.title": "工具过滤",
"Claw.MCP.toolFilter.none": "不过滤",
"Claw.MCP.toolFilter.allowList": "白名单",
"Claw.MCP.toolFilter.denyList": "黑名单",
"Claw.MCP.toolFilter.allowPlaceholder": "输入允许的工具名,逗号分隔(如 generate_bar_chart, generate_column_chart",
"Claw.MCP.toolFilter.denyPlaceholder": "输入排除的工具名,逗号分隔(如 screenshot, navigate",
"Claw.MCP.toolFilter.hintNone": "加载所有 MCP Server 提供的工具",
"Claw.MCP.toolFilter.hintAllow": "仅加载白名单中的工具,其他全部排除",
"Claw.MCP.toolFilter.hintDeny": "排除黑名单中的工具,其他全部加载",
"Claw.MCP.saveConfig": "保存配置",
"Claw.MCP.saveConfigHint": "配置修改后需保存Agent 下次初始化时自动生效",
"Claw.MCP.message.configSaved": "MCP 配置已保存",
"Claw.MCP.message.proxyReady": "MCP Proxy 就绪",
"Claw.MCP.message.checkFailed": "检测失败: {0}",
"Claw.MCP.message.error": "错误: {0}",
"Claw.Common.saveFailed": "保存失败",
"Claw.Client.startSession": "开始会话",
"Claw.Client.login": "登录",
"Claw.Client.logout": "退出",
"Claw.Client.cancel": "取消",
"Claw.Client.defaultUser": "用户",
"Claw.Client.loginHint": "支持用户名、邮箱、手机号",
"Claw.Client.starting": "启动中",
"Claw.Client.stopping": "停止中",
"Claw.Client.running": "运行中",
"Claw.Client.stopped": "已停止",
"Claw.Client.stop": "停止",
"Claw.Client.start": "启动",
"Claw.Client.goInstall": "前往安装",
"Claw.Client.settings": "设置",
"Claw.Client.dependencies": "依赖",
"Claw.Client.about": "关于",
"Claw.Client.accountStatus": "账号状态",
"Claw.Client.services": "服务",
"Claw.Client.refresh": "刷新",
"Claw.Client.startAll": "启动全部",
"Claw.Client.stopAll": "停止全部",
"Claw.Client.quickActions": "快捷操作",
"Claw.Client.serviceStartFailed": "{0} 启动失败: {1}",
"Claw.Client.stopFailed": "停止失败: {0}",
"Claw.Process.exitImmediately": "进程启动后立即退出",
"Claw.Sandbox.workspaceNotFound": "工作区未找到: {0}",
"Claw.Lanproxy.missingServerConfig": "缺少服务器配置",
"Claw.Permissions.command": "命令",
"Claw.Permissions.envVars": "环境变量",
"Claw.Permissions.file": "文件",
"Claw.Permissions.tool": "工具",
"Claw.Permissions.second": "秒",
"Claw.Permissions.deny": "拒绝",
"Claw.Permissions.allowOnce": "本次允许",
"Claw.Permissions.allowAlways": "始终允许",
"Claw.Permissions.url": "URL",
"Claw.PermissionRules.defaultToolRead": "读取文件",
"Claw.PermissionRules.defaultToolEdit": "编辑文件",
"Claw.PermissionRules.defaultBash": "Bash 命令",
"Claw.PermissionRules.defaultNetwork": "网络请求",
"Claw.PermissionRules.defaultFileRead": "文件读取",
"Claw.PermissionRules.defaultFileWrite": "文件写入",
"Claw.PermissionsPage.granted": "已授权",
"Claw.PermissionsPage.denied": "未授权",
"Claw.PermissionsPage.unknown": "未知",
"Claw.PermissionsPage.title": "系统授权",
"Claw.PermissionsPage.description": "以下权限可能影响应用的正常运行,请根据需要授权",
"Claw.PermissionsPage.refresh": "刷新",
"Claw.PermissionsPage.openSettings": "前往设置",
"Claw.PermissionsPage.allGranted": "所有权限已授权",
"Claw.PermissionsPage.cannotOpenSettings": "无法打开系统设置",
"Claw.PermissionsPage.macosAccessibility": "辅助功能",
"Claw.PermissionsPage.macosAccessibilityDesc": "允许应用控制您的电脑",
"Claw.PermissionsPage.macosScreenRecording": "屏幕录制",
"Claw.PermissionsPage.macosScreenRecordingDesc": "允许应用录制屏幕内容",
"Claw.PermissionsPage.macosFullDiskAccess": "全磁盘访问",
"Claw.PermissionsPage.macosFullDiskAccessDesc": "允许应用访问所有文件",
"Claw.Sandbox.unavailable": "沙箱环境不可用,请检查沙箱配置",
"Claw.Sandbox.unavailableWithType": "沙箱不可用: {0}",
"Claw.Sandbox.dockerUnavailable": "Docker 不可用,请确保 Docker Desktop 已安装并运行",
"Claw.Sandbox.helperUnavailable": "沙箱 Helper 不可用,请确认 qiming-sandbox-helper 已正确安装",
"Claw.Sandbox.workspaceExists": "工作区已存在: {0}",
"Claw.Sandbox.workspaceCreateFailed": "工作区创建失败,请检查磁盘空间和权限",
"Claw.Sandbox.workspaceDestroyFailed": "工作区销毁失败,请手动清理",
"Claw.Sandbox.workspaceInvalidState": "工作区状态无效,请重试或重新创建工作区",
"Claw.Sandbox.executionFailed": "命令执行失败",
"Claw.Sandbox.executionTimeout": "命令执行超时",
"Claw.Sandbox.executionBlocked": "命令被安全策略拦截",
"Claw.Sandbox.commandNotFound": "命令未找到",
"Claw.Sandbox.fileNotFound": "文件未找到",
"Claw.Sandbox.fileWriteFailed": "文件写入失败",
"Claw.Sandbox.fileReadFailed": "文件读取失败",
"Claw.Sandbox.fileDeleteFailed": "文件删除失败",
"Claw.Sandbox.directoryOperationFailed": "目录操作失败",
"Claw.Sandbox.cleanupFailed": "清理失败",
"Claw.Sandbox.cleanupTimeout": "清理超时",
"Claw.Sandbox.configInvalid": "配置无效",
"Claw.Sandbox.configMissing": "配置缺失",
"Claw.Sandbox.containerOperationFailed": "容器操作失败",
"Claw.Sandbox.containerStartFailed": "容器启动失败",
"Claw.Sandbox.containerStopFailed": "容器停止失败",
"Claw.Sandbox.resourceInsufficient": "资源不足",
"Claw.Sandbox.outOfMemory": "内存不足",
"Claw.Sandbox.outOfDiskSpace": "磁盘空间不足",
"Claw.Sandbox.unknownError": "未知错误",
"Claw.Sandbox.helperReady": "Windows Sandbox helper 就绪",
"Claw.GUIAgent.entryNotFound": "agent-gui-server 入口文件未找到,请先运行 npm run prepare:gui-server",
"Claw.GUIAgent.nodeNotFound": "Node.js 未找到GUI Agent Server 无法启动",
"Claw.GUIAgent.missingApiKey": "未找到 API KeyGUI Agent Server 可能无法正常工作",
"Claw.MCP.notInstalled": "qiming-mcp-stdio-proxy 未安装,请先在依赖管理中安装或确保已 npm install",
"Claw.MCP.entryNotFound": "qiming-mcp-stdio-proxy 入口文件未找到",
"Claw.MCP.discoverTools": "发现工具",
"Claw.MCP.discoveredTools": "已发现的工具",
"Claw.MCP.tools": "工具",
"Claw.MCP.message.toolsDiscovered": "发现 {0} 个工具",
"Claw.MCP.message.discoveryFailed": "工具发现失败: {0}",
"Claw.MCP.message.discoveryError": "工具发现错误: {0}",
"Claw.MCP.batch.operations": "批量操作",
"Claw.MCP.batch.enableAll": "启用全部",
"Claw.MCP.batch.disableAll": "禁用全部",
"Claw.MCP.batch.discoverAll": "发现全部工具",
"Claw.MCP.batch.discovering": "正在批量发现工具...",
"Claw.MCP.batch.enableAllSuccess": "已启用全部服务器",
"Claw.MCP.batch.disableAllSuccess": "已禁用全部服务器",
"Claw.MCP.batch.discoverAllSuccess": "批量发现完成: {0}/{1} 成功",
"Claw.MCP.importExport.export": "导出配置",
"Claw.MCP.importExport.import": "导入配置",
"Claw.MCP.importExport.exportSuccess": "配置已导出到: {0}",
"Claw.MCP.importExport.exportFailed": "导出失败: {0}",
"Claw.MCP.importExport.exportError": "导出错误: {0}",
"Claw.MCP.importExport.exportWarningTitle": "导出配置确认",
"Claw.MCP.importExport.exportWarningContent": "配置文件可能包含敏感信息(如 API tokens、密码等请妥善保管导出的文件避免泄露。",
"Claw.MCP.importExport.importConfirm": "导入 MCP 配置",
"Claw.MCP.importExport.importStrategy": "选择导入策略",
"Claw.MCP.importExport.replace": "替换",
"Claw.MCP.importExport.merge": "合并",
"Claw.MCP.importExport.invalidFormat": "配置文件格式无效",
"Claw.MCP.importExport.importSuccess": "成功导入 {0} 个服务器",
"Claw.MCP.importExport.importError": "导入错误: {0}",
"Claw.MCP.template.selectTitle": "选择 MCP 模板",
"Claw.MCP.template.category.all": "全部",
"Claw.MCP.template.category.file": "文件",
"Claw.MCP.template.category.network": "网络",
"Claw.MCP.template.category.data": "数据",
"Claw.MCP.template.category.ai": "AI",
"Claw.MCP.template.category.dev": "开发",
"Claw.MCP.template.noTemplates": "暂无模板",
"Claw.MCP.template.fillParams": "填写参数",
"Claw.MCP.template.paramRequired": "请填写 {0}",
"Claw.MCP.template.addSuccess": "已添加 {0}",
"Claw.MCP.template.apply": "应用模板",
"Claw.MCP.template.params": "模板参数",
"Claw.MCP.Tools.toolCount": "工具",
"Claw.MCP.Tools.discoverTools": "发现工具",
"Claw.MCP.Tools.discoveredTools": "已发现的工具",
"Claw.MCP.addServer.fromTemplate": "从模板添加",
"Claw.MCP.addServer.custom": "自定义添加",
"Claw.MCP.editor.title": "JSON 配置编辑器",
"Claw.MCP.editor.description": "直接编辑 MCP 配置的 JSON 格式,支持 stdio 和远程服务器类型。",
"Claw.MCP.editor.config": "配置内容",
"Claw.MCP.editor.placeholder": "请输入 JSON 格式的 MCP 配置...",
"Claw.MCP.editor.parseError": "JSON 解析错误",
"Claw.MCP.editor.format": "格式化",
"Claw.MCP.editor.exampleTitle": "配置示例",
"Claw.MCP.editor.previewTitle": "JSON 语法高亮预览",
"Claw.MCP.view.list": "列表模式",
"Claw.MCP.view.json": "JSON 模式",
"Claw.MCP.list.title": "MCP 服务列表(手动启用后才生效)",
"Claw.MCP.list.enabledSummary": "已启用 {0} / {1}",
"Claw.MCP.list.disableAll": "全部停用",
"Claw.MCP.list.disableAllSuccess": "已将所有 MCP 服务设为停用",
"Claw.MCP.list.addServer": "新增服务",
"Claw.MCP.list.edit": "编辑",
"Claw.MCP.list.test": "测试",
"Claw.MCP.list.testSuccess": "测试通过:发现 {0} 个工具",
"Claw.MCP.list.testFailed": "测试失败:{0}",
"Claw.MCP.list.testing": "测试中...",
"Claw.MCP.editor.createTitle": "新增 MCP 服务",
"Claw.MCP.editor.editTitle": "编辑 MCP 服务",
"Claw.MCP.editor.back": "返回",
"Claw.MCP.editor.tabForm": "表单",
"Claw.MCP.editor.tabJson": "JSON",
"Claw.MCP.editor.jsonHint": "粘贴单条服务配置 {\"server-name\": {...}} 或完整的 mcpServers 配置",
"Claw.MCP.switch.enable": "启用",
"Claw.MCP.switch.disable": "停用",
"Claw.MCP.addServer.modalTitle": "新增 MCP 服务",
"Claw.MCP.addServer.type": "服务类型",
"Claw.MCP.addServer.serverId": "服务 ID",
"Claw.MCP.addServer.add": "添加",
"Claw.MCP.addServer.idDuplicate": "服务 ID 已存在,请使用其他名称",
"Claw.MCP.addServer.commandRequired": "stdio 模式需要填写 command",
"Claw.MCP.addServer.urlRequired": "remote 模式需要填写 URL",
"Claw.MCP.addServer.argsInvalid": "Args 格式无效。请使用 JSON 数组(如 [\"-y\",\"pkg\"])或带引号的 shell 参数。",
"Claw.MCP.addServer.addSuccess": "服务已添加(默认停用,请手动启用)",
"Claw.MCP.addServer.argsPlaceholderAdvanced": "建议使用 JSON 数组,例如 [\"-y\",\"@modelcontextprotocol/server-filesystem\",\"/path with space\"]",
"Claw.MCP.message.invalidJson": "JSON 格式无效,请检查后重试",
"Claw.MCP.message.formatted": "格式化成功",
"Claw.MCP.message.formatFailed": "格式化失败",
"Claw.MCP.status.running": "运行中",
"Claw.MCP.status.stopped": "已停止",
"Claw.MCP.action.start": "启动",
"Claw.MCP.action.restart": "重启",
"Claw.LogViewer.title": "应用日志",
"Claw.LogViewer.autoScroll": "自动滚动",
"Claw.LogViewer.all": "全部",
"Claw.LogViewer.refresh": "刷新",
"Claw.LogViewer.openDir": "打开目录",
"Claw.LogViewer.noLogs": "暂无日志",
"Claw.LogViewer.scrollToLoadMore": "向上滚动加载更早日志",
"Claw.LogViewer.totalLogs": "共 {0} 条日志",
"Claw.LogViewer.autoScrollEnabled": "自动滚动已开启"
}

View File

@@ -0,0 +1,882 @@
{
"Claw.Common.loading": "載入中...",
"Claw.Common.save": "儲存",
"Claw.Common.cancel": "取消",
"Claw.Common.confirm": "確認",
"Claw.Common.delete": "刪除",
"Claw.Common.edit": "編輯",
"Claw.Common.add": "新增",
"Claw.Common.open": "開啟",
"Claw.Common.close": "關閉",
"Claw.Common.retry": "重試",
"Claw.Common.noData": "暫無資料",
"Claw.Common.back": "返回",
"Claw.Common.refresh": "重新整理",
"Claw.Toast.Success.configSaved": "配置已儲存",
"Claw.Toast.Success.aiConfigSaved": "AI 配置已儲存",
"Claw.Toast.Success.agentStarted": "Agent 已啟動",
"Claw.Toast.Success.agentStopped": "Agent 已停止",
"Claw.Toast.Success.mcpStarted": "MCP 服務已啟動",
"Claw.Toast.Success.mcpStopped": "MCP 服務已停止",
"Claw.Toast.Success.mcpRestarted": "MCP 服務已重啟",
"Claw.Toast.Success.mcpConfigSaved": "MCP 配置已儲存",
"Claw.Toast.Success.servicesStarted": "服務已啟動",
"Claw.Toast.Success.servicesStopped": "服務已停止",
"Claw.Toast.Success.loginSuccess": "登入成功",
"Claw.Toast.Success.logoutSuccess": "已退出登入",
"Claw.Toast.Success.setupSaved": "設定已儲存",
"Claw.Toast.Success.dependenciesInstalled": "依賴安裝完成",
"Claw.Toast.Error.configSaveFailed": "配置儲存失敗",
"Claw.Toast.Error.aiConfigSaveFailed": "AI 配置儲存失敗",
"Claw.Toast.Error.startFailed": "啟動失敗",
"Claw.Toast.Error.stopFailed": "停止失敗",
"Claw.Toast.Error.restartFailed": "重啟失敗",
"Claw.Toast.Error.saveFailed": "儲存失敗",
"Claw.Toast.Error.loginFailed": "登入失敗",
"Claw.Toast.Error.logoutFailed": "退出登入失敗",
"Claw.Toast.Error.loadFailed": "載入失敗",
"Claw.Toast.Error.dependenciesInstallFailed": "依賴安裝失敗",
"Claw.Toast.Error.setupLoadFailed": "設定載入失敗",
"Claw.Toast.Error.openSettingsFailed": "打開設定失敗",
"Claw.Toast.Error.openLogsFailed": "打開日誌失敗",
"Claw.Toast.Error.openBrowserFailed": "打開瀏覽器失敗",
"Claw.Toast.Error.invalidSessionUrl": "無效的會話地址",
"Claw.Toast.Warning.incompleteLoginInfo": "登入資訊不完整",
"Claw.Toast.Warning.missingDependencies": "存在缺失依賴,請先安裝",
"Claw.Toast.Warning.serverDomainRequired": "請輸入服務域名",
"Claw.Toast.Warning.agentPortRequired": "請輸入 Agent 連接埠",
"Claw.Toast.Warning.fileServerPortRequired": "請輸入檔案服務連接埠",
"Claw.Toast.Warning.proxyPortRequired": "請輸入代理連接埠",
"Claw.Toast.Warning.workspaceDirRequired": "請選擇工作區目錄",
"Claw.Toast.Warning.usernameAndOtpRequired": "請輸入帳戶和動態認證碼",
"Claw.Toast.Warning.serverIdRequired": "請輸入 Server ID",
"Claw.Toast.Warning.argsRequired": "請輸入參數",
"Claw.Toast.Warning.loginFirst": "請先登入",
"Claw.Toast.Info.allServicesRunning": "所有服務已在運行",
"Claw.Toast.Info.noRunningServices": "目前沒有運行中的服務",
"Claw.Toast.Info.noDependenciesToInstall": "沒有需要安裝的依賴",
"Claw.Toast.Info.serverAddedRememberSave": "已新增服務,記得儲存配置",
"Claw.Toast.Info.serverRemovedRememberSave": "已移除服務,記得儲存配置",
"Claw.Toast.Info.loginFirstSilent": "請先登入",
"Claw.Toast.Info.alreadyLatestVersion": "目前已是最新版本",
"Claw.Errors.mcpReconnectRetryLater": "MCP 連線波動,正在自動重連,請稍後重試",
"Claw.WindowsMcp.portInUseHint": "常見原因:連接埠 {port} 已被佔用。請稍後重試、在設定中變更 GUI MCP 連接埠,或於工作管理員結束相關程序。",
"Claw.Pages.Dependencies.systemEnv": "系統環境",
"Claw.Pages.Dependencies.dependencyPackages": "依賴套件",
"Claw.Pages.Dependencies.checking": "檢測中...",
"Claw.Pages.Dependencies.notInstalled": "未安裝",
"Claw.Pages.Dependencies.integrated": "應用整合",
"Claw.Pages.Dependencies.notIntegrated": "未整合",
"Claw.Pages.Dependencies.required": "必要",
"Claw.Pages.Dependencies.upgrading": "升級中...",
"Claw.Pages.Dependencies.updating": "更新中...",
"Claw.Pages.Dependencies.installing": "安裝中...",
"Claw.Pages.Dependencies.install": "安裝",
"Claw.Pages.Dependencies.update": "更新",
"Claw.Pages.Dependencies.upgrade": "升級",
"Claw.Pages.Dependencies.installAll": "全部安裝",
"Claw.Pages.Dependencies.upgradeAll": "全部升級",
"Claw.Pages.Dependencies.updateTo": "更新至 {0}",
"Claw.Pages.Dependencies.noDependencies": "暫無依賴套件",
"Claw.Pages.Dependencies.installedCount": "{0}/{1} 已安裝",
"Claw.Pages.Dependencies.dep.uv": "uv",
"Claw.Pages.Dependencies.dep.pnpm": "pnpm 套件管理器",
"Claw.Pages.Dependencies.dep.anthropicSdk": "Anthropic SDK",
"Claw.Pages.Dependencies.dep.claudeCodeAcp": "ACP 協議",
"Claw.Pages.Dependencies.dep.fileServer": "檔案服務",
"Claw.Pages.Dependencies.dep.mcpProxy": "MCP 代理",
"Claw.Pages.Dependencies.dep.qimingcode": "qimingcode",
"Claw.Pages.Dependencies.desc.uv": "高效能 Python 套件管理器(已整合)",
"Claw.Pages.Dependencies.desc.pnpm": "高效能 Node.js 套件管理器(應用內安裝)",
"Claw.Pages.Dependencies.desc.anthropicSdk": "Claude API 用戶端",
"Claw.Pages.Dependencies.desc.claudeCodeAcp": "ACP 通訊協定實作",
"Claw.Pages.Dependencies.desc.fileServer": "本地檔案 HTTP 服務",
"Claw.Pages.Dependencies.desc.mcpProxy": "MCP 通訊協定聚合代理",
"Claw.Pages.Dependencies.desc.qimingcode": "Agent 執行引擎(應用內整合)",
"Claw.Pages.Dependencies.reqNodeVersion": "需 >= {0}",
"Claw.Pages.Dependencies.reqUvVersion": "需 >= {0}",
"Claw.Pages.Dependencies.msgInstallSuccess": "{0} {1}成功",
"Claw.Pages.Dependencies.msgUpgradeSuccess": "{0} 升級成功",
"Claw.Pages.Dependencies.msgFailed": "{0} {1}失敗",
"Claw.Pages.Dependencies.msgInstallAllComplete": "依賴安裝並升級完成",
"Claw.Pages.Dependencies.msgUpgradeAllComplete": "依賴升級完成",
"Claw.Pages.Dependencies.msgInstallAllSuccess": "依賴安裝完成",
"Claw.Pages.Dependencies.msgLoadFailed": "載入依賴資料失敗",
"Claw.Pages.Dependencies.msgRestartingServices": "正在重新啟動服務…",
"Claw.Pages.Dependencies.msgRestartSuccess": "服務已重新啟動",
"Claw.Pages.Dependencies.msgRestartFailed": "重新啟動服務失敗",
"Claw.Pages.Dependencies.msgNoDependenciesToInstall": "沒有需要安裝或升級的依賴",
"Claw.Pages.Dependencies.msgInstallFailed": "安裝失敗: {0}",
"Claw.Pages.Dependencies.msgSystemEnvRequired": "請先滿足系統環境要求,再安裝依賴套件",
"Claw.Components.Dependency.checking": "檢查中",
"Claw.Components.Dependency.installed": "已安裝",
"Claw.Components.Dependency.missing": "缺失",
"Claw.Components.Dependency.outdated": "版本過低",
"Claw.Components.Dependency.installing": "安裝中",
"Claw.Components.Dependency.bundled": "應用整合",
"Claw.Components.Dependency.error": "錯誤",
"Claw.Components.Action.starting": "啟動中...",
"Claw.Components.Action.stopping": "停止中...",
"Claw.Components.Action.ready": "就緒",
"Claw.Components.Action.needConfig": "需配置",
"Claw.Components.Action.allReady": "所有依賴已就緒",
"Claw.Components.Action.allInstalled": "已就緒",
"Claw.Tray.showWindow": "顯示主視窗",
"Claw.Tray.restartServices": "重新啟動服務",
"Claw.Tray.stopServices": "停止服務",
"Claw.Tray.autoLaunch": "開機自動啟動",
"Claw.Tray.checkUpdate": "檢查更新",
"Claw.Tray.about": "關於 {0} v{1}",
"Claw.Tray.quit": "結束",
"Claw.Tray.Status.running": "執行中",
"Claw.Tray.Status.stopped": "已停止",
"Claw.Tray.Status.error": "錯誤",
"Claw.Tray.Status.starting": "啟動中",
"Claw.Dialog.error": "錯誤",
"Claw.Dialog.autoLaunchFailed": "設定開機自動啟動失敗",
"Claw.AutoUpdater.networkFailed": "網路請求失敗",
"Claw.AutoUpdater.newVersionFound": "發現新版本",
"Claw.AutoUpdater.downloadFailed": "下載失敗",
"Claw.AutoUpdater.updateDownloaded": "更新已下載",
"Claw.AutoUpdater.updateReady": "更新已就緒",
"Claw.AutoUpdater.checking": "檢查更新",
"Claw.AutoUpdater.alreadyLatest": "目前已是最後版本",
"Claw.AutoUpdater.unsupportedInstall": "目前安裝方式不支援自動更新,請前往官網下載頁下載最新安裝包。",
"Claw.AutoUpdater.downloadInstallNow": "是否立即下載並安裝更新?",
"Claw.AutoUpdater.downloadNow": "立即更新",
"Claw.AutoUpdater.later": "稍後再說",
"Claw.AutoUpdater.close": "關閉",
"Claw.AutoUpdater.downloadPage": "前往下載頁",
"Claw.AutoUpdater.installNow": "立即重新啟動",
"Claw.AutoUpdater.installOnExit": "結束時安裝",
"Claw.AutoUpdater.checkFailed": "檢查更新失敗",
"Claw.AutoUpdater.devModeUnsupported": "開發模式不支援下載更新,請使用打包版本測試",
"Claw.AutoUpdater.installDevUnsupported": "開發模式不支援安裝更新",
"Claw.AutoUpdater.getDownloadLinkFailed": "取得下載連結失敗",
"Claw.AutoUpdater.getDownloadLinkFailedDetail": "無法從伺服器取得下載連結\n\n錯誤: {0}\n\n請檢查網路連線後再試。",
"Claw.AutoUpdater.versionFound": "發現新版本 v{}",
"Claw.AutoUpdater.getUpdateInfoFailed": "無法取得{}通道更新資訊",
"Claw.AutoUpdater.invalidMetadataVersion": "更新元資料版本號不合法(僅支援 x.y.z{}",
"Claw.Agent.Status.idle": "就緒",
"Claw.Agent.Status.starting": "啟動中",
"Claw.Agent.Status.running": "執行中",
"Claw.Agent.Status.busy": "繁忙",
"Claw.Agent.Status.stopped": "已停止",
"Claw.Agent.Status.error": "錯誤",
"Claw.Menu.client": "客戶端",
"Claw.Menu.session": "工作階段",
"Claw.Menu.mcp": "MCP",
"Claw.Menu.settings": "設定",
"Claw.Menu.dependencies": "依賴",
"Claw.Menu.authorization": "授權",
"Claw.Menu.logs": "日誌",
"Claw.Menu.about": "關於",
"Claw.App.ConfigSyncFailed": "配置同步失敗",
"Claw.App.ConfigSyncFailedDetail": "無法連接到服務器獲取最新配置,服務未重啟。請檢查網絡後重試。",
"Claw.App.Retry": "重試",
"Claw.App.RestartingServices": "正在重啟服務…",
"Claw.App.RestartSuccess": "服務已重啟",
"Claw.App.RestartFailed": "重啟服務失敗",
"Claw.App.AutoReconnectFailed": "自動重連失敗",
"Claw.App.AutoReconnectFailedDetail": "無法連接到服務器。正在使用本地已保存的配置嘗試啟動服務;若需最新配置請檢查網絡後重新登錄。",
"Claw.App.ServicesRestarting": "服務正在重啟…",
"Claw.App.ServicesRestartSuccess": "服務重啟成功",
"Claw.App.Loading": "載入中...",
"Claw.App.User": "用戶",
"Claw.App.defaultUsername": "用戶",
"Claw.App.agentInterfaceFailed": "Agent 接口服務啟動失敗: {0}",
"Claw.App.agentInterfaceNotRunning": "Agent 接口服務未運行",
"Claw.App.channelCheckFailed": "通道檢查失敗: {0}",
"Claw.App.serviceRestartFailed": "服務重啟失敗: {0}",
"Claw.App.back": "返回",
"Claw.App.refresh": "重新整理",
"Claw.App.UpdateTag.newVersion": "新版本 v{version}",
"Claw.App.UpdateTag.download": "v{version} 更新",
"Claw.App.UpdateTag.downloading": "下載中 {percent}%",
"Claw.Service.file": "檔案服務",
"Claw.Service.fileDesc": "Agent 工作目錄檔遠程管理服務",
"Claw.Service.agent": "Agent 服務",
"Claw.Service.agentDesc": "Agent 核心服務",
"Claw.Service.mcp": "MCP 服務",
"Claw.Service.mcpDesc": "MCP 通訊協定聚合代理",
"Claw.Service.guiMcp": "GUI MCP 服務",
"Claw.Service.guiMcpDesc": "桌面自動化視覺操作服務",
"Claw.Service.proxy": "代理服務",
"Claw.Service.proxyDesc": "網絡通道",
"Claw.Service.admin": "管理服務",
"Claw.Service.adminDesc": "管理接口服務(重啟/健康檢查)",
"Claw.Client.domainRequired": "請輸入服務域名",
"Claw.Client.accountRequired": "請輸入帳戶",
"Claw.Client.codeRequired": "請填寫動態認證碼",
"Claw.Client.logoutConfirm": "確認退出登錄",
"Claw.Client.logoutConfirmDetail": "退出後將停止所有運行中的服務,需要重新登錄才能使用在線功能。",
"Claw.Client.logoutFailed": "退出登錄失敗",
"Claw.Client.getSessionUrlFailed": "無法獲取會話地址",
"Claw.Auth.loggingIn": "正在登入…",
"Claw.Auth.loggedOut": "已退出登入",
"Claw.Auth.syncingConfig": "正在同步設定…",
"Claw.Auth.configSyncedSuccess": "設定同步成功",
"Claw.Auth.error.userNotFound": "用戶不存在,請檢查輸入",
"Claw.Auth.error.wrongPassword": "密碼錯誤,請重新輸入",
"Claw.Auth.error.accountDisabled": "帳戶已被禁用,請聯繫管理員",
"Claw.Auth.error.clientNotFound": "客戶端不存在或已下架",
"Claw.Auth.error.clientDisabled": "客戶端已被禁用",
"Claw.Auth.error.configNotFound": "配置不存在,請重新登錄",
"Claw.Auth.error.loginExpired": "登錄已過期,請重新登錄",
"Claw.Auth.error.systemError": "系統錯誤,請稍後重試",
"Claw.Auth.error.forbidden": "沒有權限執行此操作",
"Claw.Auth.error.notFound": "請求的資源不存在",
"Claw.Auth.error.serverError": "伺服器錯誤,請稍後重試",
"Claw.Auth.error.loginFailed": "登錄失敗,請檢查網路連接",
"Claw.Api.success": "操作成功",
"Claw.Api.notLoggedIn": "用戶未登錄,請重新登錄",
"Claw.Api.loginExpired": "登錄已過期,請重新登錄",
"Claw.Api.clientNotFound": "客戶端不存在或已下架",
"Claw.Api.systemError": "系統錯誤,請稍後重試",
"Claw.Api.timeout": "請求超時(>{0}ms請檢查網路或伺服器狀態",
"Claw.Errors.loginFirstForClientKey": "請先登錄以獲取客戶端密鑰",
"Claw.Errors.loginRedirect": "登錄遇到問題,請檢查配置域名信息或服務狀態後重試",
"Claw.Log.csvHeader": "時間,級別,來源,訊息",
"Claw.Setup.wizardComplete": "向導完成!",
"Claw.Setup.resetComplete": "已重置,刷新頁面可重新進入向導",
"Claw.Client.loginFirst": "請先登錄以獲取代理服務配置",
"Claw.Client.startFailed": "啟動失敗",
"Claw.Client.loginFirstToStart": "請先登錄後再啟動服務",
"Claw.Client.missingDeps": "存在缺失依賴,請先安裝",
"Claw.Client.allServicesRunning": "所有可自動啟動的服務已在運行",
"Claw.Client.startAllServicesFirst": "請先啟動全部服務",
"Claw.Client.domainPlaceholder": "服務域名例如https://agent.qiming.com",
"Claw.Client.usernamePlaceholder": "用戶名 / 手機號 / 郵箱",
"Claw.Client.passwordPlaceholder": "請輸入密碼或動態認證碼(在瀏覽器打開你的域名登錄,然後在用戶資料中查看)",
"Claw.Client.missingDepsCannotStart": "缺少必需依賴,無法啟動服務",
"Claw.Client.qrCode": "掃碼使用",
"Claw.EmbeddedWebview.loadFailed": "載入失敗: {0} ({1})",
"Claw.EmbeddedWebview.back": "返回",
"Claw.EmbeddedWebview.refresh": "重新整理",
"Claw.EmbeddedWebview.unknownError": "未知錯誤",
"Claw.AgentRunner.configSaved": "配置已儲存",
"Claw.AgentRunner.stopped": "Agent Runner 已停止",
"Claw.AgentRunner.started": "Agent Runner 已啟動",
"Claw.AgentRunner.error": "錯誤: {0}",
"Claw.AgentRunner.running": "● 執行中",
"Claw.AgentRunner.stoppedStatus": "○ 已停止",
"Claw.AgentRunner.backendAddress": "後端地址",
"Claw.AgentRunner.proxyAddress": "代理地址",
"Claw.AgentRunner.stop": "停止",
"Claw.AgentRunner.start": "啟動",
"Claw.AgentRunner.config": "配置",
"Claw.AgentRunner.executablePath": "可執行檔案路徑",
"Claw.AgentRunner.backendPort": "後端連接埠",
"Claw.AgentRunner.proxyPort": "代理連接埠",
"Claw.AgentRunner.apiKey": "API 密鑰",
"Claw.AgentRunner.apiBaseUrl": "API 基礎 URL",
"Claw.AgentRunner.defaultModel": "預設模型",
"Claw.AgentRunner.saveConfig": "儲存配置",
"Claw.IMSettings.title": "即時通訊集成",
"Claw.IMSettings.platform.dingtalk": "釘釘",
"Claw.IMSettings.platform.feishu": "飛書",
"Claw.IMSettings.configSaved": "配置已儲存",
"Claw.IMSettings.connected": "{0} 已連接",
"Claw.IMSettings.error": "錯誤: {0}",
"Claw.IMSettings.disconnected": "已中斷連接",
"Claw.IMSettings.enable": "啟用 {0}",
"Claw.IMSettings.botConfig": "機器人配置",
"Claw.IMSettings.appConfig": "應用配置",
"Claw.IMSettings.allowedUsers": "允許的用戶 ID逗號分隔",
"Claw.IMSettings.options": "選項",
"Claw.IMSettings.autoReply": "自動回覆",
"Claw.IMSettings.disconnect": "中斷連接",
"Claw.IMSettings.connecting": "連接中...",
"Claw.IMSettings.connect": "連接",
"Claw.IMSettings.saveConfig": "儲存配置",
"Claw.SkillsSync.title": "技能同步(檔案服務)",
"Claw.SkillsSync.fileServiceConnection": "檔案服務連線",
"Claw.SkillsSync.serviceAddress": "服務地址",
"Claw.SkillsSync.connected": "已連線",
"Claw.SkillsSync.testConnection": "測試連線",
"Claw.SkillsSync.configSaved": "配置已儲存",
"Claw.SkillsSync.uploadSkillPackage": "上傳技能包ZIP",
"Claw.SkillsSync.uploadHint": "上傳包含 <code>skills/</code> 和/或 <code>agents/</code> 目錄的 ZIP 檔案,將被解壓到工作區的 <code>.claude/</code> 目錄中。",
"Claw.SkillsSync.syncSkills": "同步技能",
"Claw.SkillsSync.uploading": "上傳中...",
"Claw.SkillsSync.logs": "日誌",
"Claw.SkillsSync.selectZipFile": "請選擇一個 ZIP 檔案",
"Claw.SkillsSync.onlyZipSupported": "僅支援 ZIP 檔案",
"Claw.SkillsSync.creatingWorkspaceAndSyncing": "正在創建工作區並同步技能...",
"Claw.SkillsSync.workspaceCreatedSuccess": "工作區創建成功",
"Claw.SkillsSync.syncSuccess": "技能同步成功",
"Claw.SkillsSync.errorPrefix": "錯誤: {0}",
"Claw.SkillsSync.fileSelected": "已選擇: {0} ({1} KB)",
"Claw.Lanproxy.title": "內網穿透 (Lanproxy)",
"Claw.Lanproxy.notLoggedIn": "(未登錄)",
"Claw.Lanproxy.configSaved": "配置已儲存",
"Claw.Lanproxy.tunnelStopped": "內網穿透已停止",
"Claw.Lanproxy.tunnelStarted": "內網穿透已啟動",
"Claw.Lanproxy.errorWithDetail": "錯誤: {0}",
"Claw.Lanproxy.platformNotSupported": "目前平台暫不支援內網穿透(未偵測到 lanproxy 二進制)。請使用帶 lanproxy 的安裝包或從 Tauri 構建獲取對應平台二進制。",
"Claw.Lanproxy.running": "● 執行中",
"Claw.Lanproxy.stopped": "○ 已停止",
"Claw.Lanproxy.start": "啟動",
"Claw.Lanproxy.stop": "停止",
"Claw.Lanproxy.config": "配置",
"Claw.Lanproxy.serverIp": "伺服器 IP",
"Claw.Lanproxy.serverPort": "伺服器連接埠",
"Claw.Lanproxy.clientKey": "客戶端密鑰(登錄後自動獲取)",
"Claw.Lanproxy.ssl": "SSL",
"Claw.Lanproxy.enable": "啟用",
"Claw.Lanproxy.disable": "停用",
"Claw.Lanproxy.saveConfig": "儲存配置",
"Claw.TaskSettings.title": "定時任務",
"Claw.TaskSettings.taskCount": "{0} 個任務",
"Claw.TaskSettings.addTask": "+ 添加任務",
"Claw.TaskSettings.cancel": " 取消",
"Claw.TaskSettings.taskNameRequired": "任務名稱 *",
"Claw.TaskSettings.taskNamePlaceholder": "每日新聞摘要",
"Claw.TaskSettings.description": "描述",
"Claw.TaskSettings.descriptionPlaceholder": "獲取每日科技新聞",
"Claw.TaskSettings.scheduleType": "調度方式",
"Claw.TaskSettings.interval": "間隔",
"Claw.TaskSettings.once": "執行一次",
"Claw.TaskSettings.cron": "Cron 表達式",
"Claw.TaskSettings.minutesOption": "分鐘",
"Claw.TaskSettings.hoursOption": "小時",
"Claw.TaskSettings.daysOption": "天",
"Claw.TaskSettings.actionType": "動作類型",
"Claw.TaskSettings.sendMessage": "發送消息",
"Claw.TaskSettings.executeCommand": "執行命令",
"Claw.TaskSettings.webhook": "Webhook",
"Claw.TaskSettings.contentRequired": "內容 *",
"Claw.TaskSettings.contentPlaceholder": "獲取最新的科技新聞",
"Claw.TaskSettings.commandPlaceholder": "npm run build",
"Claw.TaskSettings.webhookUrlPlaceholder": "https://api.example.com/webhook",
"Claw.TaskSettings.requestBodyPlaceholder": "請求體JSON",
"Claw.TaskSettings.createTask": "創建任務",
"Claw.TaskSettings.noTasks": "暫無定時任務",
"Claw.TaskSettings.noTasksHint": "創建任務以自動化您的工作流程",
"Claw.TaskSettings.nextRun": "下次: {0}",
"Claw.TaskSettings.lastRun": "上次: {0} 前",
"Claw.TaskSettings.saveTask": "儲存任務",
"Claw.TaskSettings.taskSaved": "任務已儲存",
"Claw.TaskSettings.fillRequiredFields": "請填寫必填欄位",
"Claw.TaskSettings.taskCreated": "任務已創建",
"Claw.TaskSettings.taskDeleted": "任務已刪除",
"Claw.TaskSettings.executingTask": "正在執行任務...",
"Claw.TaskSettings.taskCompleted": "任務執行完成",
"Claw.TaskSettings.taskError": "錯誤: {0}",
"Claw.TaskSettings.none": "無",
"Claw.TaskSettings.immediate": "立即",
"Claw.TaskSettings.seconds": "{0} 秒",
"Claw.TaskSettings.minutes": "{0} 分鐘",
"Claw.TaskSettings.hours": "{0} 小時",
"Claw.Setup.basicConfig.title": "基礎設置",
"Claw.Setup.basicConfig.description": "完成配置後即可使用,進度自動儲存",
"Claw.Setup.basicConfig.fileServerPort": "檔案服務連接埠",
"Claw.Setup.basicConfig.agentPort": "Agent 連接埠",
"Claw.Setup.basicConfig.workspaceDir": "工作區目錄",
"Claw.Setup.basicConfig.workspaceDirPlaceholder": "點擊右側按鈕選擇目錄",
"Claw.Setup.basicConfig.select": "選擇",
"Claw.Setup.basicConfig.nextStep": "下一步:帳戶登錄",
"Claw.Setup.basicConfig.fileServerPortRequired": "請輸入檔案服務連接埠",
"Claw.Setup.basicConfig.agentPortRequired": "請輸入 Agent 連接埠",
"Claw.Setup.basicConfig.workspaceDirRequired": "請選擇工作區目錄",
"Claw.Setup.basicConfig.saved": "基礎配置已儲存",
"Claw.Setup.basicConfig.saveFailed": "儲存配置失敗",
"Claw.Setup.login.title": "帳戶登錄",
"Claw.Setup.login.alreadyLoggedIn": "已登錄",
"Claw.Setup.login.currentDomain": "目前域名:{domain}",
"Claw.Setup.login.logout": "退出登錄",
"Claw.Setup.login.nextStep": "下一步",
"Claw.Setup.login.accountAndCodeRequired": "請輸入帳戶和動態認證碼",
"Claw.Setup.login.domainRequired": "請輸入服務域名",
"Claw.Setup.login.success": "登錄成功",
"Claw.Setup.login.logoutFailed": "退出登錄失敗",
"Claw.Setup.login.failed": "登錄失敗",
"Claw.Setup.login.domain": "服務域名",
"Claw.Setup.login.domainPlaceholder": "例如https://agent.qiming.com",
"Claw.Setup.login.account": "帳戶",
"Claw.Setup.login.accountPlaceholder": "用戶名 / 手機號 / 郵箱",
"Claw.Setup.login.code": "動態認證碼",
"Claw.Setup.login.codePlaceholder": "請輸入密碼或動態認證碼(在瀏覽器打開你的域名登錄,然後在用戶資料中查看)",
"Claw.Setup.login.prevStep": "上一步",
"Claw.Setup.login.pleaseWait": "請稍後 ({seconds}s)",
"Claw.Setup.login.loginButton": "登錄",
"Claw.Setup.login.supportMultipleAccountTypes": "支援用戶名、郵箱、手機號登錄",
"Claw.Setup.completed.title": "初始化完成",
"Claw.Setup.completed.subTitle": "正在進入主介面...",
"Claw.Setup.dependencies.checking": "檢查和安裝必需依賴",
"Claw.Setup.quickInit.configuring": "正在自動配置...",
"Claw.Setup.wizardTitle": "初始化嚮導",
"Claw.Setup.wizardSubtitle": "完成配置後即可使用",
"Claw.Setup.footer.autoSaved": "進度自動儲存",
"Claw.GUIAgent.title": "GUI Agent 視覺模型",
"Claw.GUIAgent.provider.zhipu": "智譜 AI",
"Claw.GUIAgent.provider.qwen": "通義千問",
"Claw.GUIAgent.provider.custom": "自訂...",
"Claw.GUIAgent.coordinateMode.auto": "自動(根據模型匹配)",
"Claw.GUIAgent.coordinateMode.imageAbsolute": "圖像絕對座標",
"Claw.GUIAgent.coordinateMode.normalized1000": "歸一化 0-1000",
"Claw.GUIAgent.coordinateMode.normalized999": "歸一化 0-999",
"Claw.GUIAgent.coordinateMode.normalized0to1": "歸一化 0-1",
"Claw.GUIAgent.protocol.anthropic": "Anthropic 通訊協定",
"Claw.GUIAgent.protocol.openai": "OpenAI 通訊協定",
"Claw.GUIAgent.display.primary": "主顯示器",
"Claw.GUIAgent.display.secondary": "顯示器",
"Claw.GUIAgent.error.customProviderNameRequired": "請輸入自訂提供商名稱",
"Claw.GUIAgent.message.configSaved": "GUI Agent 配置已儲存",
"Claw.GUIAgent.message.saveFailed": "儲存失敗",
"Claw.GUIAgent.form.provider": "模型提供商",
"Claw.GUIAgent.error.providerRequired": "請選擇提供商",
"Claw.GUIAgent.placeholder.selectProvider": "選擇提供商",
"Claw.GUIAgent.form.customProviderName": "自訂提供商名稱",
"Claw.GUIAgent.error.providerNameRequired": "請輸入提供商名稱",
"Claw.GUIAgent.placeholder.customProviderName": "輸入提供商名稱,如 my-provider",
"Claw.GUIAgent.form.apiProtocol": "API 通訊協定",
"Claw.GUIAgent.tooltip.apiProtocol": "Anthropic 通訊協定: x-api-key 認證 + /v1/messages 端點。OpenAI 通訊協定: Bearer 認證 + /chat/completions 端點。國內模型智譜、通義、DeepSeek 等)通常使用 OpenAI 相容通訊協定。",
"Claw.GUIAgent.form.visionModel": "視覺模型",
"Claw.GUIAgent.error.modelRequired": "請選擇或輸入模型名稱",
"Claw.GUIAgent.placeholder.selectModel": "選擇或輸入模型名稱",
"Claw.GUIAgent.placeholder.modelId": "輸入模型 ID如 glm-4v-plus",
"Claw.GUIAgent.form.baseUrl": "Base URL",
"Claw.GUIAgent.tooltip.baseUrl": "API 的基礎位址。預設提供商已自動填充,也可手動覆蓋。自訂提供商必須填寫。",
"Claw.GUIAgent.error.baseUrlRequired": "自訂提供商需要填寫 Base URL",
"Claw.GUIAgent.placeholder.baseUrl": "如 https://api.example.com/v1",
"Claw.GUIAgent.form.apiKey": "API Key (留空使用全域)",
"Claw.GUIAgent.placeholder.apiKey": "留空則使用全域 API Key",
"Claw.GUIAgent.form.targetDisplay": "目標顯示器",
"Claw.GUIAgent.form.coordinateMode": "座標模式",
"Claw.GUIAgent.tooltip.coordinateModeAuto": "自動模式將根據模型名匹配座標系。目前模型「{0}」→ {1}",
"Claw.GUIAgent.tooltip.coordinateModeManual": "手動指定座標模式會覆蓋自動匹配,請確認模型支援所選座標系",
"Claw.GUIAgent.display.autoMatch": "目前模型自動匹配",
"Claw.GUIAgent.form.maxSteps": "最大步數",
"Claw.GUIAgent.form.stepDelay": "步驟延遲 (ms)",
"Claw.GUIAgent.form.jpegQuality": "截圖品質",
"Claw.GUIAgent.description": "GUI Agent 透過截圖分析 + 鍵鼠模擬自動執行桌面任務",
"Claw.Dependencies.uvConfirmed": "uv 已確認({context}{version}",
"Claw.Dependencies.dependencyList": "依賴清單",
"Claw.Dependencies.showOnlyProblems": "僅顯示問題",
"Claw.Dependencies.showAll": "展開全部",
"Claw.Dependencies.noProblemItems": "暫時無問題項",
"Claw.Dependencies.install": "安裝",
"Claw.Dependencies.checkFailed": "檢測依賴失敗",
"Claw.Dependencies.installPkgFailed": "{0} 安裝失敗",
"Claw.Dependencies.installFailed": "安裝失敗",
"Claw.Dependencies.installAndUpgrade": "安裝並升級",
"Claw.Dependencies.retryInstallAndUpgrade": "重試安裝並升級",
"Claw.Dependencies.retryInstall": "重試安裝",
"Claw.Dependencies.checkingEnv": "正在檢測依賴環境...",
"Claw.Dependencies.installingDep": "正在{verb} {pkg}...",
"Claw.Dependencies.installingAllDep": "正在{verb}依賴...",
"Claw.Dependencies.enteringNextStep": "正在進入下一步...",
"Claw.Dependencies.upgradeFailed": "升級失敗",
"Claw.Dependencies.pleaseInstallSystemDeps": "請安裝所需系統依賴,然後點擊「重新檢測」",
"Claw.Dependencies.recheck": "重新檢測",
"Claw.Sessions.loginFirst": "登錄資訊不完整,請先登錄",
"Claw.Sessions.getSessionUrlFailed": "獲取會話位址失敗",
"Claw.Sessions.sessionStopped": "會話已停止",
"Claw.Sessions.stopSessionFailed": "停止會話失敗",
"Claw.Sessions.statusActive": "活躍",
"Claw.Sessions.statusPending": "等待中",
"Claw.Sessions.statusTerminating": "終止中",
"Claw.Sessions.statusIdle": "空閒",
"Claw.Sessions.engine01": "Agent 引擎01",
"Claw.Sessions.engine02": "Agent 引擎02",
"Claw.Sessions.title": "會話",
"Claw.Sessions.refresh": "重新整理",
"Claw.Sessions.newSession": "新建會話",
"Claw.Sessions.noActiveSessions": "暫時無活躍會話",
"Claw.Sessions.lastActivity": "最後活動",
"Claw.Sessions.open": "開啟",
"Claw.Sessions.stop": "停止",
"Claw.Agent.loadConfigFailed": "載入配置失敗",
"Claw.Agent.checkStatusFailed": "檢查狀態失敗",
"Claw.Agent.configSaved": "配置已儲存",
"Claw.Agent.stopped": "Agent 已停止",
"Claw.Agent.started": "Agent 啟動成功",
"Claw.Agent.startFailedWithReason": "啟動失敗:{reason}",
"Claw.Agent.operationError": "錯誤:{message}",
"Claw.Agent.engineSettings": "Agent 引擎設置",
"Claw.Agent.running": "執行中",
"Claw.Agent.stoppedStatus": "已停止",
"Claw.Agent.start": "啟動",
"Claw.Agent.stop": "停止",
"Claw.Agent.engineType": "引擎類型",
"Claw.Agent.type": "類型",
"Claw.Agent.claudeCodeAcpDesc": "Anthropic 官方 ACP 通訊協定",
"Claw.Agent.qimingcodeDesc": "基於 OpenCode 開發",
"Claw.Agent.portConfig": "連接埠配置",
"Claw.Agent.backendPort": "後端連接埠(直接連接)",
"Claw.Agent.backendPortHint": "直接連接 Agent 服務,無需代理",
"Claw.Agent.apiConfig": "API 配置",
"Claw.Agent.executablePath": "可執行檔案路徑",
"Claw.Agent.apiKey": "API 密鑰",
"Claw.Agent.apiBaseUrl": "API 基礎 URL",
"Claw.Agent.model": "模型",
"Claw.Agent.saveConfig": "儲存配置",
"Claw.About.checking": "檢查中...",
"Claw.About.alreadyLatest": "目前已是最後版本",
"Claw.About.checkFailed": "檢查更新失敗",
"Claw.About.checkFailedWithDetail": "檢查更新失敗: {error}",
"Claw.About.channelSwitching": "切換到預發測試版通道",
"Claw.About.betaWarning": "預發測試版包含尚未全面驗證的更新,可能存在不穩定或功能缺陷。",
"Claw.About.confirmSwitch": "是否確認切換?",
"Claw.About.confirmSwitchBtn": "確認切換",
"Claw.About.switchedToBeta": "已切換到預發測試版通道,正在檢查更新...",
"Claw.About.switchedToStable": "已切換到穩定正式版通道,正在檢查更新...",
"Claw.About.channelSwitchFailed": "更新通道切換失敗,請稍後重試",
"Claw.About.updateDownloaded": "更新已下載完成",
"Claw.About.updateDownloadedConfirm": "v{version} 已下載完成,是否立即重啟安裝?",
"Claw.About.restartNow": "立即重啟",
"Claw.About.later": "稍後安裝",
"Claw.About.installFailed": "安裝更新失敗",
"Claw.About.downloadFailed": "下載失敗",
"Claw.About.getDebugInfoFailed": "獲取調試資訊失敗",
"Claw.About.versionFound": "發現新版本: v{version}",
"Claw.About.goToDownloadPage": "前往下載頁",
"Claw.About.downloadUpdate": "下載更新",
"Claw.About.downloading": "正在下載 v{version}... {percent}%",
"Claw.About.versionDownloaded": "v{version} 已下載完成",
"Claw.About.installUpdate": "立即重啟安裝",
"Claw.About.readOnlyVolumeError": "目前應用在唯讀位置運行(如從「下載」直接打開),無法就地更新。請將應用移到「應用程式」資料夾後重試,或透過下方按鈕前往下載頁手動下載新版本。",
"Claw.About.updateError": "更新出錯",
"Claw.About.checkUpdate": "檢查更新",
"Claw.About.crossPlatformDescription": "跨平台 AI 智慧體桌面客戶端",
"Claw.About.website": "官網",
"Claw.About.betaChannel": "Beta 升級通道",
"Claw.About.betaDisclaimer": "開啟後將切換到預發測試版通道,可能包含未驗證改動。",
"Claw.About.showDebugInfo": "顯示調試資訊",
"Claw.About.hideDebugInfo": "隱藏調試資訊",
"Claw.About.debugInfoTitle": "升級檢測調試資訊",
"Claw.About.platform": "平台",
"Claw.About.arch": "架構",
"Claw.About.packaged": "打包狀態",
"Claw.About.devMode": "否 (開發模式)",
"Claw.About.appVersion": "應用版本",
"Claw.About.appName": "應用名稱",
"Claw.About.installerType": "安裝類型",
"Claw.About.upgradeSupported": "✅ 支援應用內升級",
"Claw.About.manualDownload": "⚠️ 需手動下載",
"Claw.About.canAutoUpdate": "可自動更新",
"Claw.About.appDir": "應用目錄",
"Claw.About.exePath": "可執行檔",
"Claw.About.uninstaller": "卸載程式",
"Claw.About.totalAppFiles": "目錄檔案數",
"Claw.About.switchOn": "開",
"Claw.About.switchOff": "關",
"Claw.Common.yes": "是",
"Claw.Common.no": "否",
"Claw.Settings.tabs.basic": "基本設定",
"Claw.Settings.tabs.system": "系統設定",
"Claw.Settings.tabs.mcp": "MCP",
"Claw.Settings.tabs.experimental": "實驗功能",
"Claw.Settings.tabs.devtools": "開發工具",
"Claw.Settings.saveConfig.title": "服務配置",
"Claw.Settings.saveConfig.edit": "編輯",
"Claw.Settings.saveConfig.cancel": "取消",
"Claw.Settings.saveConfig.save": "儲存",
"Claw.Settings.saveConfig.fileServerPort": "檔案服務連接埠",
"Claw.Settings.saveConfig.agentPort": "Agent 連接埠",
"Claw.Settings.saveConfig.guiMcpPort": "GUI MCP 連接埠",
"Claw.Settings.saveConfig.guiMcpEnabled": "啟用 GUI MCP",
"Claw.Settings.saveConfig.adminServerPort": "管理服務連接埠",
"Claw.Settings.saveConfig.adminServerPortExtra": "預設 60007用於重啟服務等管理介面",
"Claw.Settings.saveConfig.enterPort": "請輸入連接埠",
"Claw.Settings.saveConfig.restartHint": "修改配置後需要重啟服務才能生效",
"Claw.Settings.workspace.title": "工作區目錄",
"Claw.Settings.workspace.selectDir": "請選擇工作區目錄",
"Claw.Settings.workspace.clickToSelect": "點擊選擇目錄",
"Claw.Settings.workspace.select": "選擇",
"Claw.Settings.experimental.title": "實驗功能",
"Claw.Settings.experimental.mutualExclusionHint": "Sandbox 與 GUI MCP 為互斥實驗能力:啟用其中一個會自動停用另一個。",
"Claw.Settings.sandbox.title": "沙箱",
"Claw.Settings.sandbox.enable": "啟用沙箱",
"Claw.Settings.sandbox.enableDesc": "關閉後命令將直接在工作區執行",
"Claw.Settings.sandbox.mode": "沙箱模式",
"Claw.Settings.sandbox.modeDesc": "Strict最小權限 · Compat相容性優先預設 · Permissive僅用於故障排除",
"Claw.Settings.sandbox.modeRestartHint": "切換後重啟當前 Agent 會話或新開會話生效",
"Claw.Settings.sandbox.modeStrict": "Strict最小權限",
"Claw.Settings.sandbox.modeCompat": "Compat相容性優先",
"Claw.Settings.sandbox.modePermissive": "Permissive故障排除",
"Claw.Settings.sandbox.statusDegraded": "沙箱隔離未生效(已按策略降級)",
"Claw.Settings.sandbox.statusAvailable": "沙箱隔離可用",
"Claw.Settings.sandbox.statusUnavailable": "沙箱隔離不可用",
"Claw.Settings.sandbox.statusNotLoaded": "未載入",
"Claw.Settings.guiMcp.title": "GUI MCP",
"Claw.Settings.guiMcp.enable": "啟用 GUI MCP",
"Claw.Settings.guiMcp.enableDesc": "桌面自動化視覺操作服務",
"Claw.Settings.guiMcp.statusEnabled": "已啟用",
"Claw.Settings.guiMcp.statusDisabled": "已停用",
"Claw.Settings.system.title": "系統",
"Claw.Settings.system.autoLaunch": "開機自動啟動",
"Claw.Settings.system.autoLaunchDesc": "系統啟動時自動運行 {appName}",
"Claw.Settings.system.theme": "主題",
"Claw.Settings.system.themeDesc": "選擇介面配色方案",
"Claw.Settings.system.themeSystem": "跟隨系統",
"Claw.Settings.system.themeLight": "亮色",
"Claw.Settings.system.themeDark": "暗色",
"Claw.Settings.system.appDataDir": "應用資料目錄",
"Claw.Settings.system.logDir": "日誌目錄",
"Claw.Settings.system.loading": "載入中...",
"Claw.Settings.system.workspaceDir": "工作空間目錄",
"Claw.Settings.system.notSet": "未設定",
"Claw.Settings.system.open": "開啟",
"Claw.Settings.system.language": "語言",
"Claw.Settings.system.languageDesc": "選擇介面顯示語言",
"Claw.Settings.system.langEnglish": "English",
"Claw.Settings.system.langChinese": "简体中文",
"Claw.Settings.system.langChineseTW": "繁體中文(台灣)",
"Claw.Settings.system.langChineseHK": "繁體中文(香港)",
"Claw.Settings.messages.languageChanged": "語言切換成功,正在重新整理...",
"Claw.Settings.messages.languageChangeFailed": "語言切換失敗",
"Claw.Settings.languageConfirm.title": "切換語言",
"Claw.Settings.languageConfirm.content": "切換語言將重啟應用並中斷正在運行的服務,是否繼續?",
"Claw.Settings.languageConfirm.ok": "切換",
"Claw.Settings.languageConfirm.cancel": "取消",
"Claw.Settings.dialog.selectWorkspace": "選擇工作區目錄",
"Claw.Settings.messages.saveConfig": "儲存配置",
"Claw.Settings.messages.saveConfigConfirm": "儲存後需要重啟服務才能生效,確定儲存嗎?",
"Claw.Settings.messages.autoLaunchEnabled": "已開啟開機自動啟動",
"Claw.Settings.messages.autoLaunchDisabled": "已關閉開機自動啟動",
"Claw.Settings.messages.workspaceNotConfigured": "未配置工作空間目錄",
"Claw.Settings.messages.openWorkspaceFailed": "開啟工作空間目錄失敗",
"Claw.Settings.messages.sandboxPolicyUpdated": "沙箱策略已更新",
"Claw.Settings.messages.updateSandboxPolicyFailed": "更新沙箱策略失敗",
"Claw.Settings.messages.sandboxLinuxNotAvailableYet": "Linux 平台 Sandbox 暫未開放",
"Claw.Settings.guiMcp.messages.enableSuccess": "GUI MCP 已啟用",
"Claw.Settings.guiMcp.messages.disableSuccess": "GUI MCP 已停用",
"Claw.Settings.guiMcp.messages.updateFailed": "更新 GUI MCP 設置失敗",
"Claw.Settings.messages.settingFailed": "設置失敗",
"Claw.Client.startSession": "開始會話",
"Claw.Client.login": "登錄",
"Claw.Client.logout": "退出",
"Claw.Client.cancel": "取消",
"Claw.Client.defaultUser": "用戶",
"Claw.Client.loginHint": "支援用戶名、郵箱、手機號登錄",
"Claw.Client.starting": "啟動中",
"Claw.Client.stopping": "停止中",
"Claw.Client.running": "執行中",
"Claw.Client.stopped": "已停止",
"Claw.Client.stop": "停止",
"Claw.Client.start": "啟動",
"Claw.Client.goInstall": "前往安裝",
"Claw.Client.settings": "設定",
"Claw.Client.dependencies": "依賴",
"Claw.Client.about": "關於",
"Claw.Client.accountStatus": "帳號狀態",
"Claw.Client.services": "服務",
"Claw.Client.refresh": "重新整理",
"Claw.Client.startAll": "啟動全部",
"Claw.Client.stopAll": "停止全部",
"Claw.Client.quickActions": "快捷操作",
"Claw.Client.serviceStartFailed": "{0} 啟動失敗: {1}",
"Claw.Client.stopFailed": "停止失敗: {0}",
"Claw.MCP.title": "MCP Proxy 服務管理",
"Claw.MCP.status.ready": "就緒",
"Claw.MCP.status.notReady": "未就緒",
"Claw.MCP.status.serverCount": "個 Server",
"Claw.MCP.checkAvailability": "檢測可用性",
"Claw.MCP.serverManagement.title": "MCP Servers 配置",
"Claw.MCP.serverManagement.noServers": "暫無 MCP Server 配置",
"Claw.MCP.serverManagement.confirmRemove": "確定移除?",
"Claw.MCP.transport.sse": "SSE",
"Claw.MCP.transport.http": "HTTP",
"Claw.MCP.transport.stdio": "stdio",
"Claw.MCP.transport.auto": "自動偵測",
"Claw.MCP.transport.streamableHttp": "Streamable HTTP",
"Claw.MCP.addServer.url": "URL",
"Claw.MCP.addServer.argsPlaceholder": "參數",
"Claw.MCP.addServer.idPlaceholder": "Server ID如 my-mcp-server",
"Claw.MCP.addServer.stdio": "命令列 (stdio)",
"Claw.MCP.addServer.remote": "遠端 URL (HTTP/SSE)",
"Claw.MCP.addServer.commandPlaceholder": "命令",
"Claw.MCP.addServer.argsPlaceholderFull": "參數(如 -y chrome-devtools-mcp@latest",
"Claw.MCP.addServer.urlPlaceholder": "URL如 https://example.com/mcp",
"Claw.MCP.addServer.authTokenPlaceholder": "AuthToken選填",
"Claw.MCP.addServer.button": "新增 MCP Server",
"Claw.MCP.addServer.idRequired": "請輸入 Server ID",
"Claw.MCP.addServer.argsRequired": "請輸入參數",
"Claw.MCP.message.serverAdded": "已新增,記得儲存配置",
"Claw.MCP.message.serverRemoved": "已移除,記得儲存配置",
"Claw.MCP.toolFilter.title": "工具過濾",
"Claw.MCP.toolFilter.none": "不過濾",
"Claw.MCP.toolFilter.allowList": "白名單",
"Claw.MCP.toolFilter.denyList": "黑名單",
"Claw.MCP.toolFilter.allowPlaceholder": "輸入允許的工具名稱,以逗號分隔(如 generate_bar_chart, generate_column_chart",
"Claw.MCP.toolFilter.denyPlaceholder": "輸入排除的工具名稱,以逗號分隔(如 screenshot, navigate",
"Claw.MCP.toolFilter.hintNone": "載入所有 MCP Server 提供的工具",
"Claw.MCP.toolFilter.hintAllow": "僅載入白名單中的工具,其他全部排除",
"Claw.MCP.toolFilter.hintDeny": "排除黑名單中的工具,其他全部載入",
"Claw.MCP.saveConfig": "儲存配置",
"Claw.MCP.saveConfigHint": "配置修改後需儲存Agent 下次初始化時自動生效",
"Claw.MCP.message.configSaved": "MCP 配置已儲存",
"Claw.MCP.message.proxyReady": "MCP Proxy 就緒",
"Claw.MCP.message.checkFailed": "檢測失敗: {0}",
"Claw.MCP.message.error": "錯誤: {0}",
"Claw.Common.saveFailed": "儲存失敗",
"Claw.Process.exitImmediately": "進程啟動後立即退出",
"Claw.Sandbox.workspaceNotFound": "工作區未找到: {0}",
"Claw.Lanproxy.missingServerConfig": "缺少伺服器設定",
"Claw.Permissions.command": "命令",
"Claw.Permissions.envVars": "環境變量",
"Claw.Permissions.file": "檔案",
"Claw.Permissions.tool": "工具",
"Claw.Permissions.second": "秒",
"Claw.Permissions.deny": "拒絕",
"Claw.Permissions.allowOnce": "本次允許",
"Claw.Permissions.allowAlways": "始終允許",
"Claw.Permissions.url": "URL",
"Claw.PermissionRules.defaultToolRead": "讀取檔案",
"Claw.PermissionRules.defaultToolEdit": "編輯檔案",
"Claw.PermissionRules.defaultBash": "Bash 命令",
"Claw.PermissionRules.defaultNetwork": "網路請求",
"Claw.PermissionRules.defaultFileRead": "檔案讀取",
"Claw.PermissionRules.defaultFileWrite": "檔案寫入",
"Claw.PermissionsPage.granted": "已授權",
"Claw.PermissionsPage.denied": "未授權",
"Claw.PermissionsPage.unknown": "未知",
"Claw.PermissionsPage.title": "系統授權",
"Claw.PermissionsPage.description": "以下權限可能影響應用的正常運行,請根據需要授權",
"Claw.PermissionsPage.refresh": "重新整理",
"Claw.PermissionsPage.openSettings": "前往設定",
"Claw.PermissionsPage.allGranted": "所有權限已授權",
"Claw.PermissionsPage.cannotOpenSettings": "無法打開系統設定",
"Claw.PermissionsPage.macosAccessibility": "輔助功能",
"Claw.PermissionsPage.macosAccessibilityDesc": "允許應用控制您的電腦",
"Claw.PermissionsPage.macosScreenRecording": "螢幕錄製",
"Claw.PermissionsPage.macosScreenRecordingDesc": "允許應用錄製螢幕內容",
"Claw.PermissionsPage.macosFullDiskAccess": "全磁碟訪問",
"Claw.PermissionsPage.macosFullDiskAccessDesc": "允許應用訪問所有檔案",
"Claw.Sandbox.unavailable": "沙箱環境不可用,請檢查沙箱配置",
"Claw.Sandbox.unavailableWithType": "沙箱不可用: {0}",
"Claw.Sandbox.dockerUnavailable": "Docker 不可用,請確保 Docker Desktop 已安裝並執行",
"Claw.Sandbox.helperUnavailable": "沙箱 Helper 不可用,請確認 qiming-sandbox-helper 已正確安裝",
"Claw.Sandbox.workspaceExists": "工作區已存在: {0}",
"Claw.Sandbox.workspaceCreateFailed": "工作區創建失敗,請檢查磁盤空間和權限",
"Claw.Sandbox.workspaceDestroyFailed": "工作區銷毀失敗,請手動清理",
"Claw.Sandbox.workspaceInvalidState": "工作區狀態無效,請重試或重新創建工作區",
"Claw.Sandbox.executionFailed": "命令執行失敗",
"Claw.Sandbox.executionTimeout": "命令執行超時",
"Claw.Sandbox.executionBlocked": "命令被安全策略攔截",
"Claw.Sandbox.commandNotFound": "命令未找到",
"Claw.Sandbox.fileNotFound": "文件未找到",
"Claw.Sandbox.fileWriteFailed": "文件寫入失敗",
"Claw.Sandbox.fileReadFailed": "文件讀取失敗",
"Claw.Sandbox.fileDeleteFailed": "文件刪除失敗",
"Claw.Sandbox.directoryOperationFailed": "目錄操作失敗",
"Claw.Sandbox.cleanupFailed": "清理失敗",
"Claw.Sandbox.cleanupTimeout": "清理超時",
"Claw.Sandbox.configInvalid": "配置無效",
"Claw.Sandbox.configMissing": "配置缺失",
"Claw.Sandbox.containerOperationFailed": "容器操作失敗",
"Claw.Sandbox.containerStartFailed": "容器啟動失敗",
"Claw.Sandbox.containerStopFailed": "容器停止失敗",
"Claw.Sandbox.resourceInsufficient": "資源不足",
"Claw.Sandbox.outOfMemory": "記憶體不足",
"Claw.Sandbox.outOfDiskSpace": "磁盤空間不足",
"Claw.Sandbox.unknownError": "未知錯誤",
"Claw.Sandbox.helperReady": "Windows Sandbox helper 就緒",
"Claw.GUIAgent.entryNotFound": "agent-gui-server 入口檔案未找到,請先執行 npm run prepare:gui-server",
"Claw.GUIAgent.nodeNotFound": "Node.js 未找到GUI Agent Server 無法啟動",
"Claw.GUIAgent.missingApiKey": "未找到 API KeyGUI Agent Server 可能無法正常運作",
"Claw.MCP.notInstalled": "qiming-mcp-stdio-proxy 未安裝,請先在依賴管理中安裝或確保已 npm install",
"Claw.MCP.entryNotFound": "qiming-mcp-stdio-proxy 入口檔案未找到",
"Claw.MCP.discoverTools": "發現工具",
"Claw.MCP.discoveredTools": "已發現工具",
"Claw.MCP.tools": "工具",
"Claw.MCP.message.toolsDiscovered": "已發現 {0} 個工具",
"Claw.MCP.message.discoveryFailed": "工具發現失敗:{0}",
"Claw.MCP.message.discoveryError": "工具發現錯誤:{0}",
"Claw.MCP.batch.operations": "批次操作",
"Claw.MCP.batch.enableAll": "全部啟用",
"Claw.MCP.batch.disableAll": "全部停用",
"Claw.MCP.batch.discoverAll": "批次發現工具",
"Claw.MCP.batch.discovering": "正在批次發現工具...",
"Claw.MCP.batch.enableAllSuccess": "已全部啟用",
"Claw.MCP.batch.disableAllSuccess": "已全部停用",
"Claw.MCP.batch.discoverAllSuccess": "批次發現完成:{0}/{1} 成功",
"Claw.MCP.importExport.export": "匯出配置",
"Claw.MCP.importExport.import": "匯入配置",
"Claw.MCP.importExport.exportSuccess": "配置已匯出至:{0}",
"Claw.MCP.importExport.exportFailed": "匯出失敗:{0}",
"Claw.MCP.importExport.exportError": "匯出錯誤:{0}",
"Claw.MCP.importExport.exportWarningTitle": "匯出配置確認",
"Claw.MCP.importExport.exportWarningContent": "配置檔案可能包含敏感資訊(如 API tokens、密碼等請妥善保管匯出的檔案避免洩露。",
"Claw.MCP.importExport.importConfirm": "匯入 MCP 配置",
"Claw.MCP.importExport.importStrategy": "選擇匯入策略",
"Claw.MCP.importExport.replace": "替換",
"Claw.MCP.importExport.merge": "合併",
"Claw.MCP.importExport.invalidFormat": "配置檔案格式無效",
"Claw.MCP.importExport.importSuccess": "成功匯入 {0} 個伺服器",
"Claw.MCP.importExport.importError": "匯入錯誤:{0}",
"Claw.MCP.template.selectTitle": "選擇 MCP 範本",
"Claw.MCP.template.category.all": "全部",
"Claw.MCP.template.category.file": "檔案",
"Claw.MCP.template.category.network": "網路",
"Claw.MCP.template.category.data": "資料",
"Claw.MCP.template.category.ai": "AI",
"Claw.MCP.template.category.dev": "開發",
"Claw.MCP.template.noTemplates": "無範本",
"Claw.MCP.template.fillParams": "填寫參數",
"Claw.MCP.template.paramRequired": "請填寫 {0}",
"Claw.MCP.template.addSuccess": "已新增 {0}",
"Claw.MCP.template.apply": "應用範本",
"Claw.MCP.template.params": "範本參數",
"Claw.MCP.Tools.toolCount": "工具",
"Claw.MCP.Tools.discoverTools": "發現工具",
"Claw.MCP.Tools.discoveredTools": "已發現的工具",
"Claw.MCP.addServer.fromTemplate": "從範本新增",
"Claw.MCP.addServer.custom": "自訂新增",
"Claw.MCP.editor.title": "JSON 配置編輯器",
"Claw.MCP.editor.description": "以 JSON 格式編輯 MCP 配置,支援 stdio 同 remote 伺服器類型。",
"Claw.MCP.editor.config": "配置",
"Claw.MCP.editor.placeholder": "請輸入 JSON 格式嘅 MCP 配置...",
"Claw.MCP.editor.parseError": "JSON 解析錯誤",
"Claw.MCP.editor.format": "格式化",
"Claw.MCP.editor.exampleTitle": "配置範例",
"Claw.MCP.editor.previewTitle": "JSON 語法高亮預覽",
"Claw.MCP.view.list": "列表模式",
"Claw.MCP.view.json": "JSON 模式",
"Claw.MCP.list.title": "MCP 服務列表(手動啟用後才生效)",
"Claw.MCP.list.enabledSummary": "已啟用 {0} / {1}",
"Claw.MCP.list.disableAll": "全部停用",
"Claw.MCP.list.disableAllSuccess": "已將所有 MCP 服務設為停用",
"Claw.MCP.list.addServer": "新增服務",
"Claw.MCP.list.edit": "編輯",
"Claw.MCP.list.test": "測試",
"Claw.MCP.list.testSuccess": "測試通過:發現 {0} 個工具",
"Claw.MCP.list.testFailed": "測試失敗:{0}",
"Claw.MCP.list.testing": "測試中...",
"Claw.MCP.editor.createTitle": "新增 MCP 服務",
"Claw.MCP.editor.editTitle": "編輯 MCP 服務",
"Claw.MCP.editor.back": "返回",
"Claw.MCP.editor.tabForm": "表單",
"Claw.MCP.editor.tabJson": "JSON",
"Claw.MCP.editor.jsonHint": "粘貼單條服務配置 {\"server-name\": {...}} 或完整的 mcpServers 配置",
"Claw.MCP.switch.enable": "啟用",
"Claw.MCP.switch.disable": "停用",
"Claw.MCP.addServer.modalTitle": "新增 MCP 服務",
"Claw.MCP.addServer.type": "服務類型",
"Claw.MCP.addServer.serverId": "服務 ID",
"Claw.MCP.addServer.add": "添加",
"Claw.MCP.addServer.idDuplicate": "服務 ID 已存在,請使用其他名稱",
"Claw.MCP.addServer.commandRequired": "stdio 模式需要填寫 command",
"Claw.MCP.addServer.urlRequired": "remote 模式需要填寫 URL",
"Claw.MCP.addServer.argsInvalid": "Args 格式無效。請使用 JSON 陣列(如 [\"-y\",\"pkg\"])或帶引號的 shell 參數。",
"Claw.MCP.addServer.addSuccess": "服務已新增(預設停用,請手動啟用)",
"Claw.MCP.addServer.argsPlaceholderAdvanced": "建議使用 JSON 陣列,例如 [\"-y\",\"@modelcontextprotocol/server-filesystem\",\"/path with space\"]",
"Claw.MCP.message.invalidJson": "JSON 格式無效,請檢查後重試",
"Claw.MCP.message.formatted": "格式化成功",
"Claw.MCP.message.formatFailed": "格式化失敗",
"Claw.MCP.status.running": "執行中",
"Claw.MCP.status.stopped": "已停止",
"Claw.MCP.action.start": "啟動",
"Claw.MCP.action.restart": "重新啟動",
"Claw.LogViewer.title": "應用日誌",
"Claw.LogViewer.autoScroll": "自動捲動",
"Claw.LogViewer.all": "全部",
"Claw.LogViewer.refresh": "重新整理",
"Claw.LogViewer.openDir": "開啟目錄",
"Claw.LogViewer.noLogs": "暫無日誌",
"Claw.LogViewer.scrollToLoadMore": "向上捲動載入更早日誌",
"Claw.LogViewer.totalLogs": "共 {0} 條日誌",
"Claw.LogViewer.autoScrollEnabled": "自動捲動已開啟"
}

View File

@@ -0,0 +1,882 @@
{
"Claw.Common.loading": "載入中...",
"Claw.Common.save": "儲存",
"Claw.Common.cancel": "取消",
"Claw.Common.confirm": "確認",
"Claw.Common.delete": "刪除",
"Claw.Common.edit": "編輯",
"Claw.Common.add": "新增",
"Claw.Common.open": "開啟",
"Claw.Common.close": "關閉",
"Claw.Common.retry": "重試",
"Claw.Common.noData": "暫無資料",
"Claw.Common.back": "返回",
"Claw.Common.refresh": "重新整理",
"Claw.Toast.Success.configSaved": "配置已儲存",
"Claw.Toast.Success.aiConfigSaved": "AI 配置已儲存",
"Claw.Toast.Success.agentStarted": "Agent 已啟動",
"Claw.Toast.Success.agentStopped": "Agent 已停止",
"Claw.Toast.Success.mcpStarted": "MCP 服務已啟動",
"Claw.Toast.Success.mcpStopped": "MCP 服務已停止",
"Claw.Toast.Success.mcpRestarted": "MCP 服務已重啟",
"Claw.Toast.Success.mcpConfigSaved": "MCP 配置已儲存",
"Claw.Toast.Success.servicesStarted": "服務已啟動",
"Claw.Toast.Success.servicesStopped": "服務已停止",
"Claw.Toast.Success.loginSuccess": "登入成功",
"Claw.Toast.Success.logoutSuccess": "已退出登入",
"Claw.Toast.Success.setupSaved": "設定已儲存",
"Claw.Toast.Success.dependenciesInstalled": "依賴安裝完成",
"Claw.Toast.Error.configSaveFailed": "配置儲存失敗",
"Claw.Toast.Error.aiConfigSaveFailed": "AI 配置儲存失敗",
"Claw.Toast.Error.startFailed": "啟動失敗",
"Claw.Toast.Error.stopFailed": "停止失敗",
"Claw.Toast.Error.restartFailed": "重啟失敗",
"Claw.Toast.Error.saveFailed": "儲存失敗",
"Claw.Toast.Error.loginFailed": "登入失敗",
"Claw.Toast.Error.logoutFailed": "退出登入失敗",
"Claw.Toast.Error.loadFailed": "載入失敗",
"Claw.Toast.Error.dependenciesInstallFailed": "依賴安裝失敗",
"Claw.Toast.Error.setupLoadFailed": "設定載入失敗",
"Claw.Toast.Error.openSettingsFailed": "打開設定失敗",
"Claw.Toast.Error.openLogsFailed": "打開日誌失敗",
"Claw.Toast.Error.openBrowserFailed": "打開瀏覽器失敗",
"Claw.Toast.Error.invalidSessionUrl": "無效的會話位址",
"Claw.Toast.Warning.incompleteLoginInfo": "登入資訊不完整",
"Claw.Toast.Warning.missingDependencies": "存在缺失依賴,請先安裝",
"Claw.Toast.Warning.serverDomainRequired": "請輸入服務網域",
"Claw.Toast.Warning.agentPortRequired": "請輸入 Agent 連接埠",
"Claw.Toast.Warning.fileServerPortRequired": "請輸入檔案服務連接埠",
"Claw.Toast.Warning.proxyPortRequired": "請輸入代理連接埠",
"Claw.Toast.Warning.workspaceDirRequired": "請選擇工作區目錄",
"Claw.Toast.Warning.usernameAndOtpRequired": "請輸入帳號和動態認證碼",
"Claw.Toast.Warning.serverIdRequired": "請輸入 Server ID",
"Claw.Toast.Warning.argsRequired": "請輸入參數",
"Claw.Toast.Warning.loginFirst": "請先登入",
"Claw.Toast.Info.allServicesRunning": "所有服務已在執行",
"Claw.Toast.Info.noRunningServices": "目前沒有執行中的服務",
"Claw.Toast.Info.noDependenciesToInstall": "沒有需要安裝的依賴",
"Claw.Toast.Info.serverAddedRememberSave": "已新增服務,記得儲存配置",
"Claw.Toast.Info.serverRemovedRememberSave": "已移除服務,記得儲存配置",
"Claw.Toast.Info.loginFirstSilent": "請先登入",
"Claw.Toast.Info.alreadyLatestVersion": "目前已是最新版本",
"Claw.Errors.mcpReconnectRetryLater": "MCP 連線波動,正在自動重連,請稍後重試",
"Claw.WindowsMcp.portInUseHint": "常見原因:連接埠 {port} 已被佔用。請稍後重試、在設定中變更 GUI MCP 連接埠,或於工作管理員結束相關程序。",
"Claw.Pages.Dependencies.systemEnv": "系統環境",
"Claw.Pages.Dependencies.dependencyPackages": "依賴套件",
"Claw.Pages.Dependencies.checking": "檢測中...",
"Claw.Pages.Dependencies.notInstalled": "未安裝",
"Claw.Pages.Dependencies.integrated": "應用整合",
"Claw.Pages.Dependencies.notIntegrated": "未整合",
"Claw.Pages.Dependencies.required": "必要",
"Claw.Pages.Dependencies.upgrading": "升級中...",
"Claw.Pages.Dependencies.updating": "更新中...",
"Claw.Pages.Dependencies.installing": "安裝中...",
"Claw.Pages.Dependencies.install": "安裝",
"Claw.Pages.Dependencies.update": "更新",
"Claw.Pages.Dependencies.upgrade": "升級",
"Claw.Pages.Dependencies.installAll": "全部安裝",
"Claw.Pages.Dependencies.upgradeAll": "全部升級",
"Claw.Pages.Dependencies.updateTo": "更新至 {0}",
"Claw.Pages.Dependencies.noDependencies": "暫無依賴套件",
"Claw.Pages.Dependencies.installedCount": "{0}/{1} 已安裝",
"Claw.Pages.Dependencies.dep.uv": "uv",
"Claw.Pages.Dependencies.dep.pnpm": "pnpm 套件管理器",
"Claw.Pages.Dependencies.dep.anthropicSdk": "Anthropic SDK",
"Claw.Pages.Dependencies.dep.claudeCodeAcp": "ACP 協議",
"Claw.Pages.Dependencies.dep.fileServer": "檔案服務",
"Claw.Pages.Dependencies.dep.mcpProxy": "MCP 代理",
"Claw.Pages.Dependencies.dep.qimingcode": "qimingcode",
"Claw.Pages.Dependencies.desc.uv": "高效能 Python 套件管理器(已整合)",
"Claw.Pages.Dependencies.desc.pnpm": "高效能 Node.js 套件管理器(應用內安裝)",
"Claw.Pages.Dependencies.desc.anthropicSdk": "Claude API 用戶端",
"Claw.Pages.Dependencies.desc.claudeCodeAcp": "ACP 通訊協定實作",
"Claw.Pages.Dependencies.desc.fileServer": "本地檔案 HTTP 服務",
"Claw.Pages.Dependencies.desc.mcpProxy": "MCP 通訊協定聚合代理",
"Claw.Pages.Dependencies.desc.qimingcode": "Agent 執行引擎(應用內整合)",
"Claw.Pages.Dependencies.reqNodeVersion": "需 >= {0}",
"Claw.Pages.Dependencies.reqUvVersion": "需 >= {0}",
"Claw.Pages.Dependencies.msgInstallSuccess": "{0} {1}成功",
"Claw.Pages.Dependencies.msgUpgradeSuccess": "{0} 升級成功",
"Claw.Pages.Dependencies.msgFailed": "{0} {1}失敗",
"Claw.Pages.Dependencies.msgInstallAllComplete": "依賴安裝並升級完成",
"Claw.Pages.Dependencies.msgUpgradeAllComplete": "依賴升級完成",
"Claw.Pages.Dependencies.msgInstallAllSuccess": "依賴安裝完成",
"Claw.Pages.Dependencies.msgLoadFailed": "載入依賴資料失敗",
"Claw.Pages.Dependencies.msgRestartingServices": "正在重新啟動服務…",
"Claw.Pages.Dependencies.msgRestartSuccess": "服務已重新啟動",
"Claw.Pages.Dependencies.msgRestartFailed": "重新啟動服務失敗",
"Claw.Pages.Dependencies.msgNoDependenciesToInstall": "沒有需要安裝或升級的依賴",
"Claw.Pages.Dependencies.msgInstallFailed": "安裝失敗: {0}",
"Claw.Pages.Dependencies.msgSystemEnvRequired": "請先滿足系統環境要求,再安裝依賴套件",
"Claw.Components.Dependency.checking": "檢查中",
"Claw.Components.Dependency.installed": "已安裝",
"Claw.Components.Dependency.missing": "缺失",
"Claw.Components.Dependency.outdated": "版本過低",
"Claw.Components.Dependency.installing": "安裝中",
"Claw.Components.Dependency.bundled": "應用整合",
"Claw.Components.Dependency.error": "錯誤",
"Claw.Components.Action.starting": "啟動中...",
"Claw.Components.Action.stopping": "停止中...",
"Claw.Components.Action.ready": "就緒",
"Claw.Components.Action.needConfig": "需配置",
"Claw.Components.Action.allReady": "所有依賴已就緒",
"Claw.Components.Action.allInstalled": "已就緒",
"Claw.Tray.showWindow": "顯示主視窗",
"Claw.Tray.restartServices": "重新啟動服務",
"Claw.Tray.stopServices": "停止服務",
"Claw.Tray.autoLaunch": "開機自動啟動",
"Claw.Tray.checkUpdate": "檢查更新",
"Claw.Tray.about": "關於 {0} v{1}",
"Claw.Tray.quit": "結束",
"Claw.Tray.Status.running": "執行中",
"Claw.Tray.Status.stopped": "已停止",
"Claw.Tray.Status.error": "錯誤",
"Claw.Tray.Status.starting": "啟動中",
"Claw.Dialog.error": "錯誤",
"Claw.Dialog.autoLaunchFailed": "設定開機自動啟動失敗",
"Claw.AutoUpdater.networkFailed": "網路請求失敗",
"Claw.AutoUpdater.newVersionFound": "發現新版本",
"Claw.AutoUpdater.downloadFailed": "下載失敗",
"Claw.AutoUpdater.updateDownloaded": "更新已下載",
"Claw.AutoUpdater.updateReady": "更新已就緒",
"Claw.AutoUpdater.checking": "檢查更新",
"Claw.AutoUpdater.alreadyLatest": "目前已是最後版本",
"Claw.AutoUpdater.unsupportedInstall": "目前安裝方式不支援自動更新,請前往官網下載頁下載最新安裝包。",
"Claw.AutoUpdater.downloadInstallNow": "是否立即下載並安裝更新?",
"Claw.AutoUpdater.downloadNow": "立即更新",
"Claw.AutoUpdater.later": "稍後再說",
"Claw.AutoUpdater.close": "關閉",
"Claw.AutoUpdater.downloadPage": "前往下載頁",
"Claw.AutoUpdater.installNow": "立即重新啟動",
"Claw.AutoUpdater.installOnExit": "結束時安裝",
"Claw.AutoUpdater.checkFailed": "檢查更新失敗",
"Claw.AutoUpdater.devModeUnsupported": "開發模式不支援下載更新,請使用打包版本測試",
"Claw.AutoUpdater.installDevUnsupported": "開發模式不支援安裝更新",
"Claw.AutoUpdater.getDownloadLinkFailed": "取得下載連結失敗",
"Claw.AutoUpdater.getDownloadLinkFailedDetail": "無法從伺服器取得下載連結\n\n錯誤: {0}\n\n請檢查網路連線後再試。",
"Claw.AutoUpdater.versionFound": "發現新版本 v{}",
"Claw.AutoUpdater.getUpdateInfoFailed": "無法取得{}通道更新資訊",
"Claw.AutoUpdater.invalidMetadataVersion": "更新元資料版本號不合法(僅支援 x.y.z{}",
"Claw.Agent.Status.idle": "就緒",
"Claw.Agent.Status.starting": "啟動中",
"Claw.Agent.Status.running": "執行中",
"Claw.Agent.Status.busy": "繁忙",
"Claw.Agent.Status.stopped": "已停止",
"Claw.Agent.Status.error": "錯誤",
"Claw.Menu.client": "客戶端",
"Claw.Menu.session": "工作階段",
"Claw.Menu.mcp": "MCP",
"Claw.Menu.settings": "設定",
"Claw.Menu.dependencies": "依賴",
"Claw.Menu.authorization": "授權",
"Claw.Menu.logs": "日誌",
"Claw.Menu.about": "關於",
"Claw.App.ConfigSyncFailed": "配置同步失敗",
"Claw.App.ConfigSyncFailedDetail": "無法連接到服務器獲取最新配置,服務未重啟。請檢查網絡後重試。",
"Claw.App.Retry": "重試",
"Claw.App.RestartingServices": "正在重啟服務…",
"Claw.App.RestartSuccess": "服務已重啟",
"Claw.App.RestartFailed": "重啟服務失敗",
"Claw.App.AutoReconnectFailed": "自動重連失敗",
"Claw.App.AutoReconnectFailedDetail": "無法連接到服務器。正在使用本地已保存的配置嘗試啟動服務;若需最新配置請檢查網絡後重新登錄。",
"Claw.App.ServicesRestarting": "服務正在重啟…",
"Claw.App.ServicesRestartSuccess": "服務重啟成功",
"Claw.App.Loading": "載入中...",
"Claw.App.User": "用戶",
"Claw.App.defaultUsername": "用戶",
"Claw.App.agentInterfaceFailed": "Agent 接口服務啟動失敗: {0}",
"Claw.App.agentInterfaceNotRunning": "Agent 接口服務未運行",
"Claw.App.channelCheckFailed": "通道檢查失敗: {0}",
"Claw.App.serviceRestartFailed": "服務重啟失敗: {0}",
"Claw.App.back": "返回",
"Claw.App.refresh": "重新整理",
"Claw.App.UpdateTag.newVersion": "新版本 v{version}",
"Claw.App.UpdateTag.download": "v{version} 更新",
"Claw.App.UpdateTag.downloading": "下載中 {percent}%",
"Claw.Service.file": "檔案服務",
"Claw.Service.fileDesc": "Agent 工作目錄檔遠程管理服務",
"Claw.Service.agent": "Agent 服務",
"Claw.Service.agentDesc": "Agent 核心服務",
"Claw.Service.mcp": "MCP 服務",
"Claw.Service.mcpDesc": "MCP 通訊協定聚合代理",
"Claw.Service.guiMcp": "GUI MCP 服務",
"Claw.Service.guiMcpDesc": "桌面自動化視覺操作服務",
"Claw.Service.proxy": "代理服務",
"Claw.Service.proxyDesc": "網絡通道",
"Claw.Service.admin": "管理服務",
"Claw.Service.adminDesc": "管理接口服務(重啟/健康檢查)",
"Claw.Client.domainRequired": "請輸入服務域名",
"Claw.Client.accountRequired": "請輸入帳戶",
"Claw.Client.codeRequired": "請填寫動態認證碼",
"Claw.Client.logoutConfirm": "確認退出登錄",
"Claw.Client.logoutConfirmDetail": "退出後將停止所有運行中的服務,需要重新登錄才能使用在線功能。",
"Claw.Client.logoutFailed": "退出登錄失敗",
"Claw.Client.getSessionUrlFailed": "無法獲取會話地址",
"Claw.Auth.loggingIn": "正在登入…",
"Claw.Auth.loggedOut": "已退出登入",
"Claw.Auth.syncingConfig": "正在同步設定…",
"Claw.Auth.configSyncedSuccess": "設定同步成功",
"Claw.Auth.error.userNotFound": "使用者不存在,請檢查輸入",
"Claw.Auth.error.wrongPassword": "密碼錯誤,請重新輸入",
"Claw.Auth.error.accountDisabled": "帳戶已被停用,請聯繫管理員",
"Claw.Auth.error.clientNotFound": "用戶端不存在或已下架",
"Claw.Auth.error.clientDisabled": "用戶端已被停用",
"Claw.Auth.error.configNotFound": "設定不存在,請重新登入",
"Claw.Auth.error.loginExpired": "登入已過期,請重新登入",
"Claw.Auth.error.systemError": "系統錯誤,請稍後重試",
"Claw.Auth.error.forbidden": "沒有權限執行此操作",
"Claw.Auth.error.notFound": "要求的資源不存在",
"Claw.Auth.error.serverError": "伺服器錯誤,請稍後重試",
"Claw.Auth.error.loginFailed": "登入失敗,請檢查網路連線",
"Claw.Api.success": "操作成功",
"Claw.Api.notLoggedIn": "使用者未登入,請重新登入",
"Claw.Api.loginExpired": "登入已過期,請重新登入",
"Claw.Api.clientNotFound": "用戶端不存在或已下架",
"Claw.Api.systemError": "系統錯誤,請稍後重試",
"Claw.Api.timeout": "要求逾時(>{0}ms請檢查網路或伺服器狀態",
"Claw.Errors.loginFirstForClientKey": "請先登入以取得用戶端金鑰",
"Claw.Errors.loginRedirect": "登入遇到問題,請檢查設定網域資訊或服務狀態後重試",
"Claw.Log.csvHeader": "時間,級別,來源,訊息",
"Claw.Setup.wizardComplete": "精靈完成!",
"Claw.Setup.resetComplete": "已重設,重新整理頁面可重新進入精靈",
"Claw.Client.loginFirst": "請先登錄以獲取代理服務配置",
"Claw.Client.startFailed": "啟動失敗",
"Claw.Client.loginFirstToStart": "請先登錄後再啟動服務",
"Claw.Client.missingDeps": "存在缺失依賴,請先安裝",
"Claw.Client.allServicesRunning": "所有可自動啟動的服務已在運行",
"Claw.Client.startAllServicesFirst": "請先啟動全部服務",
"Claw.Client.domainPlaceholder": "服務域名例如https://agent.qiming.com",
"Claw.Client.usernamePlaceholder": "用戶名 / 手機號 / 郵箱",
"Claw.Client.passwordPlaceholder": "請輸入密碼或動態認證碼(在瀏覽器打開你的域名登錄,然後在用戶資料中查看)",
"Claw.Client.missingDepsCannotStart": "缺少必需依賴,無法啟動服務",
"Claw.Client.qrCode": "掃碼使用",
"Claw.EmbeddedWebview.loadFailed": "載入失敗: {0} ({1})",
"Claw.EmbeddedWebview.back": "返回",
"Claw.EmbeddedWebview.refresh": "重新整理",
"Claw.EmbeddedWebview.unknownError": "未知錯誤",
"Claw.AgentRunner.configSaved": "配置已儲存",
"Claw.AgentRunner.stopped": "Agent Runner 已停止",
"Claw.AgentRunner.started": "Agent Runner 已啟動",
"Claw.AgentRunner.error": "錯誤: {0}",
"Claw.AgentRunner.running": "● 執行中",
"Claw.AgentRunner.stoppedStatus": "○ 已停止",
"Claw.AgentRunner.backendAddress": "後端地址",
"Claw.AgentRunner.proxyAddress": "代理地址",
"Claw.AgentRunner.stop": "停止",
"Claw.AgentRunner.start": "啟動",
"Claw.AgentRunner.config": "配置",
"Claw.AgentRunner.executablePath": "可執行檔案路徑",
"Claw.AgentRunner.backendPort": "後端連接埠",
"Claw.AgentRunner.proxyPort": "代理連接埠",
"Claw.AgentRunner.apiKey": "API 密鑰",
"Claw.AgentRunner.apiBaseUrl": "API 基礎 URL",
"Claw.AgentRunner.defaultModel": "預設模型",
"Claw.AgentRunner.saveConfig": "儲存配置",
"Claw.IMSettings.title": "即時通訊集成",
"Claw.IMSettings.platform.dingtalk": "釘釘",
"Claw.IMSettings.platform.feishu": "飛書",
"Claw.IMSettings.configSaved": "配置已儲存",
"Claw.IMSettings.connected": "{0} 已連接",
"Claw.IMSettings.error": "錯誤: {0}",
"Claw.IMSettings.disconnected": "已中斷連接",
"Claw.IMSettings.enable": "啟用 {0}",
"Claw.IMSettings.botConfig": "機器人配置",
"Claw.IMSettings.appConfig": "應用配置",
"Claw.IMSettings.allowedUsers": "允許的用戶 ID逗號分隔",
"Claw.IMSettings.options": "選項",
"Claw.IMSettings.autoReply": "自動回覆",
"Claw.IMSettings.disconnect": "中斷連接",
"Claw.IMSettings.connecting": "連接中...",
"Claw.IMSettings.connect": "連接",
"Claw.IMSettings.saveConfig": "儲存配置",
"Claw.SkillsSync.title": "技能同步(檔案服務)",
"Claw.SkillsSync.fileServiceConnection": "檔案服務連線",
"Claw.SkillsSync.serviceAddress": "服務地址",
"Claw.SkillsSync.connected": "已連線",
"Claw.SkillsSync.testConnection": "測試連線",
"Claw.SkillsSync.configSaved": "配置已儲存",
"Claw.SkillsSync.uploadSkillPackage": "上傳技能包ZIP",
"Claw.SkillsSync.uploadHint": "上傳包含 <code>skills/</code> 和/或 <code>agents/</code> 目錄的 ZIP 檔案,將被解壓到工作區的 <code>.claude/</code> 目錄中。",
"Claw.SkillsSync.syncSkills": "同步技能",
"Claw.SkillsSync.uploading": "上傳中...",
"Claw.SkillsSync.logs": "日誌",
"Claw.SkillsSync.selectZipFile": "請選擇一個 ZIP 檔案",
"Claw.SkillsSync.onlyZipSupported": "僅支援 ZIP 檔案",
"Claw.SkillsSync.creatingWorkspaceAndSyncing": "正在創建工作區並同步技能...",
"Claw.SkillsSync.workspaceCreatedSuccess": "工作區創建成功",
"Claw.SkillsSync.syncSuccess": "技能同步成功",
"Claw.SkillsSync.errorPrefix": "錯誤: {0}",
"Claw.SkillsSync.fileSelected": "已選擇: {0} ({1} KB)",
"Claw.Lanproxy.title": "內網穿透 (Lanproxy)",
"Claw.Lanproxy.notLoggedIn": "(未登錄)",
"Claw.Lanproxy.configSaved": "配置已儲存",
"Claw.Lanproxy.tunnelStopped": "內網穿透已停止",
"Claw.Lanproxy.tunnelStarted": "內網穿透已啟動",
"Claw.Lanproxy.errorWithDetail": "錯誤: {0}",
"Claw.Lanproxy.platformNotSupported": "目前平台暫不支援內網穿透(未偵測到 lanproxy 二進制)。請使用帶 lanproxy 的安裝包或從 Tauri 構建獲取對應平台二進制。",
"Claw.Lanproxy.running": "● 執行中",
"Claw.Lanproxy.stopped": "○ 已停止",
"Claw.Lanproxy.start": "啟動",
"Claw.Lanproxy.stop": "停止",
"Claw.Lanproxy.config": "配置",
"Claw.Lanproxy.serverIp": "伺服器 IP",
"Claw.Lanproxy.serverPort": "伺服器連接埠",
"Claw.Lanproxy.clientKey": "客戶端密鑰(登錄後自動獲取)",
"Claw.Lanproxy.ssl": "SSL",
"Claw.Lanproxy.enable": "啟用",
"Claw.Lanproxy.disable": "停用",
"Claw.Lanproxy.saveConfig": "儲存配置",
"Claw.TaskSettings.title": "定時任務",
"Claw.TaskSettings.taskCount": "{0} 個任務",
"Claw.TaskSettings.addTask": "+ 添加任務",
"Claw.TaskSettings.cancel": " 取消",
"Claw.TaskSettings.taskNameRequired": "任務名稱 *",
"Claw.TaskSettings.taskNamePlaceholder": "每日新聞摘要",
"Claw.TaskSettings.description": "描述",
"Claw.TaskSettings.descriptionPlaceholder": "獲取每日科技新聞",
"Claw.TaskSettings.scheduleType": "調度方式",
"Claw.TaskSettings.interval": "間隔",
"Claw.TaskSettings.once": "執行一次",
"Claw.TaskSettings.cron": "Cron 表達式",
"Claw.TaskSettings.minutesOption": "分鐘",
"Claw.TaskSettings.hoursOption": "小時",
"Claw.TaskSettings.daysOption": "天",
"Claw.TaskSettings.actionType": "動作類型",
"Claw.TaskSettings.sendMessage": "發送消息",
"Claw.TaskSettings.executeCommand": "執行命令",
"Claw.TaskSettings.webhook": "Webhook",
"Claw.TaskSettings.contentRequired": "內容 *",
"Claw.TaskSettings.contentPlaceholder": "獲取最新的科技新聞",
"Claw.TaskSettings.commandPlaceholder": "npm run build",
"Claw.TaskSettings.webhookUrlPlaceholder": "https://api.example.com/webhook",
"Claw.TaskSettings.requestBodyPlaceholder": "請求體JSON",
"Claw.TaskSettings.createTask": "創建任務",
"Claw.TaskSettings.noTasks": "暫無定時任務",
"Claw.TaskSettings.noTasksHint": "創建任務以自動化您的工作流程",
"Claw.TaskSettings.nextRun": "下次: {0}",
"Claw.TaskSettings.lastRun": "上次: {0} 前",
"Claw.TaskSettings.saveTask": "儲存任務",
"Claw.TaskSettings.taskSaved": "任務已儲存",
"Claw.TaskSettings.fillRequiredFields": "請填寫必填欄位",
"Claw.TaskSettings.taskCreated": "任務已創建",
"Claw.TaskSettings.taskDeleted": "任務已刪除",
"Claw.TaskSettings.executingTask": "正在執行任務...",
"Claw.TaskSettings.taskCompleted": "任務執行完成",
"Claw.TaskSettings.taskError": "錯誤: {0}",
"Claw.TaskSettings.none": "無",
"Claw.TaskSettings.immediate": "立即",
"Claw.TaskSettings.seconds": "{0} 秒",
"Claw.TaskSettings.minutes": "{0} 分鐘",
"Claw.TaskSettings.hours": "{0} 小時",
"Claw.Setup.basicConfig.title": "基礎設置",
"Claw.Setup.basicConfig.description": "完成配置後即可使用,進度自動儲存",
"Claw.Setup.basicConfig.fileServerPort": "檔案服務連接埠",
"Claw.Setup.basicConfig.agentPort": "Agent 連接埠",
"Claw.Setup.basicConfig.workspaceDir": "工作區目錄",
"Claw.Setup.basicConfig.workspaceDirPlaceholder": "點擊右側按鈕選擇目錄",
"Claw.Setup.basicConfig.select": "選擇",
"Claw.Setup.basicConfig.nextStep": "下一步:帳戶登錄",
"Claw.Setup.basicConfig.fileServerPortRequired": "請輸入檔案服務連接埠",
"Claw.Setup.basicConfig.agentPortRequired": "請輸入 Agent 連接埠",
"Claw.Setup.basicConfig.workspaceDirRequired": "請選擇工作區目錄",
"Claw.Setup.basicConfig.saved": "基礎配置已儲存",
"Claw.Setup.basicConfig.saveFailed": "儲存配置失敗",
"Claw.Setup.login.title": "帳戶登錄",
"Claw.Setup.login.alreadyLoggedIn": "已登錄",
"Claw.Setup.login.currentDomain": "目前域名:{domain}",
"Claw.Setup.login.logout": "退出登錄",
"Claw.Setup.login.nextStep": "下一步",
"Claw.Setup.login.accountAndCodeRequired": "請輸入帳戶和動態認證碼",
"Claw.Setup.login.domainRequired": "請輸入服務域名",
"Claw.Setup.login.success": "登錄成功",
"Claw.Setup.login.logoutFailed": "退出登錄失敗",
"Claw.Setup.login.failed": "登錄失敗",
"Claw.Setup.login.domain": "服務域名",
"Claw.Setup.login.domainPlaceholder": "例如https://agent.qiming.com",
"Claw.Setup.login.account": "帳戶",
"Claw.Setup.login.accountPlaceholder": "用戶名 / 手機號 / 郵箱",
"Claw.Setup.login.code": "動態認證碼",
"Claw.Setup.login.codePlaceholder": "請輸入密碼或動態認證碼(在瀏覽器打開你的域名登錄,然後在用戶資料中查看)",
"Claw.Setup.login.prevStep": "上一步",
"Claw.Setup.login.pleaseWait": "請稍後 ({seconds}s)",
"Claw.Setup.login.loginButton": "登錄",
"Claw.Setup.login.supportMultipleAccountTypes": "支援用戶名、郵箱、手機號登錄",
"Claw.Setup.completed.title": "初始化完成",
"Claw.Setup.completed.subTitle": "正在進入主介面...",
"Claw.Setup.dependencies.checking": "檢查和安裝必需依賴",
"Claw.Setup.quickInit.configuring": "正在自動配置...",
"Claw.Setup.wizardTitle": "初始化嚮導",
"Claw.Setup.wizardSubtitle": "完成配置後即可使用",
"Claw.Setup.footer.autoSaved": "進度自動儲存",
"Claw.GUIAgent.title": "GUI Agent 視覺模型",
"Claw.GUIAgent.provider.zhipu": "智譜 AI",
"Claw.GUIAgent.provider.qwen": "通義千問",
"Claw.GUIAgent.provider.custom": "自訂...",
"Claw.GUIAgent.coordinateMode.auto": "自動(根據模型匹配)",
"Claw.GUIAgent.coordinateMode.imageAbsolute": "圖像絕對座標",
"Claw.GUIAgent.coordinateMode.normalized1000": "歸一化 0-1000",
"Claw.GUIAgent.coordinateMode.normalized999": "歸一化 0-999",
"Claw.GUIAgent.coordinateMode.normalized0to1": "歸一化 0-1",
"Claw.GUIAgent.protocol.anthropic": "Anthropic 通訊協定",
"Claw.GUIAgent.protocol.openai": "OpenAI 通訊協定",
"Claw.GUIAgent.display.primary": "主顯示器",
"Claw.GUIAgent.display.secondary": "顯示器",
"Claw.GUIAgent.error.customProviderNameRequired": "請輸入自訂提供商名稱",
"Claw.GUIAgent.message.configSaved": "GUI Agent 配置已儲存",
"Claw.GUIAgent.message.saveFailed": "儲存失敗",
"Claw.GUIAgent.form.provider": "模型提供商",
"Claw.GUIAgent.error.providerRequired": "請選擇提供商",
"Claw.GUIAgent.placeholder.selectProvider": "選擇提供商",
"Claw.GUIAgent.form.customProviderName": "自訂提供商名稱",
"Claw.GUIAgent.error.providerNameRequired": "請輸入提供商名稱",
"Claw.GUIAgent.placeholder.customProviderName": "輸入提供商名稱,如 my-provider",
"Claw.GUIAgent.form.apiProtocol": "API 通訊協定",
"Claw.GUIAgent.tooltip.apiProtocol": "Anthropic 通訊協定: x-api-key 認證 + /v1/messages 端點。OpenAI 通訊協定: Bearer 認證 + /chat/completions 端點。國內模型智譜、通義、DeepSeek 等)通常使用 OpenAI 相容通訊協定。",
"Claw.GUIAgent.form.visionModel": "視覺模型",
"Claw.GUIAgent.error.modelRequired": "請選擇或輸入模型名稱",
"Claw.GUIAgent.placeholder.selectModel": "選擇或輸入模型名稱",
"Claw.GUIAgent.placeholder.modelId": "輸入模型 ID如 glm-4v-plus",
"Claw.GUIAgent.form.baseUrl": "Base URL",
"Claw.GUIAgent.tooltip.baseUrl": "API 的基礎位址。預設提供商已自動填充,也可手動覆蓋。自訂提供商必須填寫。",
"Claw.GUIAgent.error.baseUrlRequired": "自訂提供商需要填寫 Base URL",
"Claw.GUIAgent.placeholder.baseUrl": "如 https://api.example.com/v1",
"Claw.GUIAgent.form.apiKey": "API Key (留空使用全域)",
"Claw.GUIAgent.placeholder.apiKey": "留空則使用全域 API Key",
"Claw.GUIAgent.form.targetDisplay": "目標顯示器",
"Claw.GUIAgent.form.coordinateMode": "座標模式",
"Claw.GUIAgent.tooltip.coordinateModeAuto": "自動模式將根據模型名匹配座標系。目前模型「{0}」→ {1}",
"Claw.GUIAgent.tooltip.coordinateModeManual": "手動指定座標模式會覆蓋自動匹配,請確認模型支援所選座標系",
"Claw.GUIAgent.display.autoMatch": "目前模型自動匹配",
"Claw.GUIAgent.form.maxSteps": "最大步數",
"Claw.GUIAgent.form.stepDelay": "步驟延遲 (ms)",
"Claw.GUIAgent.form.jpegQuality": "截圖品質",
"Claw.GUIAgent.description": "GUI Agent 透過截圖分析 + 鍵鼠模擬自動執行桌面任務",
"Claw.Dependencies.uvConfirmed": "uv 已確認({context}{version}",
"Claw.Dependencies.dependencyList": "依賴清單",
"Claw.Dependencies.showOnlyProblems": "僅顯示問題",
"Claw.Dependencies.showAll": "展開全部",
"Claw.Dependencies.noProblemItems": "暫時無問題項",
"Claw.Dependencies.install": "安裝",
"Claw.Dependencies.checkFailed": "檢測依賴失敗",
"Claw.Dependencies.installPkgFailed": "{0} 安裝失敗",
"Claw.Dependencies.installFailed": "安裝失敗",
"Claw.Dependencies.installAndUpgrade": "安裝並升級",
"Claw.Dependencies.retryInstallAndUpgrade": "重試安裝並升級",
"Claw.Dependencies.retryInstall": "重試安裝",
"Claw.Dependencies.checkingEnv": "正在檢測依賴環境...",
"Claw.Dependencies.installingDep": "正在{verb} {pkg}...",
"Claw.Dependencies.installingAllDep": "正在{verb}依賴...",
"Claw.Dependencies.enteringNextStep": "正在進入下一步...",
"Claw.Dependencies.upgradeFailed": "升級失敗",
"Claw.Dependencies.pleaseInstallSystemDeps": "請安裝所需系統依賴,然後點擊「重新檢測」",
"Claw.Dependencies.recheck": "重新檢測",
"Claw.Sessions.loginFirst": "登錄信息不完整,請先登錄",
"Claw.Sessions.getSessionUrlFailed": "獲取會話位址失敗",
"Claw.Sessions.sessionStopped": "會話已停止",
"Claw.Sessions.stopSessionFailed": "停止會話失敗",
"Claw.Sessions.statusActive": "活躍",
"Claw.Sessions.statusPending": "等待中",
"Claw.Sessions.statusTerminating": "終止中",
"Claw.Sessions.statusIdle": "空閒",
"Claw.Sessions.engine01": "Agent 引擎01",
"Claw.Sessions.engine02": "Agent 引擎02",
"Claw.Sessions.title": "會話",
"Claw.Sessions.refresh": "重新整理",
"Claw.Sessions.newSession": "新建會話",
"Claw.Sessions.noActiveSessions": "暫時無活躍會話",
"Claw.Sessions.lastActivity": "最後活動",
"Claw.Sessions.open": "開啟",
"Claw.Sessions.stop": "停止",
"Claw.Agent.loadConfigFailed": "載入配置失敗",
"Claw.Agent.checkStatusFailed": "檢查狀態失敗",
"Claw.Agent.configSaved": "配置已儲存",
"Claw.Agent.stopped": "Agent 已停止",
"Claw.Agent.started": "Agent 啟動成功",
"Claw.Agent.startFailedWithReason": "啟動失敗:{reason}",
"Claw.Agent.operationError": "錯誤:{message}",
"Claw.Agent.engineSettings": "Agent 引擎設置",
"Claw.Agent.running": "執行中",
"Claw.Agent.stoppedStatus": "已停止",
"Claw.Agent.start": "啟動",
"Claw.Agent.stop": "停止",
"Claw.Agent.engineType": "引擎類型",
"Claw.Agent.type": "類型",
"Claw.Agent.claudeCodeAcpDesc": "Anthropic 官方 ACP 通訊協定",
"Claw.Agent.qimingcodeDesc": "基於 OpenCode 開發",
"Claw.Agent.portConfig": "連接埠配置",
"Claw.Agent.backendPort": "後端連接埠(直接連接)",
"Claw.Agent.backendPortHint": "直接連接 Agent 服務,無需代理",
"Claw.Agent.apiConfig": "API 配置",
"Claw.Agent.executablePath": "可執行檔案路徑",
"Claw.Agent.apiKey": "API 密鑰",
"Claw.Agent.apiBaseUrl": "API 基礎 URL",
"Claw.Agent.model": "模型",
"Claw.Agent.saveConfig": "儲存配置",
"Claw.About.checking": "檢查中...",
"Claw.About.alreadyLatest": "目前已是最後版本",
"Claw.About.checkFailed": "檢查更新失敗",
"Claw.About.checkFailedWithDetail": "檢查更新失敗: {error}",
"Claw.About.channelSwitching": "切換到預發測試版通道",
"Claw.About.betaWarning": "預發測試版包含尚未全面驗證的更新,可能存在不穩定或功能缺陷。",
"Claw.About.confirmSwitch": "是否確認切換?",
"Claw.About.confirmSwitchBtn": "確認切換",
"Claw.About.switchedToBeta": "已切換到預發測試版通道,正在檢查更新...",
"Claw.About.switchedToStable": "已切換到穩定正式版通道,正在檢查更新...",
"Claw.About.channelSwitchFailed": "更新通道切換失敗,請稍後重試",
"Claw.About.updateDownloaded": "更新已下載完成",
"Claw.About.updateDownloadedConfirm": "v{version} 已下載完成,是否立即重啟安裝?",
"Claw.About.restartNow": "立即重啟",
"Claw.About.later": "稍後安裝",
"Claw.About.installFailed": "安裝更新失敗",
"Claw.About.downloadFailed": "下載失敗",
"Claw.About.getDebugInfoFailed": "獲取調試資訊失敗",
"Claw.About.versionFound": "發現新版本: v{version}",
"Claw.About.goToDownloadPage": "前往下載頁",
"Claw.About.downloadUpdate": "下載更新",
"Claw.About.downloading": "正在下載 v{version}... {percent}%",
"Claw.About.versionDownloaded": "v{version} 已下載完成",
"Claw.About.installUpdate": "立即重啟安裝",
"Claw.About.readOnlyVolumeError": "目前應用在唯讀位置運行(如從「下載」直接打開),無法就地更新。請將應用移到「應用程式」資料夾後重試,或透過下方按鈕前往下載頁手動下載新版本。",
"Claw.About.updateError": "更新出錯",
"Claw.About.checkUpdate": "檢查更新",
"Claw.About.crossPlatformDescription": "跨平台 AI 智慧體桌面客戶端",
"Claw.About.website": "官網",
"Claw.About.betaChannel": "Beta 升級通道",
"Claw.About.betaDisclaimer": "開啟後將切換到預發測試版通道,可能包含未驗證改動。",
"Claw.About.showDebugInfo": "顯示調試資訊",
"Claw.About.hideDebugInfo": "隱藏調試資訊",
"Claw.About.debugInfoTitle": "升級檢測調試資訊",
"Claw.About.platform": "平台",
"Claw.About.arch": "架構",
"Claw.About.packaged": "打包狀態",
"Claw.About.devMode": "否 (開發模式)",
"Claw.About.appVersion": "應用版本",
"Claw.About.appName": "應用名稱",
"Claw.About.installerType": "安裝類型",
"Claw.About.upgradeSupported": "✅ 支援應用內升級",
"Claw.About.manualDownload": "⚠️ 需手動下載",
"Claw.About.canAutoUpdate": "可自動更新",
"Claw.About.appDir": "應用目錄",
"Claw.About.exePath": "可執行檔",
"Claw.About.uninstaller": "卸載程式",
"Claw.About.totalAppFiles": "目錄檔案數",
"Claw.About.switchOn": "開",
"Claw.About.switchOff": "關",
"Claw.Common.yes": "是",
"Claw.Common.no": "否",
"Claw.Settings.tabs.basic": "基礎設定",
"Claw.Settings.tabs.system": "系統設定",
"Claw.Settings.tabs.mcp": "MCP",
"Claw.Settings.tabs.experimental": "實驗功能",
"Claw.Settings.tabs.devtools": "開發工具",
"Claw.Settings.saveConfig.title": "服務配置",
"Claw.Settings.saveConfig.edit": "編輯",
"Claw.Settings.saveConfig.cancel": "取消",
"Claw.Settings.saveConfig.save": "儲存",
"Claw.Settings.saveConfig.fileServerPort": "檔案服務連接埠",
"Claw.Settings.saveConfig.agentPort": "Agent 連接埠",
"Claw.Settings.saveConfig.guiMcpPort": "GUI MCP 連接埠",
"Claw.Settings.saveConfig.guiMcpEnabled": "啟用 GUI MCP",
"Claw.Settings.saveConfig.adminServerPort": "管理服務連接埠",
"Claw.Settings.saveConfig.adminServerPortExtra": "預設 60007用於重啟服務等管理介面",
"Claw.Settings.saveConfig.enterPort": "請輸入連接埠",
"Claw.Settings.saveConfig.restartHint": "修改配置後需要重啟服務才能生效",
"Claw.Settings.workspace.title": "工作區目錄",
"Claw.Settings.workspace.selectDir": "請選擇工作區目錄",
"Claw.Settings.workspace.clickToSelect": "點擊選擇目錄",
"Claw.Settings.workspace.select": "選擇",
"Claw.Settings.experimental.title": "實驗功能",
"Claw.Settings.experimental.mutualExclusionHint": "Sandbox 與 GUI MCP 為互斥實驗能力:啟用其中一個會自動停用另一個。",
"Claw.Settings.sandbox.title": "沙箱",
"Claw.Settings.sandbox.enable": "啟用沙箱",
"Claw.Settings.sandbox.enableDesc": "關閉後命令將直接在工作區執行",
"Claw.Settings.sandbox.mode": "沙箱模式",
"Claw.Settings.sandbox.modeDesc": "Strict最小權限 · Compat相容性優先預設 · Permissive僅用於故障排除",
"Claw.Settings.sandbox.modeRestartHint": "切換後重啟當前 Agent 會話或新開會話生效",
"Claw.Settings.sandbox.modeStrict": "Strict最小權限",
"Claw.Settings.sandbox.modeCompat": "Compat相容性優先",
"Claw.Settings.sandbox.modePermissive": "Permissive故障排除",
"Claw.Settings.sandbox.statusDegraded": "沙箱隔離未生效(已按策略降級)",
"Claw.Settings.sandbox.statusAvailable": "沙箱隔離可用",
"Claw.Settings.sandbox.statusUnavailable": "沙箱隔離不可用",
"Claw.Settings.sandbox.statusNotLoaded": "未載入",
"Claw.Settings.guiMcp.title": "GUI MCP",
"Claw.Settings.guiMcp.enable": "啟用 GUI MCP",
"Claw.Settings.guiMcp.enableDesc": "桌面自動化視覺操作服務",
"Claw.Settings.guiMcp.statusEnabled": "已啟用",
"Claw.Settings.guiMcp.statusDisabled": "已停用",
"Claw.Settings.system.title": "系統",
"Claw.Settings.system.autoLaunch": "開機自動啟動",
"Claw.Settings.system.autoLaunchDesc": "系統啟動時自動運行 {appName}",
"Claw.Settings.system.theme": "主題",
"Claw.Settings.system.themeDesc": "選擇介面配色方案",
"Claw.Settings.system.themeSystem": "跟隨系統",
"Claw.Settings.system.themeLight": "亮色",
"Claw.Settings.system.themeDark": "暗色",
"Claw.Settings.system.appDataDir": "應用資料目錄",
"Claw.Settings.system.logDir": "日誌目錄",
"Claw.Settings.system.loading": "載入中...",
"Claw.Settings.system.workspaceDir": "工作空間目錄",
"Claw.Settings.system.notSet": "未設定",
"Claw.Settings.system.open": "開啟",
"Claw.Settings.system.language": "語言",
"Claw.Settings.system.languageDesc": "選擇介面顯示語言",
"Claw.Settings.system.langEnglish": "English",
"Claw.Settings.system.langChinese": "简体中文",
"Claw.Settings.system.langChineseTW": "繁體中文(台灣)",
"Claw.Settings.system.langChineseHK": "繁體中文(香港)",
"Claw.Settings.messages.languageChanged": "語言切換成功,正在重新整理...",
"Claw.Settings.messages.languageChangeFailed": "語言切換失敗",
"Claw.Settings.languageConfirm.title": "切換語言",
"Claw.Settings.languageConfirm.content": "切換語言將重啟應用並中斷正在運行的服務,是否繼續?",
"Claw.Settings.languageConfirm.ok": "切換",
"Claw.Settings.languageConfirm.cancel": "取消",
"Claw.Settings.dialog.selectWorkspace": "選擇工作區目錄",
"Claw.Settings.messages.saveConfig": "儲存配置",
"Claw.Settings.messages.saveConfigConfirm": "儲存後需要重啟服務才能生效,確定儲存嗎?",
"Claw.Settings.messages.autoLaunchEnabled": "已開啟開機自動啟動",
"Claw.Settings.messages.autoLaunchDisabled": "已關閉開機自動啟動",
"Claw.Settings.messages.workspaceNotConfigured": "未配置工作空間目錄",
"Claw.Settings.messages.openWorkspaceFailed": "打開工作空間目錄失敗",
"Claw.Settings.messages.sandboxPolicyUpdated": "沙箱策略已更新",
"Claw.Settings.messages.updateSandboxPolicyFailed": "更新沙箱策略失敗",
"Claw.Settings.messages.sandboxLinuxNotAvailableYet": "Linux 平台 Sandbox 暫未開放",
"Claw.Settings.guiMcp.messages.enableSuccess": "GUI MCP 已啟用",
"Claw.Settings.guiMcp.messages.disableSuccess": "GUI MCP 已停用",
"Claw.Settings.guiMcp.messages.updateFailed": "更新 GUI MCP 設置失敗",
"Claw.Settings.messages.settingFailed": "設置失敗",
"Claw.Client.startSession": "開始會話",
"Claw.Client.login": "登錄",
"Claw.Client.logout": "退出",
"Claw.Client.cancel": "取消",
"Claw.Client.defaultUser": "用戶",
"Claw.Client.loginHint": "支援用戶名、郵箱、手機號登錄",
"Claw.Client.starting": "啟動中",
"Claw.Client.stopping": "停止中",
"Claw.Client.running": "執行中",
"Claw.Client.stopped": "已停止",
"Claw.Client.stop": "停止",
"Claw.Client.start": "啟動",
"Claw.Client.goInstall": "前往安裝",
"Claw.Client.settings": "設定",
"Claw.Client.dependencies": "依賴",
"Claw.Client.about": "關於",
"Claw.Client.accountStatus": "帳號狀態",
"Claw.Client.services": "服務",
"Claw.Client.refresh": "重新整理",
"Claw.Client.startAll": "啟動全部",
"Claw.Client.stopAll": "停止全部",
"Claw.Client.quickActions": "快捷操作",
"Claw.Client.serviceStartFailed": "{0} 啟動失敗: {1}",
"Claw.Client.stopFailed": "停止失敗: {0}",
"Claw.MCP.title": "MCP Proxy 服務管理",
"Claw.MCP.status.ready": "就緒",
"Claw.MCP.status.notReady": "未就緒",
"Claw.MCP.status.serverCount": "個 Server",
"Claw.MCP.checkAvailability": "檢測可用性",
"Claw.MCP.serverManagement.title": "MCP Servers 配置",
"Claw.MCP.serverManagement.noServers": "暫無 MCP Server 配置",
"Claw.MCP.serverManagement.confirmRemove": "確定移除?",
"Claw.MCP.transport.sse": "SSE",
"Claw.MCP.transport.http": "HTTP",
"Claw.MCP.transport.stdio": "stdio",
"Claw.MCP.transport.auto": "自動偵測",
"Claw.MCP.transport.streamableHttp": "Streamable HTTP",
"Claw.MCP.addServer.url": "URL",
"Claw.MCP.addServer.argsPlaceholder": "參數",
"Claw.MCP.addServer.idPlaceholder": "Server ID如 my-mcp-server",
"Claw.MCP.addServer.stdio": "命令列 (stdio)",
"Claw.MCP.addServer.remote": "遠端 URL (HTTP/SSE)",
"Claw.MCP.addServer.commandPlaceholder": "命令",
"Claw.MCP.addServer.argsPlaceholderFull": "參數(如 -y chrome-devtools-mcp@latest",
"Claw.MCP.addServer.urlPlaceholder": "URL如 https://example.com/mcp",
"Claw.MCP.addServer.authTokenPlaceholder": "AuthToken選填",
"Claw.MCP.addServer.button": "新增 MCP Server",
"Claw.MCP.addServer.idRequired": "請輸入 Server ID",
"Claw.MCP.addServer.argsRequired": "請輸入參數",
"Claw.MCP.message.serverAdded": "已新增,記得儲存配置",
"Claw.MCP.message.serverRemoved": "已移除,記得儲存配置",
"Claw.MCP.toolFilter.title": "工具過濾",
"Claw.MCP.toolFilter.none": "不過濾",
"Claw.MCP.toolFilter.allowList": "白名單",
"Claw.MCP.toolFilter.denyList": "黑名單",
"Claw.MCP.toolFilter.allowPlaceholder": "輸入允許的工具名稱,以逗號分隔(如 generate_bar_chart, generate_column_chart",
"Claw.MCP.toolFilter.denyPlaceholder": "輸入排除的工具名稱,以逗號分隔(如 screenshot, navigate",
"Claw.MCP.toolFilter.hintNone": "載入所有 MCP Server 提供的工具",
"Claw.MCP.toolFilter.hintAllow": "僅載入白名單中的工具,其他全部排除",
"Claw.MCP.toolFilter.hintDeny": "排除黑名單中的工具,其他全部載入",
"Claw.MCP.saveConfig": "儲存配置",
"Claw.MCP.saveConfigHint": "配置修改後需儲存Agent 下次初始化時自動生效",
"Claw.MCP.message.configSaved": "MCP 配置已儲存",
"Claw.MCP.message.proxyReady": "MCP Proxy 就緒",
"Claw.MCP.message.checkFailed": "檢測失敗: {0}",
"Claw.MCP.message.error": "錯誤: {0}",
"Claw.Common.saveFailed": "儲存失敗",
"Claw.Process.exitImmediately": "進程啟動後立即退出",
"Claw.Sandbox.workspaceNotFound": "工作區未找到: {0}",
"Claw.Lanproxy.missingServerConfig": "缺少伺服器設定",
"Claw.Permissions.command": "命令",
"Claw.Permissions.envVars": "環境變量",
"Claw.Permissions.file": "檔案",
"Claw.Permissions.tool": "工具",
"Claw.Permissions.second": "秒",
"Claw.Permissions.deny": "拒絕",
"Claw.Permissions.allowOnce": "本次允許",
"Claw.Permissions.allowAlways": "始終允許",
"Claw.Permissions.url": "URL",
"Claw.PermissionRules.defaultToolRead": "讀取檔案",
"Claw.PermissionRules.defaultToolEdit": "編輯檔案",
"Claw.PermissionRules.defaultBash": "Bash 命令",
"Claw.PermissionRules.defaultNetwork": "網路請求",
"Claw.PermissionRules.defaultFileRead": "檔案讀取",
"Claw.PermissionRules.defaultFileWrite": "檔案寫入",
"Claw.PermissionsPage.granted": "已授權",
"Claw.PermissionsPage.denied": "未授權",
"Claw.PermissionsPage.unknown": "未知",
"Claw.PermissionsPage.title": "系統授權",
"Claw.PermissionsPage.description": "以下權限可能影響應用的正常運行,請根據需要授權",
"Claw.PermissionsPage.refresh": "重新整理",
"Claw.PermissionsPage.openSettings": "前往設定",
"Claw.PermissionsPage.allGranted": "所有權限已授權",
"Claw.PermissionsPage.cannotOpenSettings": "無法打開系統設定",
"Claw.PermissionsPage.macosAccessibility": "輔助功能",
"Claw.PermissionsPage.macosAccessibilityDesc": "允許應用程式控制您的電腦",
"Claw.PermissionsPage.macosScreenRecording": "螢幕錄製",
"Claw.PermissionsPage.macosScreenRecordingDesc": "允許應用程式錄製螢幕內容",
"Claw.PermissionsPage.macosFullDiskAccess": "完整磁碟取用",
"Claw.PermissionsPage.macosFullDiskAccessDesc": "允許應用程式取用所有檔案",
"Claw.Sandbox.unavailable": "沙箱環境不可用,請檢查沙箱配置",
"Claw.Sandbox.unavailableWithType": "沙箱不可用: {0}",
"Claw.Sandbox.dockerUnavailable": "Docker 不可用,請確保 Docker Desktop 已安裝並執行",
"Claw.Sandbox.helperUnavailable": "沙箱 Helper 不可用,請確認 qiming-sandbox-helper 已正確安裝",
"Claw.Sandbox.workspaceExists": "工作區已存在: {0}",
"Claw.Sandbox.workspaceCreateFailed": "工作區創建失敗,請檢查磁盤空間和權限",
"Claw.Sandbox.workspaceDestroyFailed": "工作區銷毀失敗,請手動清理",
"Claw.Sandbox.workspaceInvalidState": "工作區狀態無效,請重試或重新創建工作區",
"Claw.Sandbox.executionFailed": "命令執行失敗",
"Claw.Sandbox.executionTimeout": "命令執行超時",
"Claw.Sandbox.executionBlocked": "命令被安全策略攔截",
"Claw.Sandbox.commandNotFound": "命令未找到",
"Claw.Sandbox.fileNotFound": "文件未找到",
"Claw.Sandbox.fileWriteFailed": "文件寫入失敗",
"Claw.Sandbox.fileReadFailed": "文件讀取失敗",
"Claw.Sandbox.fileDeleteFailed": "文件刪除失敗",
"Claw.Sandbox.directoryOperationFailed": "目錄操作失敗",
"Claw.Sandbox.cleanupFailed": "清理失敗",
"Claw.Sandbox.cleanupTimeout": "清理超時",
"Claw.Sandbox.configInvalid": "配置無效",
"Claw.Sandbox.configMissing": "配置缺失",
"Claw.Sandbox.containerOperationFailed": "容器操作失敗",
"Claw.Sandbox.containerStartFailed": "容器啟動失敗",
"Claw.Sandbox.containerStopFailed": "容器停止失敗",
"Claw.Sandbox.resourceInsufficient": "資源不足",
"Claw.Sandbox.outOfMemory": "記憶體不足",
"Claw.Sandbox.outOfDiskSpace": "磁盤空間不足",
"Claw.Sandbox.unknownError": "未知錯誤",
"Claw.Sandbox.helperReady": "Windows Sandbox helper 就緒",
"Claw.GUIAgent.entryNotFound": "agent-gui-server 入口檔案未找到,請先執行 npm run prepare:gui-server",
"Claw.GUIAgent.nodeNotFound": "Node.js 未找到GUI Agent Server 無法啟動",
"Claw.GUIAgent.missingApiKey": "未找到 API KeyGUI Agent Server 可能無法正常運作",
"Claw.MCP.notInstalled": "qiming-mcp-stdio-proxy 未安裝,請先在依賴管理中安裝或確保已 npm install",
"Claw.MCP.entryNotFound": "qiming-mcp-stdio-proxy 入口檔案未找到",
"Claw.MCP.discoverTools": "發現工具",
"Claw.MCP.discoveredTools": "已發現工具",
"Claw.MCP.tools": "工具",
"Claw.MCP.message.toolsDiscovered": "已發現 {0} 個工具",
"Claw.MCP.message.discoveryFailed": "工具發現失敗:{0}",
"Claw.MCP.message.discoveryError": "工具發現錯誤:{0}",
"Claw.MCP.batch.operations": "批次操作",
"Claw.MCP.batch.enableAll": "全部啟用",
"Claw.MCP.batch.disableAll": "全部停用",
"Claw.MCP.batch.discoverAll": "批次發現工具",
"Claw.MCP.batch.discovering": "正在批次發現工具...",
"Claw.MCP.batch.enableAllSuccess": "已全部啟用",
"Claw.MCP.batch.disableAllSuccess": "已全部停用",
"Claw.MCP.batch.discoverAllSuccess": "批次發現完成:{0}/{1} 成功",
"Claw.MCP.importExport.export": "匯出配置",
"Claw.MCP.importExport.import": "匯入配置",
"Claw.MCP.importExport.exportSuccess": "配置已匯出至:{0}",
"Claw.MCP.importExport.exportFailed": "匯出失敗:{0}",
"Claw.MCP.importExport.exportError": "匯出錯誤:{0}",
"Claw.MCP.importExport.exportWarningTitle": "匯出配置確認",
"Claw.MCP.importExport.exportWarningContent": "配置檔案可能包含敏感資訊(如 API tokens、密碼等請妥善保管匯出的檔案避免洩露。",
"Claw.MCP.importExport.importConfirm": "匯入 MCP 配置",
"Claw.MCP.importExport.importStrategy": "選擇匯入策略",
"Claw.MCP.importExport.replace": "替換",
"Claw.MCP.importExport.merge": "合併",
"Claw.MCP.importExport.invalidFormat": "配置檔案格式無效",
"Claw.MCP.importExport.importSuccess": "成功匯入 {0} 個伺服器",
"Claw.MCP.importExport.importError": "匯入錯誤:{0}",
"Claw.MCP.template.selectTitle": "選擇 MCP 範本",
"Claw.MCP.template.category.all": "全部",
"Claw.MCP.template.category.file": "檔案",
"Claw.MCP.template.category.network": "網路",
"Claw.MCP.template.category.data": "資料",
"Claw.MCP.template.category.ai": "AI",
"Claw.MCP.template.category.dev": "開發",
"Claw.MCP.template.noTemplates": "無範本",
"Claw.MCP.template.fillParams": "填寫參數",
"Claw.MCP.template.paramRequired": "請填寫 {0}",
"Claw.MCP.template.addSuccess": "已新增 {0}",
"Claw.MCP.template.apply": "應用範本",
"Claw.MCP.template.params": "範本參數",
"Claw.MCP.Tools.toolCount": "工具",
"Claw.MCP.Tools.discoverTools": "發現工具",
"Claw.MCP.Tools.discoveredTools": "已發現的工具",
"Claw.MCP.addServer.fromTemplate": "從範本新增",
"Claw.MCP.addServer.custom": "自訂新增",
"Claw.MCP.editor.title": "JSON 配置編輯器",
"Claw.MCP.editor.description": "以 JSON 格式編輯 MCP 配置,支援 stdio 和 remote 伺服器類型。",
"Claw.MCP.editor.config": "配置",
"Claw.MCP.editor.placeholder": "請輸入 JSON 格式的 MCP 配置...",
"Claw.MCP.editor.parseError": "JSON 解析錯誤",
"Claw.MCP.editor.format": "格式化",
"Claw.MCP.editor.exampleTitle": "配置範例",
"Claw.MCP.editor.previewTitle": "JSON 語法高亮預覽",
"Claw.MCP.view.list": "列表模式",
"Claw.MCP.view.json": "JSON 模式",
"Claw.MCP.list.title": "MCP 服務列表(手動啟用後才生效)",
"Claw.MCP.list.enabledSummary": "已啟用 {0} / {1}",
"Claw.MCP.list.disableAll": "全部停用",
"Claw.MCP.list.disableAllSuccess": "已將所有 MCP 服務設為停用",
"Claw.MCP.list.addServer": "新增服務",
"Claw.MCP.list.edit": "編輯",
"Claw.MCP.list.test": "測試",
"Claw.MCP.list.testSuccess": "測試通過:發現 {0} 個工具",
"Claw.MCP.list.testFailed": "測試失敗:{0}",
"Claw.MCP.list.testing": "測試中...",
"Claw.MCP.editor.createTitle": "新增 MCP 服務",
"Claw.MCP.editor.editTitle": "編輯 MCP 服務",
"Claw.MCP.editor.back": "返回",
"Claw.MCP.editor.tabForm": "表單",
"Claw.MCP.editor.tabJson": "JSON",
"Claw.MCP.editor.jsonHint": "貼上單條服務配置 {\"server-name\": {...}} 或完整的 mcpServers 配置",
"Claw.MCP.switch.enable": "啟用",
"Claw.MCP.switch.disable": "停用",
"Claw.MCP.addServer.modalTitle": "新增 MCP 服務",
"Claw.MCP.addServer.type": "服務類型",
"Claw.MCP.addServer.serverId": "服務 ID",
"Claw.MCP.addServer.add": "添加",
"Claw.MCP.addServer.idDuplicate": "服務 ID 已存在,請使用其他名稱",
"Claw.MCP.addServer.commandRequired": "stdio 模式需要填寫 command",
"Claw.MCP.addServer.urlRequired": "remote 模式需要填寫 URL",
"Claw.MCP.addServer.argsInvalid": "Args 格式無效。請使用 JSON 陣列(如 [\"-y\",\"pkg\"])或帶引號的 shell 參數。",
"Claw.MCP.addServer.addSuccess": "服務已新增(預設停用,請手動啟用)",
"Claw.MCP.addServer.argsPlaceholderAdvanced": "建議使用 JSON 陣列,例如 [\"-y\",\"@modelcontextprotocol/server-filesystem\",\"/path with space\"]",
"Claw.MCP.message.invalidJson": "JSON 格式無效,請檢查後重試",
"Claw.MCP.message.formatted": "格式化成功",
"Claw.MCP.message.formatFailed": "格式化失敗",
"Claw.MCP.status.running": "執行中",
"Claw.MCP.status.stopped": "已停止",
"Claw.MCP.action.start": "啟動",
"Claw.MCP.action.restart": "重新啟動",
"Claw.LogViewer.title": "應用日誌",
"Claw.LogViewer.autoScroll": "自動捲動",
"Claw.LogViewer.all": "全部",
"Claw.LogViewer.refresh": "重新整理",
"Claw.LogViewer.openDir": "開啟目錄",
"Claw.LogViewer.noLogs": "暫無日誌",
"Claw.LogViewer.scrollToLoadMore": "向上捲動載入更早日誌",
"Claw.LogViewer.totalLogs": "共 {0} 條日誌",
"Claw.LogViewer.autoScrollEnabled": "自動捲動已開啟"
}

View File

@@ -0,0 +1,254 @@
/**
* MCP 配置模板
* 预置常用 MCP 服务器配置,方便用户快速添加
*/
export interface McpTemplate {
id: string;
name: string;
description: string;
category: "file" | "network" | "data" | "ai" | "dev" | "other";
icon?: string;
config: {
command: string;
args: string[];
env?: Record<string, string>;
};
// 需要用户填写的参数如路径、token 等)
requiredParams?: {
key: string;
label: string;
placeholder: string;
type: "text" | "path" | "password";
defaultValue?: string;
}[];
}
export const MCP_TEMPLATES: McpTemplate[] = [
{
id: "filesystem",
name: "Filesystem",
description: "读写本地文件系统",
category: "file",
icon: "📁",
config: {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-filesystem", "{path}"],
},
requiredParams: [
{
key: "path",
label: "文件系统路径",
placeholder: "/Users/username/workspace",
type: "path",
defaultValue: "",
},
],
},
{
id: "github",
name: "GitHub",
description: "访问 GitHub 仓库、Issues、PRs",
category: "dev",
icon: "🐙",
config: {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-github"],
env: {
GITHUB_PERSONAL_ACCESS_TOKEN: "{token}",
},
},
requiredParams: [
{
key: "token",
label: "GitHub Personal Access Token",
placeholder: "ghp_xxxxxxxxxxxx",
type: "password",
},
],
},
{
id: "slack",
name: "Slack",
description: "发送 Slack 消息、读取频道",
category: "network",
icon: "💬",
config: {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-slack"],
env: {
SLACK_BOT_TOKEN: "{token}",
},
},
requiredParams: [
{
key: "token",
label: "Slack Bot Token",
placeholder: "xoxb-xxxxxxxxxxxx",
type: "password",
},
],
},
{
id: "sqlite",
name: "SQLite",
description: "查询 SQLite 数据库",
category: "data",
icon: "🗄️",
config: {
command: "uvx",
args: ["mcp-server-sqlite", "--db-path", "{dbPath}"],
},
requiredParams: [
{
key: "dbPath",
label: "数据库文件路径",
placeholder: "/path/to/database.db",
type: "path",
},
],
},
{
id: "fetch",
name: "Fetch",
description: "HTTP 请求工具",
category: "network",
icon: "🌐",
config: {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-fetch"],
},
},
{
id: "postgres",
name: "PostgreSQL",
description: "查询 PostgreSQL 数据库",
category: "data",
icon: "🐘",
config: {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-postgres"],
env: {
POSTGRES_CONNECTION_STRING: "{connectionString}",
},
},
requiredParams: [
{
key: "connectionString",
label: "PostgreSQL 连接字符串",
placeholder: "postgresql://user:password@localhost:5432/dbname",
type: "password",
},
],
},
{
id: "puppeteer",
name: "Puppeteer",
description: "浏览器自动化",
category: "dev",
icon: "🎭",
config: {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-puppeteer"],
},
},
{
id: "brave-search",
name: "Brave Search",
description: "Brave 搜索引擎",
category: "network",
icon: "🔍",
config: {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-brave-search"],
env: {
BRAVE_API_KEY: "{apiKey}",
},
},
requiredParams: [
{
key: "apiKey",
label: "Brave Search API Key",
placeholder: "BSA_xxxxxxxxxxxx",
type: "password",
},
],
},
{
id: "google-maps",
name: "Google Maps",
description: "地图和地理位置服务",
category: "network",
icon: "🗺️",
config: {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-google-maps"],
env: {
GOOGLE_MAPS_API_KEY: "{apiKey}",
},
},
requiredParams: [
{
key: "apiKey",
label: "Google Maps API Key",
placeholder: "AIzaSyxxxxxxxxxx",
type: "password",
},
],
},
{
id: "memory",
name: "Memory",
description: "持久化记忆存储",
category: "ai",
icon: "🧠",
config: {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-memory"],
},
},
];
/**
* 根据分类获取模板
*/
export function getTemplatesByCategory(category?: string): McpTemplate[] {
if (!category) return MCP_TEMPLATES;
return MCP_TEMPLATES.filter((t) => t.category === category);
}
/**
* 根据 ID 获取模板
*/
export function getTemplateById(id: string): McpTemplate | undefined {
return MCP_TEMPLATES.find((t) => t.id === id);
}
/**
* 应用模板参数,生成最终配置
*/
export function applyTemplateParams(
template: McpTemplate,
params: Record<string, string>,
): { command: string; args: string[]; env?: Record<string, string> } {
const config = { ...template.config };
// 替换 args 中的占位符
config.args = config.args.map((arg) =>
arg.replace(/\{(\w+)\}/g, (_, key) => params[key] || ""),
);
// 替换 env 中的占位符
if (config.env) {
const env: Record<string, string> = {};
for (const [key, value] of Object.entries(config.env)) {
env[key] = value.replace(
/\{(\w+)\}/g,
(_, paramKey) => params[paramKey] || "",
);
}
config.env = env;
}
return config;
}

View File

@@ -0,0 +1,99 @@
/**
* 启动前端口配置 - 聚合定义与解析
*
* 所有「需检查占用的本地端口」的默认值与配置键集中在此,
* 通过 resolvePortsFromSettings(getSetting) 从任意配置源解析出当前端口,
* 供 main 进程、脚本、文档脚本共用,避免多处硬编码。
*/
import {
DEFAULT_AGENT_RUNNER_PORT,
DEFAULT_FILE_SERVER_PORT,
DEFAULT_MCP_PROXY_PORT,
DEFAULT_LANPROXY_PORT,
DEFAULT_DEV_SERVER_PORT,
STORAGE_KEYS,
} from './constants';
// ==================== 端口默认值(与 constants 保持一致,此处聚合引用) ====================
export const STARTUP_PORT_DEFAULTS = {
/** Agent / ComputerServer */
agent: DEFAULT_AGENT_RUNNER_PORT,
/** File Server */
fileServer: DEFAULT_FILE_SERVER_PORT,
/** MCP Proxy */
mcp: DEFAULT_MCP_PROXY_PORT,
/** Lanproxy 相关本地端口(如 Agent Runner 代理) */
lanproxyLocal: DEFAULT_LANPROXY_PORT,
/** Vite 开发服务器(仅开发模式) */
vite: DEFAULT_DEV_SERVER_PORT,
} as const;
export type StartupPorts = {
agent: number;
fileServer: number;
mcp: number;
lanproxyLocal: number;
vite: number;
};
/** 本地需检查占用的服务名(用于日志/脚本输出) */
export const STARTUP_PORT_LABELS: Record<keyof StartupPorts, string> = {
agent: 'Agent(ComputerServer)',
fileServer: 'FileServer',
mcp: 'MCP Proxy',
lanproxyLocal: 'Lanproxy',
vite: 'Vite',
};
// ==================== 从配置解析端口(聚合逻辑) ====================
export type GetSettingFn = (key: string) => unknown;
/**
* 从任意配置源解析出当前应使用的端口(不依赖 main/db可被 main、脚本、测试复用
* @param getSetting 读配置函数,如 main 的 readSetting 或脚本内对 SQLite 的封装
*/
export function resolvePortsFromSettings(getSetting: GetSettingFn): StartupPorts {
const step1 = getSetting(STORAGE_KEYS.STEP1_CONFIG) as { agentPort?: number; fileServerPort?: number } | null;
const agent = step1?.agentPort ?? STARTUP_PORT_DEFAULTS.agent;
const fileServer = step1?.fileServerPort ?? STARTUP_PORT_DEFAULTS.fileServer;
const mcpRaw = getSetting(STORAGE_KEYS.MCP_PROXY_PORT);
const mcp =
typeof mcpRaw === 'number' && Number.isInteger(mcpRaw)
? mcpRaw
: typeof mcpRaw === 'string'
? (parseInt(mcpRaw, 10) || STARTUP_PORT_DEFAULTS.mcp)
: STARTUP_PORT_DEFAULTS.mcp;
return {
agent,
fileServer,
mcp,
lanproxyLocal: STARTUP_PORT_DEFAULTS.lanproxyLocal,
vite: STARTUP_PORT_DEFAULTS.vite,
};
}
/**
* 返回需要做占用检查的端口列表(名称 + 端口),便于统一 lsof 检查或释放
* @param ports 已解析的端口对象
* @param includeVite 是否包含 Vite仅开发模式需要
*/
export function getPortsToCheck(
ports: StartupPorts,
includeVite: boolean
): Array<{ name: keyof StartupPorts; label: string; port: number }> {
const list: Array<{ name: keyof StartupPorts; label: string; port: number }> = [
{ name: 'agent', label: STARTUP_PORT_LABELS.agent, port: ports.agent },
{ name: 'fileServer', label: STARTUP_PORT_LABELS.fileServer, port: ports.fileServer },
{ name: 'mcp', label: STARTUP_PORT_LABELS.mcp, port: ports.mcp },
{ name: 'lanproxyLocal', label: STARTUP_PORT_LABELS.lanproxyLocal, port: ports.lanproxyLocal },
];
if (includeVite) {
list.push({ name: 'vite', label: STARTUP_PORT_LABELS.vite, port: ports.vite });
}
return list;
}

View File

@@ -0,0 +1,162 @@
/**
* Computer API 共享类型(对齐 rcoder /computer/* API
*
* 这些类型在主进程unifiedAgent、computerServer、main和渲染端electron.d.ts共用
* 集中定义在此文件中避免重复和漂移。
*/
// 对应 rcoder HttpResult<T> 响应包装
export interface HttpResult<T = unknown> {
code: string; // "0000" = 成功,其他为错误码
message: string; // 状态描述
data: T | null; // 实际数据
tid: string | null; // trace IDElectron 端始终为 null
success: boolean; // code === "0000"
}
// 对应 rcoder ChatContextServerConfigMCP 服务器配置)
export interface ChatContextServerConfig {
source?: string;
enabled?: boolean;
command?: string;
args?: string[];
env?: Record<string, string>;
}
// 对应 rcoder ChatAgentConfig
export interface ChatAgentConfig {
agent_server?: {
agent_id?: string;
command?: string;
args?: string[];
env?: Record<string, string>;
metadata?: Record<string, string>;
};
context_servers?: Record<string, ChatContextServerConfig>;
}
// 对应 rcoder ModelProviderConfig
export interface ModelProviderConfig {
/** 提供商名称 (如: anthropic, openai, qwen 等) */
provider: string;
/** API 密钥 */
api_key?: string;
/** API 基础 URL */
base_url?: string;
/** 默认模型名称 */
model?: string;
/** 默认模型名称 (别名) */
default_model?: string;
/** 模型接口协议类型 (anthropic/openai),默认为 openai */
api_protocol?: string;
/** 模型配置 ID */
id?: string;
/** 模型配置名称 */
name?: string;
/** 是否需要 OpenAI 认证 */
requires_openai_auth?: boolean;
}
// 对应 rcoder ComputerChatRequest
export interface ComputerChatRequest {
user_id: string;
project_id?: string;
prompt: string;
session_id?: string;
model_provider?: ModelProviderConfig;
request_id?: string;
system_prompt?: string;
agent_config?: ChatAgentConfig;
// 记忆相关字段
original_user_prompt?: string; // 原始用户提示词(纯净用户输入,不含系统提示)
open_long_memory?: boolean; // 是否开启长期记忆(默认 false
}
// 对应 rcoder ChatResponseHttpResult.data 的内容,不含 success
export interface ComputerChatResponse {
project_id: string;
session_id: string;
error?: string | null;
request_id?: string;
is_new_session?: boolean;
need_fallback?: boolean | null;
fallback_reason?: string | null;
}
// 对应 rcoder UnifiedSessionMessageSSE 进度事件)
// 字段名使用 camelCase 对齐 rcoder #[serde(rename_all = "camelCase")]
export interface UnifiedSessionMessage {
sessionId: string;
acpSessionId?: string; // ACP protocol session ID (UUID), used for SSE push
messageType:
| "sessionPromptStart"
| "sessionPromptEnd"
| "agentSessionUpdate"
| "heartbeat";
subType: string;
data: unknown;
timestamp: string;
}
// 对应 rcoder ComputerAgentStatusResponse
export interface ComputerAgentStatusResponse {
user_id: string;
project_id: string;
is_alive: boolean;
session_id?: string | null;
status?: string | null;
last_activity?: string | null;
created_at?: string | null;
}
// 对应 rcoder ComputerAgentStopResponse
export interface ComputerAgentStopResponse {
success: boolean;
message: string;
user_id: string;
project_id: string;
}
// 对应 rcoder ComputerAgentCancelResponse
export interface ComputerAgentCancelResponse {
success: boolean;
session_id: string;
}
// GUI Agent 视觉模型配置
export interface GuiVisionModelConfig {
/** 视觉模型提供商 (anthropic, openai, google, zhipu, qwen, deepseek, minimax, 或自定义) */
provider: string;
/** API 协议类型: anthropic (x-api-key + /v1/messages) 或 openai (Bearer + /chat/completions) */
apiProtocol: "anthropic" | "openai";
/** 视觉模型名称 (预设模型或自定义模型 ID) */
model: string;
/** API Key (可选,未设置时使用全局 API Key) */
apiKey?: string;
/** API 基础 URL (可选,自定义提供商必填) */
baseUrl?: string;
/** 目标显示器索引 */
displayIndex: number;
/** 坐标模式 (auto=根据模型自动匹配, image-absolute, normalized-1000, normalized-999, normalized-0-1) */
coordinateMode: string;
/** 记忆模型提供商 (可选,默认同 provider) */
memoryProvider?: string;
/** 记忆模型名称 (可选,默认同 model) */
memoryModel?: string;
/** 每步延迟 (ms) */
stepDelayMs?: number;
/** 最大步数 */
maxSteps?: number;
/** JPEG 质量 */
jpegQuality?: number;
}
// GUI Agent 显示器信息
export interface GuiDisplayInfo {
index: number;
label: string;
width: number;
height: number;
scaleFactor: number;
isPrimary: boolean;
}

View File

@@ -0,0 +1,751 @@
// Type definitions for Electron API exposed via preload
export type McpServerEntry =
| {
command: string;
args: string[];
env?: Record<string, string>;
enabled?: boolean;
discoveredTools?: string[];
persistent?: boolean;
allowTools?: string[];
denyTools?: string[];
}
| {
url: string;
transport?: "streamable-http" | "sse";
headers?: Record<string, string>;
authToken?: string;
enabled?: boolean;
discoveredTools?: string[];
allowTools?: string[];
denyTools?: string[];
};
export interface McpServersConfig {
mcpServers: Record<string, McpServerEntry>;
allowTools?: string[];
denyTools?: string[];
}
export interface McpProxyStatus {
running: boolean;
serverCount?: number;
serverNames?: string[];
error?: string;
}
export interface MCPAPI {
start: () => Promise<{ success: boolean; error?: string }>;
stop: () => Promise<{ success: boolean; error?: string }>;
restart: () => Promise<{ success: boolean; error?: string }>;
status: () => Promise<McpProxyStatus>;
getConfig: () => Promise<McpServersConfig>;
setConfig: (
config: McpServersConfig,
) => Promise<{ success: boolean; error?: string }>;
discoverTools: (serverId: string) => Promise<{
success: boolean;
tools?: string[];
error?: string;
}>;
exportConfig: () => Promise<{
success: boolean;
filePath?: string;
error?: string;
}>;
/** @deprecated no-op, port is no longer used */
getPort: () => Promise<number>;
/** @deprecated no-op, port is no longer used */
setPort: (port: number) => Promise<{ success: boolean; error?: string }>;
}
export interface LanproxyAPI {
start: (config: {
serverIp: string;
serverPort: number;
clientKey: string;
ssl?: boolean;
}) => Promise<{ success: boolean; error?: string }>;
stop: () => Promise<{ success: boolean; error?: string }>;
status: () => Promise<{ running: boolean; pid?: number; error?: string }>;
/** 当前平台是否有 lanproxy 二进制(用于设置页提示「当前平台暂不支持」) */
isAvailable: () => Promise<{ available: boolean }>;
}
export interface AgentRunnerAPI {
start: (config: {
binPath: string;
backendPort: number;
proxyPort: number;
apiKey: string;
apiBaseUrl: string;
defaultModel: string;
}) => Promise<{ success: boolean; error?: string }>;
stop: () => Promise<{ success: boolean; error?: string }>;
status: () => Promise<{
running: boolean;
pid?: number;
backendUrl?: string;
proxyUrl?: string;
}>;
}
import type {
SandboxStatus,
SandboxPolicy,
SandboxCapabilities,
} from "./sandbox";
export interface SandboxAPI {
status: () => Promise<{
success: boolean;
data?: SandboxStatus;
error?: string;
code?: string;
}>;
getPolicy: () => Promise<{
success: boolean;
data?: SandboxPolicy;
error?: string;
code?: string;
}>;
setPolicy: (patch: Partial<SandboxPolicy>) => Promise<{
success: boolean;
data?: SandboxPolicy;
error?: string;
code?: string;
}>;
capabilities: () => Promise<{
success: boolean;
data?: SandboxCapabilities;
error?: string;
code?: string;
}>;
setup: () => Promise<{
success: boolean;
data?: { success: boolean; message?: string };
error?: string;
code?: string;
}>;
}
export interface FileServerAPI {
start: (port?: number) => Promise<{ success: boolean; error?: string }>;
stop: () => Promise<{ success: boolean; error?: string }>;
status: () => Promise<{ running: boolean; pid?: number; error?: string }>;
}
export interface ComputerServerAPI {
start: (port?: number) => Promise<{ success: boolean; error?: string }>;
stop: () => Promise<{ success: boolean; error?: string }>;
status: () => Promise<{ running: boolean; port?: number; error?: string }>;
}
export interface GuiServerAPI {
start: () => Promise<{ success: boolean; error?: string }>;
stop: () => Promise<{ success: boolean; error?: string }>;
status: () => Promise<{ running: boolean; pid?: number; error?: string }>;
isEnabled: () => Promise<{ enabled: boolean; reason?: string }>;
setEnabled: (
enabled: boolean,
) => Promise<{ success: boolean; error?: string }>;
}
export interface AdminServerAPI {
start: (port?: number) => Promise<{ success: boolean; error?: string }>;
stop: () => Promise<{ success: boolean; error?: string }>;
status: () => Promise<{ running: boolean; port?: number; error?: string }>;
}
export type DependencyStatus =
| "checking"
| "installed"
| "missing"
| "outdated"
| "installing"
| "bundled"
| "error";
export interface LocalDependencyItem {
name: string;
displayName: string;
type: "system" | "bundled" | "npm-local" | "npm-global" | "shell-installer";
description: string;
required: boolean;
minVersion?: string;
/** 初始化/安装时使用的固定版本;存在时安装或升级到该版本 */
installVersion?: string;
binName?: string;
status: DependencyStatus;
version?: string;
latestVersion?: string;
binPath?: string;
errorMessage?: string;
meetsRequirement?: boolean;
}
export interface DependenciesAPI {
checkAll: (options?: { checkLatest?: boolean }) => Promise<{
success: boolean;
results?: LocalDependencyItem[];
error?: string;
syncInProgress?: boolean;
}>;
checkNode: () => Promise<{
success: boolean;
installed?: boolean;
version?: string;
meetsRequirement?: boolean;
bundled?: boolean;
binPath?: string;
error?: string;
}>;
checkUv: () => Promise<{
success: boolean;
installed?: boolean;
version?: string;
meetsRequirement?: boolean;
bundled?: boolean;
error?: string;
}>;
/** 应用包内集成的 qiming-mcp-stdio-proxy与 Node/uv 一起在系统环境中展示 */
checkMcpProxyBundled: () => Promise<{
success: boolean;
available?: boolean;
version?: string;
error?: string;
}>;
/** 应用包内集成的 qimingcode 引擎二进制 */
checkQimingCodeBundled: () => Promise<{
success: boolean;
available?: boolean;
version?: string;
binPath?: string;
error?: string;
}>;
/** 应用包内集成的 claude-code-acp-ts */
checkClaudeCodeAcpBundled: () => Promise<{
success: boolean;
available?: boolean;
version?: string;
error?: string;
}>;
/** 应用包内集成的 qiming-file-server */
checkQimingFileServerBundled: () => Promise<{
success: boolean;
available?: boolean;
version?: string;
error?: string;
}>;
detectPackage: (
packageName: string,
binName?: string,
) => Promise<{
success: boolean;
installed?: boolean;
version?: string;
binPath?: string;
error?: string;
}>;
installPackage: (
packageName: string,
options?: { registry?: string; version?: string },
) => Promise<{
success: boolean;
version?: string;
binPath?: string;
error?: string;
}>;
installMissing: () => Promise<{
success: boolean;
results?: Array<{ name: string; success: boolean; error?: string }>;
}>;
getAppDataDir: () => Promise<string>;
getRequiredList: () => Promise<LocalDependencyItem[]>;
}
export type AgentEngine = "claude-code" | "qimingcode";
export interface EngineStartConfig {
engine: AgentEngine;
apiKey?: string;
baseUrl?: string;
model?: string;
workspaceDir?: string;
}
export interface EngineStatus {
installed: boolean;
version?: string;
running: boolean;
pid?: number;
error?: string;
}
export interface EngineAPI {
checkLocal: (engine: string) => Promise<boolean>;
checkGlobal: (engine: string) => Promise<boolean>;
getVersion: (engine: string) => Promise<string | null>;
findBinary: (engine: string) => Promise<string | null>;
install: (
engine: string,
options?: { registry?: string },
) => Promise<{ success: boolean; error?: string }>;
start: (
config: EngineStartConfig,
) => Promise<{ success: boolean; error?: string; engineId?: string }>;
stop: (engineId: string) => Promise<{ success: boolean; error?: string }>;
status: (
engineId?: string,
) => Promise<EngineStatus | Record<string, EngineStatus>>;
send: (
engineId: string,
message: string,
) => Promise<{ success: boolean; error?: string }>;
stopAll: () => Promise<{ success: boolean }>;
}
// SDK types (simplified for renderer use)
export type AgentEngineType = "qimingcode" | "claude-code";
export interface AgentInitConfig {
engine: AgentEngineType;
apiKey?: string;
baseUrl?: string;
model?: string;
workspaceDir: string;
hostname?: string;
port?: number;
timeout?: number;
engineBinaryPath?: string;
env?: Record<string, string>;
mcpServers?: Record<
string,
{ command: string; args: string[]; env?: Record<string, string> }
>;
permissionMode?: "default" | "acceptEdits" | "bypassPermissions";
systemPrompt?: string;
}
export interface SdkSession {
id: string;
parentID?: string;
title?: string;
time?: { created: number; updated?: number };
[key: string]: unknown;
}
export interface MessageWithParts {
info: unknown;
parts: unknown[];
}
export interface AgentEventPayload {
type: string;
data: unknown;
}
type ApiResult<T = unknown> = Promise<{
success: boolean;
data?: T;
error?: string;
}>;
export interface AgentAPI {
// Unified Agent SDK
init: (config: AgentInitConfig) => ApiResult;
destroy: () => ApiResult;
getEngineType: () => Promise<AgentEngineType | null>;
isReady: () => Promise<boolean>;
serviceStatus: () => Promise<{
running: boolean;
engineType?: AgentEngineType | null;
}>;
// Session management (SDK)
listSessions: () => ApiResult<SdkSession[]>;
createSession: (opts?: {
parentID?: string;
title?: string;
}) => ApiResult<SdkSession>;
getSession: (id: string) => ApiResult<SdkSession>;
deleteSession: (id: string) => ApiResult;
updateSession: (id: string, title?: string) => ApiResult<SdkSession>;
getSessionStatus: () => ApiResult<Record<string, unknown>>;
forkSession: (id: string, messageId?: string) => ApiResult<SdkSession>;
// Messages
getMessages: (
sessionId: string,
limit?: number,
) => ApiResult<MessageWithParts[]>;
getMessage: (
sessionId: string,
messageId: string,
) => ApiResult<MessageWithParts>;
// Prompt / Command / Shell
prompt: (
sessionId: string,
parts: unknown[],
opts?: unknown,
) => ApiResult<MessageWithParts>;
promptAsync: (
sessionId: string,
parts: unknown[],
opts?: unknown,
) => ApiResult;
command: (
sessionId: string,
cmd: string,
args?: string,
opts?: unknown,
) => ApiResult<MessageWithParts>;
shell: (
sessionId: string,
cmd: string,
agent?: string,
model?: unknown,
) => ApiResult<MessageWithParts>;
// Abort
abort: (sessionId: string) => ApiResult;
// Permission
respondPermission: (
sessionId: string,
permissionId: string,
response: "once" | "always" | "reject",
) => ApiResult;
// Session operations
getSessionDiff: (
sessionId: string,
messageId?: string,
) => ApiResult<unknown[]>;
revert: (
sessionId: string,
messageId: string,
partId?: string,
) => ApiResult<SdkSession>;
unrevert: (sessionId: string) => ApiResult<SdkSession>;
shareSession: (sessionId: string) => ApiResult<SdkSession>;
// Tools & Providers
listTools: (provider?: string, model?: string) => ApiResult<unknown[]>;
listProviders: () => ApiResult<unknown[]>;
// Config
getConfig: () => ApiResult<unknown>;
// File operations
findText: (pattern: string) => ApiResult<unknown[]>;
findFiles: (query: string, dirs?: boolean) => ApiResult<string[]>;
listFiles: (dirPath: string) => ApiResult<unknown[]>;
readFile: (filePath: string) => ApiResult<unknown>;
// MCP via SDK
mcpStatus: () => ApiResult<unknown>;
// Agents & Commands
listAgents: () => ApiResult<unknown[]>;
listCommands: () => ApiResult<unknown[]>;
// Claude Code specific
claudePrompt: (message: string) => ApiResult<string>;
// Sessions tab (detailed view)
listSessionsDetailed: () => ApiResult<import("./sessions").DetailedSession[]>;
stopSession: (sessionId: string) => ApiResult;
// SSE Event listening
onEvent: (
callback: (event: unknown, data: AgentEventPayload) => void,
) => void;
offEvent: (
callback: (event: unknown, data: AgentEventPayload) => void,
) => void;
}
export interface AutolaunchAPI {
get: () => Promise<boolean>;
set: (enabled: boolean) => Promise<{ success: boolean; error?: string }>;
}
export interface LogEntry {
timestamp: string;
level: "info" | "warn" | "error" | "debug";
message: string;
}
export interface LogAPI {
getDir: () => Promise<string>;
openDir: () => Promise<{ success: boolean; error?: string }>;
list: (count?: number, offset?: number) => Promise<LogEntry[]>;
write: (
level: "info" | "warn" | "error",
message: string,
...args: unknown[]
) => Promise<void>;
}
import type { UpdateInfo, UpdateState } from "./updateTypes";
export interface AppAPI {
checkUpdate: () => Promise<UpdateInfo>;
getVersion: () => Promise<string>;
downloadUpdate: () => Promise<{ success: boolean; error?: string }>;
installUpdate: () => Promise<{ success: boolean; error?: string }>;
getUpdateState: () => Promise<UpdateState>;
openReleasesPage: () => Promise<{ success: boolean }>;
getUpdateDebugInfo: () => Promise<{
success: boolean;
platform?: string;
arch?: string;
isPackaged?: boolean;
appVersion?: string;
appName?: string;
installerType?: string;
canAutoUpdate?: boolean;
appDir?: string | null;
exePath?: string;
uninstallerFiles?: string[];
totalAppFiles?: number;
error?: string;
}>;
getDeviceId: () => Promise<string>;
}
export type PermissionStatus = "granted" | "denied" | "unknown";
export interface PermissionItem {
key: string;
name: string;
description: string;
status: PermissionStatus;
}
export interface PermissionsAPI {
check: () => Promise<PermissionItem[]>;
openSettings: (
permissionKey: string,
) => Promise<{ success: boolean; error?: string }>;
}
export interface ShellAPI {
openExternal: (url: string) => Promise<{ success: boolean; error?: string }>;
openPath: (
targetPath: string,
) => Promise<{ success: boolean; error?: string }>;
}
// ==================== Computer API (rcoder /computer/* compat) ====================
// Shared types — single source of truth
export type {
HttpResult,
ComputerChatRequest,
ComputerChatResponse,
UnifiedSessionMessage,
ComputerAgentStatusResponse,
ComputerAgentStopResponse,
ComputerAgentCancelResponse,
} from "./computerTypes";
import type {
HttpResult,
ComputerChatRequest,
ComputerChatResponse,
UnifiedSessionMessage,
ComputerAgentStatusResponse,
ComputerAgentStopResponse,
ComputerAgentCancelResponse,
} from "./computerTypes";
export interface ComputerAPI {
chat(request: ComputerChatRequest): Promise<HttpResult<ComputerChatResponse>>;
agentStatus(request: {
user_id: string;
project_id?: string;
}): Promise<HttpResult<ComputerAgentStatusResponse>>;
agentStop(request: {
user_id: string;
project_id?: string;
}): Promise<HttpResult<ComputerAgentStopResponse>>;
cancelSession(request: {
user_id: string;
project_id?: string;
session_id?: string;
}): Promise<HttpResult<ComputerAgentCancelResponse>>;
health(): Promise<{
status: string;
engineType?: string | null;
timestamp: string;
}>;
onProgress(
callback: (event: unknown, data: UnifiedSessionMessage) => void,
): void;
offProgress(
callback: (event: unknown, data: UnifiedSessionMessage) => void,
): void;
}
export interface ServicesAPI {
restartAll: () => Promise<{
success: boolean;
results?: Record<string, { success: boolean; error?: string }>;
}>;
stopAll: () => Promise<{
success: boolean;
results?: Record<string, { success: boolean; error?: string }>;
}>;
}
export type TrayStatus = "running" | "stopped" | "error" | "starting";
export interface TrayAPI {
updateStatus: (status: TrayStatus) => Promise<void>;
updateServicesStatus: (running: boolean) => Promise<void>;
}
export interface MirrorPresets {
npm: { official: string; taobao: string; tencent: string };
uv: { official: string; tuna: string; aliyun: string; tencent: string };
}
export interface MirrorAPI {
get: () => Promise<{
success: boolean;
npmRegistry: string;
uvIndexUrl: string;
presets: MirrorPresets;
}>;
set: (config: {
npmRegistry?: string;
uvIndexUrl?: string;
}) => Promise<{ success: boolean; error?: string }>;
}
export interface PerfAPI {
/** Fire-and-forget将 PERF 日志发送到主进程写入 perf.YYYY-MM-DD.log */
log: (msg: string) => void;
}
export interface I18nAPI {
getLang: () => Promise<string>;
setLang: (lang: string) => Promise<{ success: boolean; error?: string }>;
}
export interface DialogAPI {
openDirectory: (title?: string) => Promise<{
success: boolean;
path?: string;
canceled?: boolean;
error?: string;
}>;
}
import type { QuickInitConfig } from "./quickInit";
export interface QuickInitAPI {
getConfig: () => Promise<QuickInitConfig | null>;
}
export interface ElectronAPI {
versions: {
node: string;
electron: string;
chrome: string;
};
session: {
setCookie: (params: {
url: string;
name: string;
value: string;
domain?: string;
httpOnly?: boolean;
secure?: boolean;
}) => Promise<{ success: boolean; error?: string }>;
removeCookie: (params: { url: string; name: string }) => Promise<{
success: boolean;
error?: string;
}>;
flushStore: () => Promise<{ success: boolean; error?: string }>;
getCookie: (params: { url: string; name: string }) => Promise<{
success: boolean;
found?: boolean;
count?: number;
cookies?: Array<{
name: string;
domain: string;
path: string;
httpOnly: boolean;
secure: boolean;
sameSite: string;
session?: boolean;
expirationDate?: number;
}>;
cookie?: {
name: string;
domain: string;
path: string;
httpOnly: boolean;
secure: boolean;
sameSite: string;
session?: boolean;
expirationDate?: number;
};
error?: string;
}>;
};
webview: {
openWindow: (params: {
url: string;
title?: string;
}) => Promise<{ success: boolean; reused?: boolean; error?: string }>;
closeWindow: () => Promise<{ success: boolean; error?: string }>;
isWindowOpen: () => Promise<boolean>;
};
settings: {
get: (key: string) => Promise<unknown>;
set: (key: string, value: unknown) => Promise<boolean>;
};
window: {
minimize: () => Promise<void>;
maximize: () => Promise<void>;
close: () => Promise<void>;
};
mcp: MCPAPI;
lanproxy: LanproxyAPI;
agentRunner: AgentRunnerAPI;
sandbox: SandboxAPI;
fileServer: FileServerAPI;
computerServer: ComputerServerAPI;
guiServer: GuiServerAPI;
adminServer: AdminServerAPI;
dependencies: DependenciesAPI;
shell: ShellAPI;
mirror: MirrorAPI;
i18n: I18nAPI;
dialog: DialogAPI;
engine: EngineAPI;
agent: AgentAPI;
computer: ComputerAPI;
services: ServicesAPI;
tray: TrayAPI;
autolaunch: AutolaunchAPI;
log: LogAPI;
app: AppAPI;
permissions: PermissionsAPI;
quickInit: QuickInitAPI;
perf: PerfAPI;
on: (channel: string, callback: (...args: unknown[]) => void) => void;
off: (channel: string, callback: (...args: unknown[]) => void) => void;
}
declare global {
interface Window {
electronAPI?: ElectronAPI;
}
}

View File

@@ -0,0 +1,14 @@
import type { BrowserWindow } from "electron";
import type { ManagedProcess } from "@main/processManager";
export interface HandlerContext {
getMainWindow: () => BrowserWindow | null;
lanproxy: ManagedProcess;
fileServer: ManagedProcess;
agentRunner: ManagedProcess;
guiServer: ManagedProcess;
readonly agentRunnerPorts: { backendPort: number; proxyPort: number } | null;
setAgentRunnerPorts: (
ports: { backendPort: number; proxyPort: number } | null,
) => void;
}

View File

@@ -0,0 +1,161 @@
/**
* Type declarations for @modelcontextprotocol/sdk subpath imports.
*
* TypeScript with moduleResolution: "node" doesn't fully support package.json "exports"
* or "typesVersions" with .js extension imports in declaration files.
* These declarations provide the types needed by the main process.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
declare module '@modelcontextprotocol/sdk/client' {
import type { Readable, Writable } from 'stream';
export interface Implementation {
name: string;
version: string;
}
export interface ClientOptions {
capabilities?: Record<string, any>;
}
export interface RequestOptions {
timeout?: number;
signal?: AbortSignal;
}
export class Client {
constructor(clientInfo: Implementation, options?: ClientOptions);
connect(transport: any, options?: RequestOptions): Promise<void>;
close(): Promise<void>;
listTools(params?: any, options?: RequestOptions): Promise<{ tools: any[] }>;
callTool(params: { name: string; arguments?: Record<string, unknown> }, resultSchema?: any, options?: RequestOptions): Promise<any>;
getServerCapabilities(): any;
}
}
declare module '@modelcontextprotocol/sdk/client/stdio.js' {
import type { Readable } from 'stream';
export interface StdioServerParameters {
command: string;
args?: string[];
env?: Record<string, string>;
stderr?: 'pipe' | 'inherit' | 'ignore';
cwd?: string;
}
export class StdioClientTransport {
constructor(server: StdioServerParameters);
start(): Promise<void>;
close(): Promise<void>;
send(message: any): Promise<void>;
get stderr(): Readable | null;
get pid(): number | null;
sessionId?: string;
onclose?: () => void;
onerror?: (error: Error) => void;
onmessage?: (message: any, extra?: any) => void;
}
}
declare module '@modelcontextprotocol/sdk/server' {
export interface Implementation {
name: string;
version: string;
}
export interface ServerOptions {
capabilities?: {
tools?: Record<string, any>;
prompts?: Record<string, any>;
resources?: Record<string, any>;
};
instructions?: string;
}
export class Server {
constructor(serverInfo: Implementation, options?: ServerOptions);
connect(transport: any): Promise<void>;
close(): Promise<void>;
setRequestHandler(schema: any, handler: (request: any, extra?: any) => any): void;
registerCapabilities(capabilities: any): void;
}
}
declare module '@modelcontextprotocol/sdk/server/streamableHttp.js' {
import type { IncomingMessage, ServerResponse } from 'http';
export interface StreamableHTTPServerTransportOptions {
sessionIdGenerator?: (() => string) | undefined;
eventStore?: any;
}
export class StreamableHTTPServerTransport {
constructor(options?: StreamableHTTPServerTransportOptions);
start(): Promise<void>;
close(): Promise<void>;
send(message: any, options?: any): Promise<void>;
handleRequest(req: IncomingMessage, res: ServerResponse, parsedBody?: unknown): Promise<void>;
get sessionId(): string | undefined;
set onclose(handler: (() => void) | undefined);
set onerror(handler: ((error: Error) => void) | undefined);
set onmessage(handler: ((message: any, extra?: any) => void) | undefined);
get onclose(): (() => void) | undefined;
get onerror(): ((error: Error) => void) | undefined;
get onmessage(): ((message: any, extra?: any) => void) | undefined;
}
}
declare module '@modelcontextprotocol/sdk/server/stdio.js' {
import type { Readable, Writable } from 'stream';
export class StdioServerTransport {
constructor(stdin?: Readable, stdout?: Writable);
start(): Promise<void>;
close(): Promise<void>;
send(message: any): Promise<void>;
onclose?: () => void;
onerror?: (error: Error) => void;
onmessage?: (message: any) => void;
}
}
declare module '@modelcontextprotocol/sdk/client/streamableHttp.js' {
export interface StreamableHTTPClientTransportOptions {
reconnectionOptions?: {
maxReconnectionDelay?: number;
initialReconnectionDelay?: number;
reconnectionDelayGrowFactor?: number;
maxRetries?: number;
};
sessionId?: string;
}
export class StreamableHTTPClientTransport {
constructor(url: URL, opts?: StreamableHTTPClientTransportOptions);
start(): Promise<void>;
close(): Promise<void>;
send(message: any, options?: any): Promise<void>;
get sessionId(): string | undefined;
onclose?: () => void;
onerror?: (error: Error) => void;
onmessage?: (message: any) => void;
}
}
declare module '@modelcontextprotocol/sdk/types.js' {
export interface Tool {
name: string;
description?: string;
inputSchema?: Record<string, unknown>;
outputSchema?: Record<string, unknown>;
annotations?: Record<string, unknown>;
}
export const ListToolsRequestSchema: any;
export const CallToolRequestSchema: any;
export const ListToolsResultSchema: any;
export const CallToolResultSchema: any;
}

View File

@@ -0,0 +1,57 @@
import { describe, it, expect } from 'vitest';
import { hasRequiredQuickInitFields } from './quickInit';
describe('hasRequiredQuickInitFields', () => {
it('should return true when serverHost and savedKey are present', () => {
expect(hasRequiredQuickInitFields({
serverHost: 'https://agent.qiming.com',
savedKey: 'key-123',
})).toBe(true);
});
it('should return true with all fields present', () => {
expect(hasRequiredQuickInitFields({
serverHost: 'https://agent.qiming.com',
savedKey: 'key-123',
username: 'user@example.com',
agentPort: 60001,
fileServerPort: 60000,
workspaceDir: '/home/user/workspace',
})).toBe(true);
});
it('should return false when serverHost is missing', () => {
expect(hasRequiredQuickInitFields({ savedKey: 'key-123' })).toBe(false);
});
it('should return false when savedKey is missing', () => {
expect(hasRequiredQuickInitFields({ serverHost: 'https://agent.qiming.com' })).toBe(false);
});
it('should return false when serverHost is empty string', () => {
expect(hasRequiredQuickInitFields({ serverHost: '', savedKey: 'key-123' })).toBe(false);
});
it('should return false when savedKey is empty string', () => {
expect(hasRequiredQuickInitFields({ serverHost: 'https://agent.qiming.com', savedKey: '' })).toBe(false);
});
it('should return false for null', () => {
expect(hasRequiredQuickInitFields(null)).toBe(false);
});
it('should return false for undefined', () => {
expect(hasRequiredQuickInitFields(undefined)).toBe(false);
});
it('should return false for non-object types', () => {
expect(hasRequiredQuickInitFields('string')).toBe(false);
expect(hasRequiredQuickInitFields(123)).toBe(false);
expect(hasRequiredQuickInitFields(true)).toBe(false);
});
it('should return false when fields are wrong type', () => {
expect(hasRequiredQuickInitFields({ serverHost: 123, savedKey: 'key' })).toBe(false);
expect(hasRequiredQuickInitFields({ serverHost: 'host', savedKey: 456 })).toBe(false);
});
});

View File

@@ -0,0 +1,37 @@
/**
* Quick Init 配置类型定义
*
* 通过预置 ~/.qimingclaw/qimingclaw.json 或环境变量快速完成初始化
*
* 配置优先级: qimingclaw.json → 环境变量 → 无配置(走正常向导)
*/
/**
* 解析完成的 Quick Init 配置(所有字段已填充,含默认值)
*/
export interface QuickInitConfig {
/** 服务域名 */
serverHost: string;
/** Agent 端口 */
agentPort: number;
/** 文件服务端口 */
fileServerPort: number;
/** 工作区目录 */
workspaceDir: string;
/** 登录用户名 */
username: string;
/** 设备密钥(已注册) */
savedKey: string;
}
/**
* 校验对象是否包含 Quick Init 最低必填字段serverHost + savedKey
*/
export function hasRequiredQuickInitFields(obj: unknown): boolean {
if (!obj || typeof obj !== 'object') return false;
const o = obj as Record<string, unknown>;
return (
typeof o.serverHost === 'string' && o.serverHost.length > 0 &&
typeof o.savedKey === 'string' && o.savedKey.length > 0
);
}

View File

@@ -0,0 +1,679 @@
/**
* 沙箱工作空间核心类型定义
* 多平台沙箱工作空间系统
*
* @version 1.0.0
* @updated 2026-03-22
*/
// ============================================================================
// 基础类型
// ============================================================================
/**
* 支持的平台类型
*/
export type Platform = "darwin" | "win32" | "linux";
/**
* 沙箱类型
* - docker: Docker 容器(全平台)
* - macos-seatbelt: macOS seatbeltsandbox-exec
* - linux-bwrap: Linux bubblewrap
* - windows-sandbox: Windows Sandbox helperRust helper + Restricted Token
* - none: 无沙箱(直接执行)
*/
export type SandboxType =
| "docker"
| "macos-seatbelt"
| "linux-bwrap"
| "windows-sandbox"
| "none";
/**
* 沙箱后端
* - auto: 按平台自动选择
*/
export type SandboxBackend =
| "auto"
| "docker"
| "macos-seatbelt"
| "linux-bwrap"
| "windows-sandbox";
/**
* Windows Sandbox 模式
* - read-only: 只读(严格,不允许写入任何路径)
* - workspace-write: 工作区可写推荐ACP 引擎正常工作)
*/
export type WindowsSandboxMode = "read-only" | "workspace-write";
/**
* 沙箱运行模式
* - strict: 严格最小权限
* - compat: 兼容优先(默认)
* - permissive: 宽松(仅排障)
*/
export type SandboxMode = "strict" | "compat" | "permissive";
/**
* 自动回退范围
* - startup-only: 仅启动链路(默认)
* - session: 会话级
* - manual: 手动确认
*/
export type SandboxAutoFallback = "startup-only" | "session" | "manual";
/**
* 降级策略(内部使用,不暴露在 SandboxPolicy 中)
* - degrade_to_off: 后端不可用时降级为 off默认
* - fail_closed: 后端不可用时阻断执行
*/
export type SandboxFallback = "degrade_to_off" | "fail_closed";
/**
* 统一沙箱策略
*/
export interface SandboxPolicy {
/** 是否启用沙箱 */
enabled: boolean;
/** 后端选择auto = 按平台自动) */
backend: SandboxBackend;
/** 沙箱模式 */
mode: SandboxMode;
/** 自动回退范围 */
autoFallback: SandboxAutoFallback;
/** Windows 专属:沙箱写权限模式 */
windowsMode: WindowsSandboxMode;
}
/**
* 单个后端能力状态
*/
export interface SandboxCapabilityItem {
available: boolean;
reason?: string;
binaryPath?: string;
}
/**
* 多后端能力探测结果
*/
export interface SandboxCapabilities {
platform: Platform;
recommendedBackend: SandboxBackend;
docker: SandboxCapabilityItem;
macosSeatbelt: SandboxCapabilityItem;
linuxBwrap: SandboxCapabilityItem;
windowsSandbox: SandboxCapabilityItem;
}
/**
* 权限级别
* - 0: 完全受限(只读)
* - 1: 标准模式(需要确认)
* - 2: 开发模式(宽松确认)
* - 3: 无限制(谨慎使用)
*/
export type PermissionLevel = 0 | 1 | 2 | 3;
/**
* CP 工作流检查点
*/
export type Checkpoint = "CP1" | "CP2" | "CP3" | "CP4" | "CP5";
/**
* 检查点状态
*/
export type CheckpointStatus =
| "pending"
| "in_progress"
| "completed"
| "failed";
/**
* 质量门禁状态
*/
export type GateStatus = "pending" | "passed" | "failed";
// ============================================================================
// 进程级沙箱ACP 引擎)
// ============================================================================
/**
* ACP 引擎进程级沙箱配置
* 用于将整个引擎进程包裹在沙箱后端中
*/
export interface SandboxProcessConfig {
/** 是否启用沙箱包装 */
enabled: boolean;
/** 已解析的沙箱后端类型 */
type: SandboxType;
/** 沙箱模式 */
mode?: SandboxMode;
/** 自动回退范围 */
autoFallback?: SandboxAutoFallback;
/** 用户工作区目录(可写) */
projectWorkspaceDir: string;
/** 是否允许网络访问(引擎需要 API 调用) */
networkEnabled: boolean;
/** 降级策略 */
fallback: SandboxFallback;
/** Linux bwrap 二进制路径(可选) */
linuxBwrapPath?: string;
/** 仅 win32Windows Sandbox helper.exe路径 */
windowsSandboxHelperPath?: string;
/** 仅 win32Windows Sandbox 模式 */
windowsSandboxMode?: WindowsSandboxMode;
}
// ============================================================================
// 沙箱配置
// ============================================================================
/**
* 沙箱配置
*/
export interface SandboxConfig {
/** 沙箱类型 */
type: SandboxType;
/** 运行平台 */
platform: Platform;
/** 是否启用沙箱 */
enabled: boolean;
/** 工作区根目录 */
workspaceRoot: string;
/** 内存限制(如 "2g" */
memoryLimit?: string;
/** CPU 核心数限制 */
cpuLimit?: number;
/** 磁盘配额(如 "10g" */
diskQuota?: string;
/** 是否允许网络访问 */
networkEnabled?: boolean;
/** Docker 镜像名称(仅 Docker 沙箱) */
dockerImage?: string;
/** Docker Host 地址(可选) */
dockerHost?: string;
/** 只读模式(禁止写入操作) */
readOnly?: boolean;
/** 沙箱运行模式strict / compat / permissive */
mode?: SandboxMode;
}
// ============================================================================
// 工作区
// ============================================================================
/**
* 工作区
*/
export interface Workspace {
/** 工作区唯一标识 */
id: string;
/** 关联的会话 ID */
sessionId: string;
/** 工作区根路径 */
rootPath: string;
/** 项目目录路径 */
projectsPath: string;
/** node_modules 路径 */
nodeModulesPath: string;
/** Python 虚拟环境路径 */
pythonEnvPath: string;
/** bin 目录路径 */
binPath: string;
/** 缓存目录路径 */
cachePath: string;
/** 沙箱配置 */
sandboxConfig: SandboxConfig;
/** 创建时间 */
createdAt: Date;
/** 最后访问时间 */
lastAccessedAt: Date;
/** 保留策略 */
retentionPolicy: RetentionPolicy;
/** 工作区状态 */
status: WorkspaceStatus;
}
/**
* 工作区状态
*/
export type WorkspaceStatus =
| "creating"
| "active"
| "inactive"
| "destroying"
| "destroyed"
| "error";
/**
* 创建工作区选项
*/
export interface CreateWorkspaceOptions {
/** 保留策略 */
retention?: Partial<RetentionPolicy>;
/** 平台覆盖 */
platform?: Platform;
/** 沙箱类型覆盖 */
sandboxType?: SandboxType;
/** 自定义工作区路径 */
customPath?: string;
}
// ============================================================================
// 命令执行
// ============================================================================
/**
* 命令执行选项
*/
export interface ExecuteOptions {
/** 工作目录 */
cwd?: string;
/** 环境变量 */
env?: Record<string, string>;
/** 超时时间(毫秒) */
timeout?: number;
/** 最大内存使用 */
maxMemory?: string;
/** 标准输入输出模式 */
stdio?: "pipe" | "inherit";
/** 权限级别 */
permissionLevel?: PermissionLevel;
/** 是否需要权限检查 */
skipPermissionCheck?: boolean;
}
/**
* 命令执行结果
*/
export interface ExecuteResult {
/** 标准输出 */
stdout: string;
/** 标准错误 */
stderr: string;
/** 退出码 */
exitCode: number;
/** 是否超时 */
timedOut: boolean;
/** 执行时长(毫秒) */
duration: number;
/** 命令 */
command: string;
/** 参数 */
args: string[];
}
// ============================================================================
// 文件操作
// ============================================================================
/**
* 文件信息
*/
export interface FileInfo {
/** 文件名 */
name: string;
/** 完整路径 */
path: string;
/** 是否为目录 */
isDirectory: boolean;
/** 文件大小(字节) */
size: number;
/** 修改时间 */
modifiedAt: Date;
/** 权限 */
permissions?: string;
}
// ============================================================================
// 保留策略
// ============================================================================
/**
* 保留策略
*/
export interface RetentionPolicy {
/** 保留模式
* - always: 始终保留
* - timeout: 超时后清理
* - manual: 手动清理
*/
mode: "always" | "timeout" | "manual";
/** 最大保留时间(毫秒) */
maxAge?: number;
/** 最大工作区数量 */
maxWorkspaces?: number;
/** 最大占用空间 */
maxSize?: string;
/** 错误时是否保留 */
preserveOnError?: boolean;
}
// ============================================================================
// 权限管理
// ============================================================================
/**
* 权限类型
*/
export type PermissionType =
| "file:read"
| "file:write"
| "file:delete"
| "command:execute"
| "network:access"
| "network:download"
| "package:install:npm"
| "package:install:python"
| "package:install:system";
/**
* 权限
*/
export interface Permission {
/** 权限 ID */
id: string;
/** 权限类型 */
type: PermissionType;
/** 目标资源 */
target: string;
/** 关联的会话 ID */
sessionId: string;
/** 批准来源
* - system: 系统自动批准
* - user: 用户批准
* - policy: 策略自动批准
* - denied: 已拒绝
*/
approvedBy: "system" | "user" | "policy" | "denied";
/** 批准时间 */
timestamp: Date;
/** 原因说明 */
reason?: string;
}
/**
* 权限策略
*/
export interface PermissionPolicy {
/** 自动批准的权限类型 */
autoApprove: PermissionType[];
/** 需要确认的权限类型 */
requireConfirm: PermissionType[];
/** 禁止的权限类型 */
denyList: PermissionType[];
/** 是否只允许工作区内操作 */
workspaceOnly: boolean;
/** 安全命令白名单 */
safeCommands: string[];
}
/**
* 权限检查结果
*/
export interface PermissionResult {
/** 是否允许 */
allowed: boolean;
/** 原因说明 */
reason: string;
/** 请求 ID如需用户确认 */
requestId?: string;
}
/**
* 权限请求
*/
export interface PermissionRequest {
/** 请求 ID */
id: string;
/** 关联的会话 ID */
sessionId: string;
/** 权限类型 */
type: PermissionType;
/** 目标资源 */
target: string;
/** 请求原因 */
reason?: string;
/** 请求时间 */
requestedAt: Date;
/** 请求状态 */
status: "pending" | "approved" | "denied";
}
// ============================================================================
// 工作流状态
// ============================================================================
/**
* 工作流状态
*/
export interface WorkflowState {
/** 项目名称 */
project: string;
/** 版本 */
version: string;
/** 类型 */
type: "sandbox";
/** 平台 */
platform: Platform;
/** 最后更新时间 */
lastUpdated: string;
/** 当前任务 */
currentTask: string | null;
/** 任务状态 */
taskStatus: "idle" | "running" | "completed" | "failed";
/** 当前阶段 */
stage: Checkpoint | "none";
/** 检查点状态 */
checkpoints: Record<Checkpoint, CheckpointStatus>;
/** 质量门禁状态 */
gates: Record<string, GateStatus>;
/** 执行指标 */
metrics: SandboxMetrics;
/** 工作区记录 */
workspaces: Record<string, WorkspaceRecord>;
/** 最近变更 */
recentChanges: RecentChange[];
}
/**
* 工作区记录(用于状态持久化)
*/
export interface WorkspaceRecord {
/** 创建时间 */
createdAt: string;
/** 最后访问时间 */
lastAccessed: string;
/** 沙箱类型 */
sandboxType: SandboxType;
/** 状态 */
status: WorkspaceStatus;
}
/**
* 沙箱执行指标
*/
export interface SandboxMetrics {
/** 已创建的沙箱数量 */
sandboxesCreated: number;
/** 已销毁的沙箱数量 */
sandboxesDestroyed: number;
/** 已完成的执行次数 */
executionsCompleted: number;
/** 被拦截的执行次数 */
executionsBlocked: number;
/** 平均执行时间 */
averageExecutionTime: number;
/** 人工干预次数 */
humanInterventions: number;
}
/**
* 最近变更记录
*/
export interface RecentChange {
/** 时间戳 */
timestamp: string;
/** 变更类型 */
type: "create" | "destroy" | "execute" | "permission" | "cleanup";
/** 描述 */
description: string;
/** 关联的会话 ID */
sessionId?: string;
}
// ============================================================================
// 质量门禁
// ============================================================================
/**
* 质量门禁结果
*/
export interface GateResult {
/** 是否通过 */
pass: boolean;
/** 原因说明 */
reason?: string;
}
/**
* 质量门禁报告
*/
export interface GateReport {
/** 各门禁结果 */
results: Record<string, GateResult>;
/** 是否全部通过 */
allPassed: boolean;
}
// ============================================================================
// 清理
// ============================================================================
/**
* 清理结果
*/
export interface CleanupResult {
/** 删除的工作区数量 */
deletedCount: number;
/** 释放的空间(字节) */
freedSpace: number;
/** 错误列表 */
errors: string[];
}
// ============================================================================
// 沙箱状态
// ============================================================================
/**
* 沙箱状态
*/
export interface SandboxStatus {
/** 是否可用 */
available: boolean;
/** 沙箱类型 */
type: SandboxType;
/** 当前后端 */
backend?: SandboxBackend;
/** 平台 */
platform: Platform;
/** 活跃工作区数量 */
activeWorkspaces: number;
/** 是否发生降级 */
degraded?: boolean;
/** 状态说明 */
reason?: string;
/** 能力探测快照 */
capabilities?: SandboxCapabilities;
/** 总内存使用 */
totalMemory?: string;
/** 磁盘使用 */
diskUsage?: string;
/** Docker 特有信息 */
docker?: {
/** Docker 是否运行 */
running: boolean;
/** 容器数量 */
containerCount: number;
/** Docker 版本 */
version?: string;
};
}
// ============================================================================
// 容器信息Docker 特有)
// ============================================================================
/**
* 容器信息
*/
export interface ContainerInfo {
/** 容器 ID */
id: string;
/** 容器名称 */
name: string;
/** 镜像名称 */
image: string;
/** 状态 */
status: "running" | "exited" | "paused" | "created";
/** 关联的会话 ID */
sessionId?: string;
/** 创建时间 */
createdAt: Date;
/** 端口映射 */
ports?: string[];
}
// ============================================================================
// 事件类型
// ============================================================================
/**
* 沙箱事件类型
*/
export interface SandboxEvents {
/** 工作区已创建 */
"workspace:created": { workspace: Workspace };
/** 工作区已销毁 */
"workspace:destroyed": { workspaceId: string; sessionId: string };
/** 工作区已访问 */
"workspace:accessed": {
workspaceId: string;
sessionId: string;
timestamp: Date;
};
/** 权限请求 */
"permission:requested": { request: PermissionRequest };
/** 权限已批准 */
"permission:approved": { permission: Permission };
/** 权限已拒绝 */
"permission:denied": {
requestId: string;
sessionId: string;
reason?: string;
};
/** 执行开始 */
"execute:start": { sessionId: string; command: string; args: string[] };
/** 执行完成 */
"execute:complete": { sessionId: string; result: ExecuteResult };
/** 执行错误 */
"execute:error": { sessionId: string; error: string; command: string };
/** 清理开始 */
"cleanup:start": { reason: string };
/** 清理完成 */
"cleanup:complete": { result: CleanupResult };
/** 沙箱不可用 */
"sandbox:unavailable": { reason: string };
/** 沙箱已恢复 */
"sandbox:recovered": { type: SandboxType };
}

View File

@@ -0,0 +1,13 @@
/**
* Detailed session type for the Sessions tab.
* Aggregated from AcpEngine internal session data.
*/
export interface DetailedSession {
id: string;
title?: string;
engineType: "claude-code" | "qimingcode";
projectId?: string;
status: "idle" | "pending" | "active" | "terminating";
createdAt: number;
lastActivity?: number;
}

View File

@@ -0,0 +1,266 @@
/**
* 单元测试: 类型工具和辅助函数
*
* 测试通用工具函数:
* - 类型验证函数
* - 数据转换函数
*/
import { describe, it, expect } from 'vitest';
describe('Type Utilities', () => {
describe('AgentEngineType', () => {
it('should accept valid engine types', () => {
const validTypes: AgentEngineType[] = ['claude-code', 'qimingcode'];
validTypes.forEach(type => {
expect(['claude-code', 'qimingcode'] as const).toContain(type);
});
});
it('should have exactly two engine types', () => {
const engineTypes: AgentEngineType[] = ['claude-code', 'qimingcode'];
expect(engineTypes).toHaveLength(2);
});
});
describe('DependencyStatus type', () => {
it('should have all expected status values', () => {
const expectedStatuses: DependencyStatus[] = [
'checking',
'installed',
'missing',
'outdated',
'installing',
'bundled',
'error',
];
expectedStatuses.forEach(status => {
expect(expectedStatuses).toContain(status);
});
});
});
describe('Message parts types', () => {
it('should create valid TextPart', () => {
const part: TextPart = {
type: 'text',
text: 'Hello, world!',
};
expect(part.type).toBe('text');
expect(part.text).toBe('Hello, world!');
});
it('should create valid ReasoningPart', () => {
const part: ReasoningPart = {
type: 'reasoning',
thinking: 'Thinking process...',
};
expect(part.type).toBe('reasoning');
expect(part.thinking).toBe('Thinking process...');
});
it('should create valid ToolPart with status', () => {
const part: ToolPart = {
type: 'tool',
toolCallId: 'tool-123',
name: 'read_file',
kind: 'function',
status: 'completed',
input: '{"path": "/path/to/file"}',
output: '{"content": "file content"}',
};
expect(part.type).toBe('tool');
expect(part.toolCallId).toBe('tool-123');
expect(part.status).toBe('completed');
});
it('should create valid FilePart', () => {
const part: FilePart = {
type: 'file',
uri: 'file:///path/to/file.txt',
mimeType: 'text/plain',
};
expect(part.type).toBe('file');
expect(part.uri).toBe('file:///path/to/file.txt');
expect(part.mimeType).toBe('text/plain');
});
});
describe('Message types', () => {
it('should create valid UserMessage', () => {
const message: UserMessage = {
role: 'user',
content: [
{ type: 'text', text: 'Hello!' },
],
};
expect(message.role).toBe('user');
expect(message.content).toHaveLength(1);
});
it('should create valid AssistantMessage', () => {
const message: AssistantMessage = {
role: 'assistant',
content: [
{ type: 'text', text: 'Response!' },
{ type: 'reasoning', thinking: 'Thinking...' },
],
};
expect(message.role).toBe('assistant');
expect(message.content).toHaveLength(2);
});
});
describe('Part input types', () => {
it('should create valid TextPartInput', () => {
const input: TextPartInput = {
type: 'text',
text: 'Test input',
};
expect(input.type).toBe('text');
expect(input.text).toBe('Test input');
});
it('should create valid FilePartInput', () => {
const input: FilePartInput = {
type: 'file',
uri: 'file:///test/file.txt',
mimeType: 'text/plain',
};
expect(input.type).toBe('file');
expect(input.uri).toBe('file:///test/file.txt');
});
});
});
describe('Data Transformation Utilities', () => {
describe('MessagePart type guards', () => {
const isTextPart = (part: Part): part is TextPart => part.type === 'text';
const isReasoningPart = (part: Part): part is ReasoningPart => part.type === 'reasoning';
const isToolPart = (part: Part): part is ToolPart => part.type === 'tool';
const isFilePart = (part: Part): part is FilePart => part.type === 'file';
it('should identify TextPart', () => {
const textPart: Part = { type: 'text', text: 'test' };
expect(isTextPart(textPart)).toBe(true);
expect(isReasoningPart(textPart)).toBe(false);
expect(isToolPart(textPart)).toBe(false);
expect(isFilePart(textPart)).toBe(false);
});
it('should identify ReasoningPart', () => {
const reasoningPart: Part = { type: 'reasoning', thinking: 'test' };
expect(isTextPart(reasoningPart)).toBe(false);
expect(isReasoningPart(reasoningPart)).toBe(true);
expect(isToolPart(reasoningPart)).toBe(false);
expect(isFilePart(reasoningPart)).toBe(false);
});
it('should identify ToolPart', () => {
const toolPart: Part = {
type: 'tool',
toolCallId: '123',
name: 'test_tool',
};
expect(isTextPart(toolPart)).toBe(false);
expect(isReasoningPart(toolPart)).toBe(false);
expect(isToolPart(toolPart)).toBe(true);
expect(isFilePart(toolPart)).toBe(false);
});
it('should identify FilePart', () => {
const filePart: Part = { type: 'file', uri: 'test.txt' };
expect(isTextPart(filePart)).toBe(false);
expect(isReasoningPart(filePart)).toBe(false);
expect(isToolPart(filePart)).toBe(false);
expect(isFilePart(filePart)).toBe(true);
});
});
describe('Message type guards', () => {
const isUserMessage = (message: Message): message is UserMessage => message.role === 'user';
const isAssistantMessage = (message: Message): message is AssistantMessage => message.role === 'assistant';
it('should identify UserMessage', () => {
const userMsg: Message = {
role: 'user',
content: [{ type: 'text', text: 'test' }],
};
expect(isUserMessage(userMsg)).toBe(true);
expect(isAssistantMessage(userMsg)).toBe(false);
});
it('should identify AssistantMessage', () => {
const assistantMsg: Message = {
role: 'assistant',
content: [{ type: 'text', text: 'response' }],
};
expect(isUserMessage(assistantMsg)).toBe(false);
expect(isAssistantMessage(assistantMsg)).toBe(true);
});
});
});
describe('Config Validation', () => {
describe('AgentConfig validation', () => {
const createValidConfig = (): AgentConfig => ({
engine: 'claude-code',
apiKey: 'sk-test-key',
baseUrl: 'https://api.anthropic.com',
model: 'claude-sonnet-4-20250514',
workspaceDir: '/mock/workspace',
});
it('should create valid claude-code config', () => {
const config: AgentConfig = {
...createValidConfig(),
engine: 'claude-code',
};
expect(config.engine).toBe('claude-code');
});
it('should create valid qimingcode config', () => {
const config: AgentConfig = {
...createValidConfig(),
engine: 'qimingcode',
};
expect(config.engine).toBe('qimingcode');
});
it('should accept optional config fields', () => {
const minimalConfig: AgentConfig = {
engine: 'claude-code',
workspaceDir: '/mock/workspace',
};
expect(minimalConfig.engine).toBe('claude-code');
expect(minimalConfig.workspaceDir).toBe('/mock/workspace');
});
it('should accept mcpServers config', () => {
const config: AgentConfig = {
...createValidConfig(),
mcpServers: {
'test-server': {
command: 'npx',
args: ['-y', 'test-mcp-server'],
env: { TEST_VAR: 'test' },
},
},
};
expect(config.mcpServers).toHaveProperty('test-server');
expect(config.mcpServers!['test-server'].command).toBe('npx');
});
it('should accept env variables', () => {
const config: AgentConfig = {
...createValidConfig(),
env: {
ANTHROPIC_MODEL: 'claude-opus-4-20250514',
CUSTOM_VAR: 'custom-value',
},
};
expect(config.env).toHaveProperty('ANTHROPIC_MODEL');
expect(config.env).toHaveProperty('CUSTOM_VAR');
});
});
});

View File

@@ -0,0 +1,29 @@
export type UpdateStatus = 'idle' | 'checking' | 'available' | 'not-available' | 'downloading' | 'downloaded' | 'error';
export interface UpdateProgress {
percent: number;
bytesPerSecond: number;
transferred: number;
total: number;
}
export interface UpdateInfo {
hasUpdate: boolean;
version?: string;
releaseDate?: string;
releaseNotes?: string;
error?: string;
/** 上一次检查仍在进行中,本次调用被跳过 */
alreadyChecking?: boolean;
}
export interface UpdateState {
status: UpdateStatus;
version?: string;
progress?: UpdateProgress;
error?: string;
/** false 表示当前安装方式不支持自动更新(如 Windows MSI需要手动下载 */
canAutoUpdate?: boolean;
/** true 表示因应用在只读卷运行(如从「下载」直接打开)导致无法就地更新,应引导用户前往下载页 */
isReadOnlyVolumeError?: boolean;
}

View File

@@ -0,0 +1,19 @@
declare global {
namespace JSX {
interface IntrinsicElements {
webview: React.DetailedHTMLProps<
React.HTMLAttributes<HTMLElement> & {
src?: string;
partition?: string;
allowpopups?: string;
preload?: string;
httpreferrer?: string;
useragent?: string;
},
HTMLElement
>;
}
}
}
export {};

View File

@@ -0,0 +1,45 @@
/**
* 域名标准化工具函数
* 用于统一处理域名相关的存储键生成
*/
/**
* 将域名标准化为存储键的一部分
* 提取 hostname移除协议、端口、路径
*
* @param domain - 原始域名(可能是 URL、hostname、或带协议的字符串
* @returns 标准化后的 hostname小写
*
* @example
* normalizeDomainForTokenKey("https://example.com:8080/path") // "example.com"
* normalizeDomainForTokenKey("example.com") // "example.com"
* normalizeDomainForTokenKey("192.168.1.1:3000") // "192.168.1.1"
*/
export function normalizeDomainForTokenKey(domain: string): string {
try {
// 尝试解析为完整 URL
const url = new URL(domain);
return url.hostname.toLowerCase();
} catch {
// 解析失败,手动提取 hostname
return domain
.replace(/^https?:\/\//i, "") // 移除协议
.split("/")[0] // 移除路径
.split(":")[0] // 移除端口
.toLowerCase();
}
}
/**
* 生成域名级别的 token 存储键
*
* @param domain - 原始域名
* @returns 存储键,格式为 `auth.tokens.{hostname}`
*
* @example
* getDomainTokenKey("https://example.com") // "auth.tokens.example.com"
* getDomainTokenKey("http://localhost:3000") // "auth.tokens.localhost"
*/
export function getDomainTokenKey(domain: string): string {
return `auth.tokens.${normalizeDomainForTokenKey(domain)}`;
}