Skip to content

Workspace#563

Merged
dfwgj merged 18 commits intomainfrom
workspace
Mar 24, 2026
Merged

Workspace#563
dfwgj merged 18 commits intomainfrom
workspace

Conversation

@dfwgj
Copy link
Copy Markdown
Collaborator

@dfwgj dfwgj commented Mar 24, 2026

feat: v2.3.0 - 飞书接入、工作区、DeepSeek 预配置
PR Body

Summary

  • 新增飞书机器人接入,使用 WebSocket 长连接模式(无需公网 IP),实现类似 OpenClaw 的多平台消息桥接能力
  • 新增工作区侧边栏,支持文件浏览、拖拽到对话、文件读写,内置 MCP Workspace 服务
  • 新增 DeepSeek 预配置,AgentX 开箱即用
  • 全面优化 RoleX,拆分 action 工具为 4 个领域工具减少 LLM 调用失败,修复组织操作相关 bug
  • 修复资源页面重复 key 警告,Windows Git 检测与路径问题,清理调试日志

Changes

飞书接入 (apps/desktop/src/main/services/feishu/)

  • FeishuBot.ts — 飞书 SDK WebSocket 长连接,收发消息(文本+图片)
  • FeishuBridge.ts — 飞书 ↔ AgentX 消息桥接
  • FeishuSessionManager.ts — 飞书 chat_id ↔ AgentX imageId 双向映射
  • FeishuManager.ts — 生命周期管理、配置持久化、自动恢复
  • FeishuConfig.tsx — 配置 UI,含开关、连接状态指示器

工作区

  • 工作区侧边栏文件浏览器
  • MCP Workspace 内置服务(stdio 模式)
  • 文件拖拽到对话输入

其他

  • DeepSeek 预配置
  • Windows Git 检测与安装引导
  • RoleX action 工具拆分优化
  • 资源去重、日志清理
  • v2.3.0 版本通知与 changeset

Test plan

  • 设置 → 远程访问 → 飞书:填写 appId/appSecret → 保存 → 刷新后配置仍在
  • 飞书开关:打开后状态显示已连接,关闭后断开
  • 工作区:添加文件夹 → 浏览文件 → 拖拽到对话
  • Windows:首页 Git 检测正常
  • 资源页面无重复 key 警告
  • 通知中心显示 v2.3.0 更新通知
  • 中英文切换所有新增文案正确

dfwgj and others added 18 commits March 23, 2026 14:01
…ent pattern

- StreamableHttpMCPServer: use node: prefixes, parseMcpUrl/endpoint instead
  of separate host/port, rename sessions→httpSessions to avoid BaseMCPServer
  conflict, remove SESSION_ID_HEADER_NAME constant, accept url option
- PromptXMCPServer: pass url string instead of port+host+corsEnabled
- mcp-workspace/http-server: align startup logs (3-line format) and add
  summarizeArgs to tool call logging
- mcp-workspace: add stdio-server.ts reusing existing tools/service layer
- mcp-workspace/bin: support --transport stdio|http flag and
  WORKSPACE_MCP_TRANSPORT env var

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- WorkspaceService (Electron main): fs-based folder management, dir listing,
  file read/write/delete, persisted to userData/workspace-folders.json
- IPC: 10 workspace:* handlers via ipcMain.handle, exposed via contextBridge
- useWorkspace hook: manages folders, expanded paths, dir cache via Electron IPC
- WorkspacePanel: resizable right sidebar shell (360–600px, drag handle)
- WorkspacePanelHeader: tab bar with badge support
- FileTree: recursive tree with file-type icons, drag-to-input, delete on hover
- WorkspaceExplorerPanel: folder list, file tree, text/image preview
- WorkspaceExplorerAdapter: bridges useWorkspace hook to pure UI panel
- Studio.tsx: FolderOpen toggle button + WorkspacePanel integrated on right side

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add mcp-config.service.ts managing ~/.promptx/mcp-servers.json with
two built-in (non-removable) servers:
- promptx: HTTP http://127.0.0.1:5276/mcp (reads port from ~/.promptx/config.json)
- mcp-office: stdio node .../mcp-office/dist/index.js (auto-detected)

New tools exposed via workspace MCP:
- list_mcp_servers: returns built-in + user-defined servers
- add_mcp_server: adds custom stdio or http/sse server
- remove_mcp_server: removes user-defined server (builtin protected)
- update_mcp_server: updates user-defined server fields

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add mcp-workspace (http://127.0.0.1:18062/mcp) as a third built-in server
in both getMcpServers() (settings UI display) and the AgentX runtime config
builder, alongside promptx and mcp-office.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- WorkspaceService: save to ~/.promptx/workspaces.json to align with
  mcp-workspace reader; add added_at field; auto-create directory
- AgentXService: set agentxjs log level to warn

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace HTTP transport with stdio for mcp-workspace, matching the
mcp-office pattern. Add getMcpWorkspacePath() to resolve the binary
with dev/prod/node_modules fallbacks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove mcp-config.service.ts and related MCP server management tools
- Move ok/err response helpers to utils/index.ts
- Clean up service/index.ts and public index.ts exports

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Listen to ws-file-drag-* custom events in Chat; show drop overlay on
drag start; pass dropped path to InputPane via droppedWorkspacePaths
prop which calls addFilesFromPaths to attach the file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When loadFolders() completes, automatically expand all root folders
and fetch their directory contents so the file tree is visible by
default without manual clicking.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Change workspacePanelOpen initial state from false to true so the
workspace sidebar is visible on startup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add system:checkGit IPC handler to detect Git on Windows. Display a
dismissible banner on WelcomePage when Git is not installed, with a
link to download Git for Windows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Try common Git installation paths (Program Files, Program Files x86)
if git command is not in PATH, to avoid false negatives when Git is
installed but not added to system PATH.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove auto-expand and content loading from workspace folders on load
- Only show Git warning on Windows platform (check platform in JSX)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…M call failures

- Split monolithic action tool (32 ops, 18 params) into:
  - action: role activation/creation (activate, born, identity)
  - lifecycle: goal & task management (want, plan, todo, finish, achieve, abandon, focus)
  - learning: cognitive cycle (reflect, realize, master, forget, synthesize, skill)
  - organization: org, position & personnel management (16 ops)
- Add V1 role guard to new tools with friendly error messages
- Fix census.list parser misclassifying members as positions (removed flawed isRole heuristic)
- Handle '─── unaffiliated ───' section in census output
- Fix organization tree not showing in roles page when roles aren't in resource scan
- Update recall/remember V2 error messages to reference correct tool names
- Update dayu role knowledge docs to reflect new tool structure
- Add Git check debug logging for Windows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Deduplicate items in ResourcesPage loadResources
- V2 roles overwrite V1 entries in DiscoverCommand
- Git warning banner now checks installation status
- Remove debug logs from RolexBridge and checkGit
- Add DeepSeek preset to AgentX profiles config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Feishu backend service (FeishuBot, FeishuBridge,
  FeishuSessionManager, FeishuManager) using @larksuiteoapi/node-sdk
- Add Feishu config UI with start/stop toggle and status indicator
- Add IPC handlers for feishu config, start, stop, status, remove
- Bridge Feishu messages to AgentX with text and image support
- Auto-restore Feishu connection on app startup
- Add WeChat config component (hidden, for future use)
- Add i18n keys for Feishu and WeChat in zh-CN and en

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dfwgj dfwgj merged commit a046d33 into main Mar 24, 2026
@dfwgj dfwgj deleted the workspace branch March 24, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant