{
  "meta": {
    "name": "中文",
    "code": "zh"
  },
  "common": {
    "loading": "加载中…",
    "error": "错误",
    "success": "成功",
    "warning": "警告",
    "info": "信息",
    "done": "完成",
    "cancel": "取消",
    "confirm": "确认",
    "yes": "是",
    "no": "否",
    "save": "保存",
    "delete": "删除",
    "edit": "编辑",
    "create": "创建",
    "close": "关闭",
    "back": "返回",
    "next": "下一步",
    "prev": "上一步",
    "search": "搜索",
    "filter": "筛选",
    "refresh": "刷新",
    "copy": "复制",
    "copied": "已复制",
    "not_found": "未找到",
    "required": "必填",
    "optional": "可选",
    "total": "总计",
    "local": "本地",
    "default": "默认"
  },
  "cli": {
    "description": "AgentFlow CLI — 使用 Cursor、OpenCode、Claude Code 或 Codex CLI 流式输出驱动 apply/replay",
    "usage": "用法",
    "commands": "命令",
    "options": "选项",
    "requires": "需要",
    "examples": "示例"
  },
  "flow": {
    "name": "流程",
    "list": "列出所有流水线",
    "apply": "应用流程",
    "replay": "重放节点",
    "resume": "恢复流程",
    "validate": "校验流程",
    "not_found": "未找到流程：{{name}}",
    "invalid": "流程无效",
    "running": "流程正在运行",
    "completed": "流程已完成",
    "failed": "流程失败",
    "pending": "流程暂停",
    "ready_nodes": "就绪节点",
    "no_ready_nodes": "没有就绪节点",
    "node_start": "开始执行节点：{{label}} ({{instanceId}})",
    "node_done": "节点完成：{{label}} ({{instanceId}})",
    "node_failed": "节点失败：{{label}} ({{instanceId}}) - {{error}}",
    "extract_thinking": "提取思考内容",
    "dry_run_nodes": "[--dry-run] 将执行节点：{{nodes}}。省略 --dry-run 以实际运行。",
    "stuck_error": "没有就绪节点且未全部完成；流程可能卡住。",
    "paused": "已暂停",
    "resume_hint": "继续执行请运行："
  },
  "node": {
    "name": "节点",
    "status": {
      "success": "成功",
      "failed": "失败",
      "pending": "等待",
      "running": "运行中",
      "skipped": "跳过"
    },
    "types": {
      "agent": "Agent 节点",
      "control": "控制节点",
      "tool": "工具节点"
    },
    "start": "【开始】节点",
    "end": "【结束】节点",
    "start_parallel": "【开始】并行执行",
    "end_parallel": "【结束】并行节点全部完成",
    "model_label": "模型",
    "done_label": "完成",
    "failed_label": "失败"
  },
  "apply": {
    "done": "Apply 完成",
    "paused": "已暂停",
    "stuck": "流程可能卡住",
    "resume_command": "继续执行请运行：",
    "user_confirmed": "用户确认继续（含重试 failed）"
  },
  "catalog": {
    "builtin_agent_not_found": "内置角色不存在",
    "name_already_exists": "该名称已存在，请换一个",
    "agent_not_found": "角色不存在",
    "invalid_agent_id": "无效的角色 id（需文件名安全）",
    "builtin_flow_not_found": "内置流程不存在",
    "builtin_flow_archive_not_supported": "内置流水线不支持归档视图",
    "builtin_flow_archive_path_not_supported": "内置流水线不支持归档路径",
    "type_text": "文本",
    "pipeline_header": "流水线",
    "source_header": "来源",
    "open_example_header": "校验命令"
  },
  "composer": {
    "edit_context": "## AgentFlow 编辑上下文",
    "tool_nodejs_rules_title": "## tool_nodejs 节点编写规则（必须遵守）",
    "tool_nodejs_rules_body": "`definitionId: tool_nodejs` 的核心是 **`script` 字段**——必须写完整可执行的 shell/node 命令。\n- **类型选择自检**（写 script 前先问自己）：这事**确定性**吗？相同输入永远产出相同输出、可用普通代码完整描述？是 → 继续写 script；否（需要语义理解/代码翻译/LLM 推理）→ **该节点选错了类型**，应改 `definitionId: agent_subAgent`，删 `script` 字段，任务描述写到 `body`。反例：『Android→RN 页面转换』『代码 review』『生成测试用例』必须 agent。\n- `script`：流水线直接 spawn 执行，stdout 作为 result，exit code 决定成败\n- `body`：有 `script` 时仅作人类可读注释，**不会被执行**\n- `script` 支持 `${}` 占位符引用 input 槽位和系统变量（workspaceRoot、pipelineWorkspace、runDir 等），值自动 shell-quote；接了 CD Workspace 后 `${workspaceRoot}` 表示当前执行工作区，`${pipelineWorkspace}` 表示流水线工作区\n- **不要**再对 `${workspaceRoot}` 等占位符外包双引号（如 `node \"${workspaceRoot}/...\"`）；应写 `node ${workspaceRoot}/...`，否则路径会含多余引号导致执行失败\n- **禁止**只在 `body` 中写自然语言描述而不写 `script`——这会导致节点运行时无代码可执行",
    "task_title": "## 任务",
    "task_instruction": "请只完成上述单一任务，不要做额外修改。完成后按上下文中的指引同步 UI。",
    "validation_passed": "flow 校验已通过",
    "validation_passed_detail": "✓ flow.yaml 校验通过（validate-flow）",
    "validation_failed": "flow 校验未通过，尝试自动修复…",
    "fix_task_title": "## 任务：修复 flow.yaml 使 validate-flow 通过",
    "fix_errors_intro": "以下错误必须**全部消除**（与 CLI `agentflow validate` / `validate-flow.mjs` 使用同一套规则）：",
    "fix_constraints_title": "### 约束",
    "fix_constraints_body": "- **只**编辑上下文中的「图定义文件」`flow.yaml`，不要改无关文件。\n- 优先最小修改：补边、修正 sourceHandle/targetHandle、role、model、实例结构等。",
    "analyzing_task": "分析任务…",
    "validation_repair": "校验修复：agent 第 {{attempt}}/{{max}} 次…",
    "validation_repair_start": "🔧 启动校验修复（{{attempt}}/{{max}}）…",
    "validation_repair_auto_success": "（自动修复成功）",
    "skip_validation_for_phase": "当前阶段跳过校验（将在最后阶段统一校验）",
    "all_phases_complete": "所有阶段完成",
    "phase_complete_waiting": "{{label}}完成，等待确认继续…",
    "current_phase": "阶段 {{index}}",
    "all_steps_complete": "所有步骤完成",
    "multi_step_failed": "多步执行失败: {{message}}",
    "multi_step_starting": "多步模式启动…",
    "classify_failed": "[CLASSIFY_FAIL] 任务分类失败: {{message}}"
  },
  "runner": {
    "cursor_account_limit": "[agentflow] Cursor 账户限制：检测到仅支持 Auto，自动重试一次（Auto）…",
    "generating_reply": "生成回复中…",
    "thinking": "思考中…",
    "completed": "完成",
    "execution_failed": "执行失败",
    "event_label": "事件",
    "tool_call": "工具调用 ({{subtype}})",
    "base64_data": "[cursor-stdout] (base64 数据, {{len}} 字符)",
    "non_json_line": "(非 JSON) {{preview}}",
    "unparsed_line": "(未解析行, {{len}} 字符)",
    "opencode_exit_code": "OpenCode 退出码 {{code}}",
    "done": "完成"
  },
  "tool": {
    "nodejs_script_hint": "script 成败以 exit code 为准（0=success），stdout 直接作为 result 槽位内容（纯文本即可，如 console.log）。",
    "nodejs_heal_retry": "[tool_nodejs 自愈] {{instanceId}} 第 {{attempt}}/{{maxRetries}} 次重试：{{detail}}"
  },
  "planner": {
    "heuristic_analysis": "启发式任务分析（配置 OPENAI_API_KEY 或 ANTHROPIC_API_KEY 可启用智能规划）",
    "planning": "任务规划中（{{model}}）…",
    "planner_format_error": "规划器返回格式异常，回退到单步执行",
    "planner_call_failed": "规划器调用失败（{{message}}），回退到启发式分析",
    "phased_planning": "分阶段规划：{{label}}（{{index}}/{{total}}）…",
    "phased_cli_exec": "分阶段：{{label}}（CLI 执行）",
    "phased_format_error": "分阶段规划器返回格式异常，使用默认 agent 步骤",
    "phased_planning_failed": "分阶段规划失败（{{message}}），使用默认 agent 步骤"
  },
  "api": {
    "node_context_marker": "## 节点上下文",
    "task_marker": "## 执行任务"
  },
  "ui": {
    "server_start": "UI 服务器启动",
    "server_listening": "服务器监听端口 {{port}}",
    "open_browser": "打开浏览器",
    "projects": "项目与流水线",
    "flow_editor": "节点画布",
    "settings": "设置"
  },
  "error": {
    "generic": "发生错误：{{message}}",
    "file_not_found": "文件未找到：{{path}}",
    "invalid_args": "无效参数",
    "missing_required": "缺少必填项：{{field}}",
    "exec_failed": "执行失败：{{command}}",
    "network_error": "网络错误",
    "permission_denied": "权限被拒绝",
    "read_flow_failed": "读取 flow 失败",
    "read_node_library_failed": "读取节点库失败",
    "save_failed": "保存失败",
    "move_failed": "移动失败"
  },
  "env": {
    "cursor_not_cached": "未缓存",
    "cursor_cached": "模型清单已缓存",
    "opencode_not_found": "未找到",
    "opencode_ready": "就绪",
    "service_normal": "服务正常",
    "service_abnormal": "部分接口异常"
  },
  "type": {
    "node": "节点",
    "text": "文本",
    "file": "文件",
    "bool": "布尔"
  },
  "role": {
    "normal": "普通",
    "planning": "技术规划",
    "code": "代码执行",
    "test": "测试回归",
    "requirement": "需求拆解"
  },
  "nodeDef": {
    "control_start": {
      "displayName": "开始",
      "description": "AgentFlow 的入口，所有流程应从这个节点开始"
    },
    "control_end": {
      "displayName": "结束",
      "description": "AgentFlow 的结束节点，执行完成后流程结束"
    },
    "agent_subAgent": {
      "displayName": "子 Agent",
      "description": "利用子 Agent 执行任务"
    },
    "tool_user_ask": {
      "displayName": "用户选择",
      "description": "等待用户从多个选项中选择一个，流程暂停；按用户选择沿对应出边分支继续（人类驱动的 switch）"
    },
    "tool_user_check": {
      "displayName": "用户确认",
      "description": "等待用户确认，流程暂停。需用户回复「继续」才重启流程"
    },
    "control_if": {
      "displayName": "If 分支",
      "description": "约定有且仅有一个 type 为 bool 的 input。true 时沿 next1 继续，false 时沿 next2 继续"
    },
    "control_anyOne": {
      "displayName": "任一触发",
      "description": "当任一上游输入就绪时，沿 next 继续执行"
    },
    "control_toBool": {
      "displayName": "代码转布尔",
      "description": "执行 script 脚本输出 true/false 到 prediction，类似 tool_nodejs 但强制 bool 输出，可扩展输入"
    },
    "control_delay": {
      "displayName": "延迟等待",
      "description": "持久化等待一段时间，到点后由 scheduler 唤醒当前 run 继续执行"
    },
    "control_wait_until": {
      "displayName": "等待到时间",
      "description": "持久化等待到指定时间，到点后由 scheduler 唤醒当前 run 继续执行"
    },
    "control_cancelled": {
      "displayName": "取消判断",
      "description": "判断当前 wait/run 是否已被取消，输出 cancelled 布尔值"
    },
    "control_interval_loop": {
      "displayName": "间隔循环",
      "description": "按固定间隔持久化等待，并根据 done、cancelled、deadline 分支到继续、完成、超时或取消"
    },
    "control_agent_toBool": {
      "displayName": "AI 转布尔",
      "description": "由 AI 判断输入内容的布尔含义，适用于不确定性场景"
    },
    "control_cd_workspace": {
      "displayName": "CD 工作区",
      "description": "切换下游节点的执行工作区上下文，不改变流水线所在工作区"
    },
    "control_user_workspace": {
      "displayName": "用户工作区",
      "description": "输出指向当前用户 Home 目录的工作区上下文"
    },
    "control_load_skills": {
      "displayName": "加载 Skills",
      "description": "从当前工作区、流水线工作区、显式路径或组合来源加载 SKILL.md"
    },
    "tool_git_checkout": {
      "displayName": "Git 拉取",
      "description": "克隆或更新 Git 仓库，并输出可供下游使用的工作区上下文"
    },
    "tool_git_worktree_load": {
      "displayName": "加载 Worktree",
      "description": "创建或复用 Git worktree，并输出 workspaceContext 与 gitContext"
    },
    "tool_git_worktree_unload": {
      "displayName": "卸载 Worktree",
      "description": "移除 Git worktree，并恢复下游工作区上下文"
    },
    "tool_gitlab_create_mr": {
      "displayName": "提交 GitLab MR",
      "description": "为当前分支创建或复用 GitLab Merge Request，并输出 MR 链接"
    },
    "tool_jenkins_build": {
      "displayName": "Jenkins 构建",
      "description": "触发 Jenkins 构建并持续等待结果，完成后输出构建状态、产物链接和可选二维码",
      "guide": {
        "summary": "这个节点会触发一次 Jenkins Job，并在后台持续检查排队和构建状态。等待期间不会占用执行进程，完成后流程会自动继续。",
        "prerequisites": [
          "在「设置 → 环境变量」中配置 Jenkins 地址；需要登录时同时配置用户名和 API Token。",
          "确认 Jenkins Job 名称及其参数名；参数名区分大小写。"
        ],
        "steps": [
          "job 填 Jenkins Job 名称，例如 like-android；如果 Job 位于文件夹中，填写 folder/job。",
          "parameters 填 JSON object；非参数化构建填写 {}。",
          "credentialRef 留空时使用 JENKINS_BASE_URL 等默认变量；填写 mobile 时使用 JENKINS_MOBILE_* 变量。",
          "pollInterval 和 timeout 默认分别为 30s、2h，通常不需要修改。"
        ],
        "example": "JENKINS_MOBILE_BASE_URL=http://jenkinsmobile.bigo.sg:8080/\nJENKINS_MOBILE_USERNAME=your-name\nJENKINS_MOBILE_TOKEN=your-api-token\n\njob: like-android\nparameters: {}\ncredentialRef: mobile",
        "notes": [
          "不要把 Jenkins Token 写入 flow.yaml 或 parameters。",
          "status 会返回 SUCCESS、FAILURE、ABORTED、TIMEOUT 或 CANCELLED；即使构建失败，下游通知节点仍会继续执行。"
        ]
      }
    },
    "tool_wecom_send_group_markdown": {
      "displayName": "企业微信群聊 Markdown",
      "description": "通过企业微信群机器人 webhook 发送 Markdown 到群聊"
    },
    "tool_wecom_send_app_markdown": {
      "displayName": "企业微信个人 Markdown",
      "description": "通过企业微信应用消息接口发送 Markdown 给个人或多个用户"
    },
    "tool_display_share_link": {
      "displayName": "展示分享链接",
      "description": "将上游 Display 节点发布为可分享链接，并输出 URL"
    },
    "tool_nodejs": {
      "displayName": "Node.js 脚本",
      "description": "执行 Node.js 脚本，以 exit code 判断成败，stdout 作为结果"
    },
    "tool_print": {
      "displayName": "打印输出",
      "description": "以特殊字体样式向用户输出内容"
    },
    "tool_get_env": {
      "displayName": "获取环境变量",
      "description": "获取环境变量值"
    },
    "tool_set_run_env": {
      "displayName": "设置 Run Env",
      "description": "为当前运行设置临时环境变量，只影响后续节点"
    },
    "tool_save_key": {
      "displayName": "保存键值",
      "description": "保存键值对到全局存储"
    },
    "tool_load_key": {
      "displayName": "加载键值",
      "description": "从全局存储加载键值"
    },
    "display_markdown": {
      "displayName": "Markdown 展示",
      "description": "在 Workspace 画布中渲染 Markdown 内容，并将文本继续传给下游"
    },
    "display_code": {
      "displayName": "代码展示",
      "description": "在 Workspace 画布中高亮展示代码，支持行号、复制、换行和下载，并将代码继续传给下游"
    },
    "display_mermaid": {
      "displayName": "Mermaid 展示",
      "description": "在 Workspace 画布中渲染 Mermaid 图，并将源码继续传给下游"
    },
    "display_ascii": {
      "displayName": "ASCII 图展示",
      "description": "在 Workspace 画布中渲染等宽 ASCII 图，并将文本继续传给下游"
    },
    "display_html": {
      "displayName": "HTML 展示",
      "description": "在 Workspace 画布中用 sandbox iframe 渲染 HTML，并将源码继续传给下游"
    },
    "display_react_app": {
      "displayName": "React 工程",
      "description": "在 Workspace 画布中用 sandbox iframe 预览 React 工程，并将工程 JSON 继续传给下游"
    },
    "display_image": {
      "displayName": "图片展示",
      "description": "在 Workspace 画布中预览图片 URL、data URL 或图片路径，并将来源继续传给下游"
    },
    "display_chart": {
      "displayName": "图表展示",
      "description": "在 Workspace 画布中渲染 ChartSpec/ECharts JSON，并将 JSON 继续传给下游"
    },
    "display_table": {
      "displayName": "表格展示",
      "description": "在 Workspace 画布中渲染 JSON、Markdown、CSV 或 TSV 表格，并将文本继续传给下游"
    },
    "provide_str": {
      "displayName": "文本",
      "description": "直接提供一段文本，value 会原样供下游引用"
    },
    "provide_file": {
      "displayName": "文件",
      "description": "直接提供文件路径或内容，value 会原样供下游引用"
    },
    "provide_password": {
      "displayName": "密码",
      "description": "直接提供密码或密钥文本，默认不在节点卡片上展示"
    },
    "provide_bool": {
      "displayName": "布尔",
      "description": "直接提供 true/false 布尔值，value 会供下游 bool 引脚引用"
    }
  },
  "pipeline": {
    "module-migrate": {
      "description": "模块迁移流程（确定范围→确认→迁移→静态环→编译环→输出文档）",
      "start": { "label": "开始", "body": "流程入口" },
      "scope": { "label": "确定迁移范围" },
      "user_confirm_scope": { "label": "用户确认范围" },
      "migrate": { "label": "执行迁移" },
      "anyOne_static": { "label": "任一(静态环入口)" },
      "anyOne_gradle": { "label": "任一(编译环入口)" },
      "ai_check_ref": { "label": "AI检查引用" },
      "agent_sum_error": { "label": "汇总问题" },
      "gradle_build": { "label": "Gradle编译" },
      "fix_dynamic": { "label": "修复构建" },
      "output_doc": { "label": "输出文档" },
      "end": { "label": "结束", "body": "流程出口" },
      "provide_key_ready_file": { "label": "KeyReadyFile" },
      "provide_key_module_name": { "label": "KeyModuleName" },
      "tool_save_ready_file": { "label": "待迁移文件列表" },
      "tool_save_module_name": { "label": "模块名称" },
      "agent_new_module": { "label": "新建模块" },
      "tool_static_analy": { "label": "静态检测" },
      "if_static": { "label": "If静态" },
      "LoadFile": { "label": "待迁移列表" },
      "agent_fix_todo": { "label": "修复Todo" },
      "control_toBool_static_bool": { "label": "静态检查结果转换" },
      "control_if_task_gradle": { "label": "If完成" },
      "control_toBool_gradle_bool": { "label": "列表完成结果" },
      "control_if_fixed": { "label": "If是否修复完" },
      "to_bool_fix_all": { "label": "是否修复完" },
      "control_anyOne_start_fix": { "label": "修复入口" },
      "tool_print_module": { "label": "Print展示" },
      "gradle_tasks": { "label": "获取java/kotlin编译任务" }
    },
    "figma-restore": {
      "description": "Figma 设计稿还原流程",
      "Start": { "label": "开始" },
      "FigmaURL": { "label": "FigmaURL" },
      "FigmaToken": { "label": "FigmaToken" },
      "script_check": { "label": "脚本自检" },
      "get_figma_tree": { "label": "获取Figma节点树与截图" },
      "ai_semantic": { "label": "AI语义识别截图结构" },
      "restore_by_depth": { "label": "按树深度遍历还原" },
      "export_resources": { "label": "导出img/icon资源" },
      "summarize": { "label": "汇总交付JSON" },
      "End": { "label": "结束" }
    },
    "new": {
      "description": "新建流水线",
      "control_start_new": { "label": "开始" },
      "agent_plan": { "label": "规划节点" },
      "agent_create": { "label": "创建Flow" },
      "control_end_new": { "label": "结束" },
      "provide_skills_file": { "label": "LayoutSkills" },
      "provide_requirement": { "label": "需求" },
      "agent_fix": { "label": "修复节点" },
      "agent_implement_script": { "label": "完善代码" },
      "tool_user_check": { "label": "UserCheck" },
      "control_anyOne": { "label": "AnyOne" },
      "provide_flow": { "label": "FlowsSkills" },
      "provide_newFlow_key_save": { "label": "FlowKeyName" },
      "provide_newFlow_key_load": { "label": "FlowKeyName" },
      "agent_ai_check_tool": { "label": "AI检查工具" },
      "AI_CHECK_FILE": { "label": "AI检查文件" },
      "control_if_check": { "label": "If检查" },
      "control_toBool_check": { "label": "检查结果" }
    }
  }
}
