Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
42ba395
refactor: align StreamableHttpMCPServer and mcp-workspace with ShopAg…
dfwgj Mar 23, 2026
538aac4
feat(desktop): add workspace sidebar panel with file explorer
dfwgj Mar 23, 2026
004f7ed
feat(mcp-workspace): add built-in MCP server configuration tools
dfwgj Mar 23, 2026
49287b1
feat(desktop): add mcp-workspace as built-in MCP server
dfwgj Mar 23, 2026
4e93377
fix: sync workspace config path and suppress agentxjs verbose logs
dfwgj Mar 23, 2026
afb3021
feat: start mcp-workspace as stdio process like mcp-office
dfwgj Mar 23, 2026
c13f308
refactor(mcp-workspace): remove mcp-config service, extract ok/err utils
dfwgj Mar 23, 2026
69c2751
feat: drag files from workspace panel to chat input
dfwgj Mar 23, 2026
e0e6cd5
feat: auto-expand workspace folders on load
dfwgj Mar 23, 2026
660c314
feat: open workspace panel by default
dfwgj Mar 23, 2026
95320f4
feat: show Git installation prompt on Windows welcome page
dfwgj Mar 23, 2026
da814ff
fix: improve Git detection on Windows with fallback paths
dfwgj Mar 23, 2026
e660f15
fix: revert workspace auto-expansion and fix Git warning display
dfwgj Mar 23, 2026
6fa6f1f
refactor: split action tool into 4 domain-specific tools to reduce LL…
dfwgj Mar 24, 2026
f33a4ec
fix: deduplicate resources, conditional Git warning, cleanup logs
dfwgj Mar 24, 2026
4545adc
feat: add Feishu bot integration with WebSocket long-connection
dfwgj Mar 24, 2026
45a6e01
feat: add v2.3.0 release notification
dfwgj Mar 24, 2026
f121f2f
docs: update v2.3.0 changeset with full release notes
dfwgj Mar 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .changeset/red-kings-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
"@promptx/mcp-workspace": minor
"@promptx/mcp-server": minor
"@promptx/resource": minor
"@promptx/core": minor
"@promptx/desktop": minor
---

## v2.3.0

### 新功能

- **飞书接入**:支持通过飞书机器人与 PromptX 交互,使用 WebSocket 长连接模式无需公网 IP,实现类似 OpenClaw 的多平台接入能力
- **工作区功能**:新增工作区侧边栏,支持项目文件浏览、拖拽文件到对话输入、文件读写管理
- **DeepSeek 预配置**:AgentX 配置新增 DeepSeek 预设,开箱即用
- **Windows Git 检测**:首页添加 Git 安装状态检测与引导提示
- **MCP Workspace 服务**:新增内置 MCP 工作区服务,支持文件操作和配置管理

### 优化

- **RoleX 全面优化**:修复组织操作相关的 bug,拆分 action 工具为 4 个领域工具以减少 LLM 调用失败
- **资源去重**:修复资源页面重复 key 警告,V2 角色正确覆盖 V1 同名角色
- **通知中心**:新增 v2.3.0 版本更新通知

### 修复

