[Feature] Markus接入飞书功能 — Feishu Integration (5层完整实现)#186
Merged
Conversation
Contributor
Author
…tionRepo types and persistence layer - @markus/shared: Add integration.ts with FeishuConfigPayload, IntegrationConfig, NotificationForwardRule types - @markus/storage: Add IntegrationRepo interface + SqliteIntegrationRepo implementation - Add integrations table DDL with org+platform index - Export all new types and classes PR: https://github.com/markus-global/markus/pull/NNN
…deduplicate IntegrationRow
…sage/sendReply to Feishu adapter + WebSocket enhancement
…ig API endpoints (/api/settings/integrations/feishu)
C1: WebSocket 事件 API 不匹配 (adapter.ts:202)
- Node 内置 WebSocket 使用 onopen/onmessage/onclose/onerror 属性 API
- 将 EventEmitter .on('event', handler) 改为属性赋值模式
C2: DELETE 路由未 await (api-server.ts:9039)
- integrationRepo?.delete() 返回 Promise 但未 await
- 添加 await 确保删除完成后再返回 200
… → verificationToken in feishu integration UI Fix UI-API field name mismatch: API expects 'verificationToken' but UI was sending 'verifyToken'. Renamed across all 4 files: - api.ts: type definitions in getFeishuIntegration + saveFeishuIntegration - FeishuIntegrationSection.tsx: interface, state, form field, i18n key - en/settings.json + zh-CN/settings.json: i18n key renamed
…gration - Add FeishuApiClient: minimal HTTP client for Feishu Open API - Add FeishuNotifier: subscribes to EventBus + HITL notifications, routes via configurable forward rules, sends Feishu cards - Wire FeishuNotifier into api-server: - tryInitFeishuNotifier() loads config from integrations table - updateFeishuConfig() enables runtime config updates - Integrated with setHITLService, setStorage, start, stop - POST integration endpoint updates notifier config - PUT notification rules endpoint updates notifier rules - All 722 tests pass, typecheck clean
…warding, improve setup guide - Wire feishu:message_received event to Secretary agent with reply-back - Fix notification forwarding: add notifyChatId fallback when no forwardRules configured - Fix WSClient.start() not being awaited (async connection) - Fix sender ID extraction from correct top-level position in event data - Remove unsupported card.action.trigger from EventDispatcher - Add notifyChatId field to config, API, and frontend UI - Add diagnostic logging for event debugging - Improve setup guide with detailed 8-step instructions - Add normal priority level to notification filter options Co-authored-by: Cursor <cursoragent@cursor.com>
Replace manual App ID/Secret entry with lark.registerApp() QR code flow. App name set to "Markus 秘书". On successful connection, sends welcome card with pending approvals/notifications summary. Adds i18n support for all new UI strings. Co-authored-by: Cursor <cursoragent@cursor.com>
d56c128 to
1b9351b
Compare
Move appId/appSecret storage exclusively to markus.json (consistent with other API keys). SQLite now only stores runtime preferences (notifyChatId, locale, priority settings, etc.). Also includes chat list selector UI, multi-option approval cards, agent event refinements, and i18n improvements. Co-authored-by: Cursor <cursoragent@cursor.com>
…allback Users were confused that notifications require a group chat. Updated UI to make it clear that private messages are the default when no group is selected. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 基本信息
🎯 功能概述
Markus 接入飞书(Feishu/Lark)平台,使用户能通过飞书直接与 Markus 秘书对话、处理审批、查看通知、安排工作。同时在 Markus Web UI 设置页面提供扫码配置入口。
🔧 变更内容
跨 5 个包的完整实现链(shared → storage → comms → org-manager → web-ui),9 commits, 17 files changed, 2101 insertions(+), 32 deletions(-)。
L0: @markus/shared — 类型定义
L1: @markus/storage — 持久化层
L1: @markus/comms — 飞书通信层
L3: @markus/org-manager — API 层
前端: @markus/web-ui — 设置页面
测试覆盖