diff --git a/.changeset/new-glasses-brake.md b/.changeset/new-glasses-brake.md new file mode 100644 index 00000000..2664e95b --- /dev/null +++ b/.changeset/new-glasses-brake.md @@ -0,0 +1,94 @@ +--- +"@promptx/mcp-server": patch +"@promptx/resource": patch +"@promptx/core": patch +"@promptx/desktop": patch +--- + +# v2.2.1 版本更新 + +## 🎉 RoleX V2 完整认知循环支持 + +### 核心操作 +- **want** - 制定产品目标(如:发布新功能、优化用户体验) +- **plan** - 为目标制定执行计划(⚠️ 必须传入 id 参数) +- **todo** - 创建具体任务 +- **finish** - 完成任务 +- **achieve** - 达成目标,沉淀经验 +- **focus** - 查看当前进行中的工作 +- **abandon** - 放弃目标/任务 + +### 自我沉淀(学习循环) +- **reflect** - 反思遇到的问题,创建经验 +- **realize** - 总结领悟的原则 +- **master** - 沉淀为标准操作流程(SOP) +- **synthesize** - 向其他角色传授知识 +- **forget** - 遗忘过时的知识 + +## 🔧 修复与改进 + +### RoleX V2 核心修复 +- 修复 plan 操作未传递 id 参数导致 todo 操作失败的问题 +- 修复 "No focused plan" 错误 +- 更新 RolexBridge 和 RolexActionDispatcher 正确传递所有参数 +- 添加关键警告:plan 操作必须传入 id 参数 + +### 大禹迁移功能修复 +- 更新大禹迁移文档适配 RoleX 1.3.0 数据库存储模式 +- 移除过时的 "born → activate → synthesize" 流程 +- 更新为正确模式:synthesize 直接传入 targetRole 参数 +- 添加职位命名规范:"角色名+岗位"格式(如"产品经理岗位") +- 说明 appoint 的 position 参数必须与 establish 的 name 完全一致 + +### 记忆工具优化 +- remember/recall 工具检测到 V2 角色时提供清晰引导 +- 引导 V2 角色使用 action 工具的认知循环操作 +- 提供完整的示例代码和操作说明 + +### AgentX 用户体验 +- 添加两个 V2 专属预设问题: + - "激活大禹帮我把v1迁移到v2" + - "查看我现在的组织架构" +- 预设问题仅在系统设置开启 V2 时显示 +- 优化布局:V2 关闭时 2 列,V2 开启时 3 列 + +### 通知系统 +- 添加 v2.2.1 版本更新通知 +- 修复通知服务自动合并新通知的问题 +- 新通知现在会自动出现在通知列表中 + +## 📝 文档更新 + +### MCP 工具描述 +- 更新 action 工具描述,添加完整的 V2 学习循环示例 +- 添加职位命名规范和组织操作示例 +- 强调 plan 操作的 id 参数要求 + +### 大禹角色文档 +- migration-workflow.execution.md - 更新迁移工作流 +- rolex-api.knowledge.md - 更新 API 速查表 +- 添加实际迁移经验和最佳实践 + +## 🌐 国际化 +- 添加中英文通知文本 +- 添加 AgentX 预设问题的中英文翻译 + +## ⚠️ 重要提示 + +### plan 操作关键要点 +plan 操作如果不传入 id 参数,focused_plan_id 不会被设置,导致后续 todo 操作失败并报错 "No focused plan. Call plan first." + +**错误示例:** +```json +{ "operation": "plan", "role": "_", "source": "..." } +``` + +**正确示例:** +```json +{ "operation": "plan", "role": "_", "source": "...", "id": "my-plan" } +``` + +### 职位命名规范 +- establish 创建职位时,name 必须是"角色名+岗位"格式(如"产品经理岗位") +- appoint 任命时,position 参数必须与 establish 的 name 完全一致 +- 验证方式:用 directory 检查 members 列表,而不是只看命令返回值 diff --git a/apps/desktop/src/i18n/locales/en.json b/apps/desktop/src/i18n/locales/en.json index 1df513f0..9805240b 100644 --- a/apps/desktop/src/i18n/locales/en.json +++ b/apps/desktop/src/i18n/locales/en.json @@ -769,7 +769,11 @@ "role": "Explore available roles", "rolePrompt": "What roles are available?", "tool": "Explore available tools", - "toolPrompt": "What tools are available?" + "toolPrompt": "What tools are available?", + "dayu": "Activate Dayu to migrate roles", + "dayuPrompt": "Activate Dayu to help me migrate v1 roles to v2", + "directory": "View organization structure", + "directoryPrompt": "Show me the current organization structure" } } }, @@ -803,6 +807,10 @@ "title": "v2.2.0 Update Released", "content": "New notification center, AgentX config with preset & OpenAI protocol detection, RoleX core upgraded from v0.11.0 to v1.3.0, fixed conversation rename bug, fixed Windows Git link issue. V2 role import/export/delete features temporarily disabled." }, + "updateV221": { + "title": "v2.2.1 Update Released", + "content": "🎉 V2 RoleX now supports complete cognitive cycle!\n\n🎯 Core Operations: want (set goals), plan (create plans), todo (create tasks), finish (complete tasks), achieve (reach goals), focus (view progress), abandon (give up goals)\n\n🧠 Self-Reflection: reflect (reflect on issues), realize (summarize principles), master (create SOPs), synthesize (teach knowledge), forget (forget outdated knowledge)\n\n✨ Fixed Dayu migration feature, supports V1 to V2 role migration" + }, "rolexUpgrade": { "title": "RoleX (V2) Architecture Upgrade", "content": "Existing V2 roles need to be upgraded. Please activate Nuwa and ask her to upgrade and migrate your roles to continue using them." diff --git a/apps/desktop/src/i18n/locales/zh-CN.json b/apps/desktop/src/i18n/locales/zh-CN.json index 7bc628af..4f30b7f7 100644 --- a/apps/desktop/src/i18n/locales/zh-CN.json +++ b/apps/desktop/src/i18n/locales/zh-CN.json @@ -766,7 +766,11 @@ "role": "探索可用角色", "rolePrompt": "有哪些可用的角色?", "tool": "探索可用工具", - "toolPrompt": "有哪些可用的工具?" + "toolPrompt": "有哪些可用的工具?", + "dayu": "激活大禹,迁移角色", + "dayuPrompt": "激活大禹帮我把v1迁移到v2", + "directory": "查看组织架构", + "directoryPrompt": "查看我现在的组织架构" } } }, @@ -800,6 +804,10 @@ "title": "v2.2.0 版本更新", "content": "新增通知中心、AgentX 配置增加预设与 OpenAI 协议识别功能、V2 RoleX 内核从 v0.11.0 更新到 v1.3.0、修复对话重命名后无效的 bug、修复 Windows 平台点击 Git 链接无响应的 bug。V2 的角色导入导出与删除功能暂时下架。" }, + "updateV221": { + "title": "v2.2.1 版本更新", + "content": "🎉 V2 RoleX 成功支持完整认知循环!\n\n🎯 核心操作:want(制定目标)、plan(制定计划)、todo(创建任务)、finish(完成任务)、achieve(达成目标)、focus(查看进度)、abandon(放弃目标)\n\n🧠 自我沉淀:reflect(反思问题)、realize(总结原则)、master(沉淀流程)、synthesize(传授知识)、forget(遗忘过时知识)\n\n✨ 修复大禹迁移功能,支持 V1 角色迁移到 V2" + }, "rolexUpgrade": { "title": "RoleX(V2)架构升级", "content": "原有 V2 角色需要升级。请激活女娲,让女娲进行升级与迁移才能继续使用。" diff --git a/apps/desktop/src/view/components/agentx-ui/components/container/WelcomePage.tsx b/apps/desktop/src/view/components/agentx-ui/components/container/WelcomePage.tsx index 1d11b196..6da768c1 100644 --- a/apps/desktop/src/view/components/agentx-ui/components/container/WelcomePage.tsx +++ b/apps/desktop/src/view/components/agentx-ui/components/container/WelcomePage.tsx @@ -9,7 +9,7 @@ */ import * as React from "react"; -import { Send, Hammer, Sparkles, Bot, Wrench } from "lucide-react"; +import { Send, Hammer, Sparkles, Bot, Wrench, Users, GitBranch } from "lucide-react"; import { useTranslation } from "react-i18next"; import { cn } from "@/components/agentx-ui/utils"; import logo from "../../../../../../assets/icons/icon.png"; @@ -75,37 +75,71 @@ export function WelcomePage({ }: WelcomePageProps): React.ReactElement { const { t } = useTranslation(); const [inputValue, setInputValue] = React.useState(""); + const [enableV2, setEnableV2] = React.useState(false); + + // Load V2 config on mount + React.useEffect(() => { + window.electronAPI?.invoke("server-config:get").then((config: any) => { + if (config?.enableV2) { + setEnableV2(true); + } + }).catch(() => { + // Ignore errors, default to false + }); + }, []); const tagline = t("agentxUI.welcome.tagline"); const displayText = useTypewriter(tagline, 100, true); // Preset questions - const presetQuestions: PresetQuestion[] = React.useMemo(() => [ - { - id: "luban", - icon: , - title: t("agentxUI.welcome.presets.luban"), - prompt: t("agentxUI.welcome.presets.lubanPrompt"), - }, - { - id: "nuwa", - icon: , - title: t("agentxUI.welcome.presets.nuwa"), - prompt: t("agentxUI.welcome.presets.nuwaPrompt"), - }, - { - id: "role", - icon: , - title: t("agentxUI.welcome.presets.role"), - prompt: t("agentxUI.welcome.presets.rolePrompt"), - }, - { - id: "tool", - icon: , - title: t("agentxUI.welcome.presets.tool"), - prompt: t("agentxUI.welcome.presets.toolPrompt"), - }, - ], [t]); + const presetQuestions: PresetQuestion[] = React.useMemo(() => { + const baseQuestions = [ + { + id: "luban", + icon: , + title: t("agentxUI.welcome.presets.luban"), + prompt: t("agentxUI.welcome.presets.lubanPrompt"), + }, + { + id: "nuwa", + icon: , + title: t("agentxUI.welcome.presets.nuwa"), + prompt: t("agentxUI.welcome.presets.nuwaPrompt"), + }, + { + id: "role", + icon: , + title: t("agentxUI.welcome.presets.role"), + prompt: t("agentxUI.welcome.presets.rolePrompt"), + }, + { + id: "tool", + icon: , + title: t("agentxUI.welcome.presets.tool"), + prompt: t("agentxUI.welcome.presets.toolPrompt"), + }, + ]; + + // Add V2-only questions + if (enableV2) { + baseQuestions.push( + { + id: "dayu", + icon: , + title: t("agentxUI.welcome.presets.dayu"), + prompt: t("agentxUI.welcome.presets.dayuPrompt"), + }, + { + id: "directory", + icon: , + title: t("agentxUI.welcome.presets.directory"), + prompt: t("agentxUI.welcome.presets.directoryPrompt"), + } + ); + } + + return baseQuestions; + }, [t, enableV2]); const handleSend = React.useCallback(() => { if (inputValue.trim() && onSend) { @@ -181,7 +215,10 @@ export function WelcomePage({ {/* Preset question cards */}