- 修复工作区文件夹自动展开导致的性能问题
- 修复 Windows 平台 Git 检测与路径问题
- 清理调试日志输出
1 change: 1 addition & 0 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"@agentxjs/queue": "1.9.0",
"@agentxjs/runtime": "workspace:*",
"@agentxjs/ui": "1.9.0",
"@larksuiteoapi/node-sdk": "^1.59.0",
"@promptx/config": "workspace:*",
"@promptx/core": "workspace:*",
"@promptx/mcp-office": "workspace:*",
Expand Down
51 changes: 51 additions & 0 deletions apps/desktop/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,53 @@
"copyUrl": "URL copied",
"qrHint": "Scan to access on phone or other devices"
},
"feishu": {
"title": "Feishu (Lark)",
"description": "Connect Feishu bot to interact with PromptX via Feishu messages",
"appId": {
"label": "App ID",
"placeholder": "cli_xxxxxxxxxx"
},
"appSecret": {
"label": "App Secret",
"placeholder": "Enter Feishu app secret"
},
"encryptKey": {
"label": "Encrypt Key (Optional)",
"placeholder": "Event verification key"
},
"save": "Save Config",
"saving": "Saving...",
"saveSuccess": "Feishu config saved",
"saveFailed": "Failed to save Feishu config",
"testConnection": "Test Connection",
"comingSoon": "Feishu integration coming soon",
"connected": "Connected",
"disconnected": "Disconnected",
"configRequired": "Please fill in App ID and App Secret first",
"startSuccess": "Feishu bot started",
"startFailed": "Failed to start Feishu bot",
"stopSuccess": "Feishu bot stopped",
"stopFailed": "Failed to stop Feishu bot",
"remove": "Disconnect & Remove",
"removeSuccess": "Feishu config removed",
"removeFailed": "Failed to remove Feishu config",
"guide": "Create an app on Feishu Open Platform to get credentials",
"guideLink": "Feishu Open Platform"
},
"wechat": {
"title": "WeChat",
"description": "Connect personal WeChat to interact with PromptX via WeChat messages",
"installTitle": "1. Install Plugin",
"installDesc": "First install the openclaw WeChat plugin",
"installCmd": "npx -y @tencent-weixin/openclaw-weixin-cli install",
"loginTitle": "2. QR Code Login",
"loginDesc": "Run the command below and scan the QR code with WeChat",
"loginCmd": "openclaw channels login --channel openclaw-weixin",
"startBtn": "Start WeChat Integration",
"comingSoon": "WeChat integration coming soon",
"copied": "Command copied"
},
"server": {
"title": "Server Configuration",
"description": "Configure server host, port and debug settings",
Expand Down Expand Up @@ -814,6 +861,10 @@
"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."
},
"updateV230": {
"title": "v2.3.0 Update Released",
"content": "🚀 Comprehensive RoleX improvements with organization operation bug fixes\n\n⚡ Added DeepSeek preset configuration, ready to use out of the box\n\n📂 New workspace feature with project file management\n\n💬 Feishu (Lark) integration for multi-platform access, similar to OpenClaw"
}
}
}
51 changes: 51 additions & 0 deletions apps/desktop/src/i18n/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,53 @@
"copyUrl": "链接已复制",
"qrHint": "扫码在手机或其他设备上访问"
},
"feishu": {
"title": "飞书接入",
"description": "连接飞书机器人,通过飞书消息与 PromptX 交互",
"appId": {
"label": "App ID",
"placeholder": "cli_xxxxxxxxxx"
},
"appSecret": {
"label": "App Secret",
"placeholder": "输入飞书应用的 App Secret"
},
"encryptKey": {
"label": "Encrypt Key(可选)",
"placeholder": "事件验证密钥"
},
"save": "保存配置",
"saving": "保存中...",
"saveSuccess": "飞书配置已保存",
"saveFailed": "保存飞书配置失败",
"testConnection": "测试连接",
"comingSoon": "飞书接入功能即将上线",
"connected": "已连接",
"disconnected": "未连接",
"configRequired": "请先填写 App ID 和 App Secret",
"startSuccess": "飞书机器人已启动",
"startFailed": "启动飞书机器人失败",
"stopSuccess": "飞书机器人已停止",
"stopFailed": "停止飞书机器人失败",
"remove": "断开并删除配置",
"removeSuccess": "飞书配置已删除",
"removeFailed": "删除飞书配置失败",
"guide": "前往飞书开放平台创建应用并获取凭证",
"guideLink": "飞书开放平台"
},
"wechat": {
"title": "微信接入",
"description": "连接个人微信,通过微信消息与 PromptX 交互",
"installTitle": "1. 安装插件",
"installDesc": "首先需要安装 openclaw 微信插件",
"installCmd": "npx -y @tencent-weixin/openclaw-weixin-cli install",
"loginTitle": "2. 扫码登录",
"loginDesc": "运行以下命令,使用微信扫码授权登录",
"loginCmd": "openclaw channels login --channel openclaw-weixin",
"startBtn": "启动微信接入",
"comingSoon": "微信接入功能即将上线",
"copied": "命令已复制"
},
"server": {
"title": "服务器配置",
"description": "配置服务器主机、端口和调试设置",
Expand Down Expand Up @@ -811,6 +858,10 @@
"rolexUpgrade": {
"title": "RoleX(V2)架构升级",
"content": "原有 V2 角色需要升级。请激活女娲,让女娲进行升级与迁移才能继续使用。"
},
"updateV230": {
"title": "v2.3.0 版本更新",
"content": "🚀 全面优化 RoleX 功能,修复组织操作相关的 bug\n\n⚡ 新增 DeepSeek 预配置,开箱即用\n\n📂 新增工作区功能,支持项目文件管理\n\n💬 支持连接飞书,实现类似 OpenClaw 的多平台接入能力"
}
}
}
126 changes: 126 additions & 0 deletions apps/desktop/src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import { AutoStartWindow } from '~/main/windows/AutoStartWindow'
import { CognitionWindow } from '~/main/windows/CognitionWindow'
import { agentXService } from '~/main/services/AgentXService'
import { webAccessService } from '~/main/services/WebAccessService'
import { FeishuManager } from '~/main/services/feishu'
import { workspaceService } from '~/main/services/WorkspaceService'
import * as logger from '@promptx/logger'
import * as path from 'node:path'
import * as fs from 'node:fs'
Expand All @@ -32,6 +34,7 @@ class PromptXDesktopApp {
private updateManager: UpdateManager | null = null
private autoStartService: AutoStartService | null = null
private autoStartWindow: AutoStartWindow | null = null
private feishuManager: FeishuManager | null = null

async initialize(): Promise<void> {
// Capture console output to log file (covers @agentxjs/common runtime logs)
Expand Down Expand Up @@ -72,6 +75,8 @@ class PromptXDesktopApp {
this.setupShellIPC()
this.setupAgentXIPC()
this.setupWebAccessIPC()
this.setupFeishuIPC()
this.setupWorkspaceIPC()

// Setup infrastructure
logger.info('Setting up infrastructure...')
Expand Down Expand Up @@ -692,6 +697,63 @@ class PromptXDesktopApp {
})
}

private setupFeishuIPC(): void {
const dataDir = app.getPath('userData')
this.feishuManager = new FeishuManager(dataDir, agentXService.getPort())

ipcMain.handle('feishu:getConfig', async () => {
const saved = this.feishuManager!.loadConfig()
if (saved?.feishu) {
return saved.feishu
}
return null
})

ipcMain.handle('feishu:saveConfig', async (_, config: any) => {
try {
this.feishuManager!.saveConfig(config, { name: 'PromptX' })
return { success: true }
} catch (error: any) {
return { success: false, error: error.message }
}
})

ipcMain.handle('feishu:start', async (_, feishuConfig: any, roleConfig?: any) => {
try {
const role = roleConfig || { name: 'PromptX' }
await this.feishuManager!.start(feishuConfig, role)
return { success: true }
} catch (error: any) {
return { success: false, error: error.message }
}
})

ipcMain.handle('feishu:stop', async () => {
try {
await this.feishuManager!.stop()
return { success: true }
} catch (error: any) {
return { success: false, error: error.message }
}
})

ipcMain.handle('feishu:status', async () => {
return this.feishuManager!.getStatus()
})

ipcMain.handle('feishu:remove', async () => {
try {
await this.feishuManager!.remove()
return { success: true }
} catch (error: any) {
return { success: false, error: error.message }
}
})

// 尝试恢复已保存的飞书连接
this.feishuManager.restore().catch(() => {})
}

private setupWebAccessIPC(): void {
ipcMain.handle('webAccess:getStatus', () => {
const last = webAccessService.getLastStatus()
Expand Down Expand Up @@ -724,6 +786,70 @@ class PromptXDesktopApp {
})
}

private setupWorkspaceIPC(): void {
ipcMain.handle('workspace:getFolders', async () => workspaceService.getFolders())

ipcMain.handle('workspace:addFolder', async (_, folderPath: string, name: string) =>
workspaceService.addFolder(folderPath, name))

ipcMain.handle('workspace:removeFolder', async (_, id: string) =>
workspaceService.removeFolder(id))

ipcMain.handle('workspace:pickFolder', async () => {
const result = await dialog.showOpenDialog({ properties: ['openDirectory'] })
if (result.canceled || !result.filePaths[0]) return null
const folderPath = result.filePaths[0]
const name = folderPath.split(/[/\\]/).filter(Boolean).pop() || 'workspace'
return { path: folderPath, name }
})

ipcMain.handle('workspace:listDir', async (_, dirPath: string) =>
workspaceService.listDir(dirPath))

ipcMain.handle('workspace:readFile', async (_, filePath: string) =>
workspaceService.readFile(filePath))

ipcMain.handle('workspace:readFileBase64', async (_, filePath: string) =>
workspaceService.readFileBase64(filePath))

ipcMain.handle('workspace:writeFile', async (_, filePath: string, content: string) =>
workspaceService.writeFile(filePath, content))

ipcMain.handle('workspace:createDir', async (_, dirPath: string) =>
workspaceService.createDir(dirPath))

ipcMain.handle('workspace:deleteItem', async (_, itemPath: string) =>
workspaceService.deleteItem(itemPath))

ipcMain.handle('system:checkGit', async () => {
if (process.platform !== 'win32') return { installed: true }
try {
const { execSync } = await import('node:child_process')
try {
execSync('git --version', { encoding: 'utf-8', timeout: 3000 })
return { installed: true }
} catch {
// Try common Git installation paths on Windows
const commonPaths = [
'C:\\Program Files\\Git\\cmd\\git.exe',
'C:\\Program Files (x86)\\Git\\cmd\\git.exe',
]
for (const gitPath of commonPaths) {
try {
execSync(`"${gitPath}" --version`, { encoding: 'utf-8', timeout: 3000 })
return { installed: true }
} catch {
// continue
}
}
return { installed: false }
}
} catch {
return { installed: false }
}
})
}

private setupUpdateIPC(): void {
// 检查更新
ipcMain.handle('check-for-updates', async () => {
Expand Down
Loading