UNPKG

autosnippet

Version:

Extract code patterns into a knowledge base for AI coding assistants

39 lines (38 loc) 1.58 kB
/** * Remote Command Router — 飞书 Bot ↔ IDE 编程桥接 + AI Agent 知识管理 * * 架构(自然语言路由模式 v2): * 飞书消息 → LarkTransport → IntentClassifier 意图分类 * → bot_agent: 知识管理任务 → AgentRuntime 直接处理 → 飞书回复 * → ide_agent: 编程任务 → remote_commands 队列 → VSCode 扩展 → Copilot Chat * → system: 状态/截图 → 本地直接处理 * * 设计原则: * ✓ 零命令交互 — 全部使用自然语言,AI 自动判断意图 * ✓ 双 Agent 分流 — 知识任务服务端处理,编程任务转发 IDE * ✓ 飞书 WS 随路由加载自动启动 * ✓ 超时自动清理(pending 120s / running 600s) * ✓ 消息去重 + 非文本提示 * ✓ SDK Client 回复 + REST 回退 */ declare const router: import("express-serve-static-core").Router; /** * 截取 IDE 窗口 → 上传飞书 → 发送图片消息(完整流水线) * @param [caption] 可选文字说明(会先发一条文本) * @returns >} */ export declare function sendLarkScreenshot(caption?: string): Promise<{ success: boolean; message: string; }>; /** * 向飞书活跃会话发送主动通知(非回复) * 用于任务进度、Guard 结果等非指令触发的通知 * * @param text 纯文本通知内容 * @returns 发送是否成功 */ export declare function sendLarkNotification(text: string): Promise<boolean>; /** 查询飞书通知是否可用 */ export declare function isLarkNotificationReady(): boolean; export default router;