Repository navigation
feat(mcp): 把写作能力开放给本机 Agent - #86
Merged
Merged
Conversation
增加仅监听 127.0.0.1 的 MCP 服务和 --mcp-stdio 桥,供外部 Agent 调用写作对话、保存、改标题、提取记忆和章节排版。设置页可开关、复制安装说明,并按 qmai-mcp 的独立版本号自检更新已安装副本。 Co-authored-by: darknessomi <darknessomi@users.noreply.github.com>
Agent 可以列出书架、打开一本书,并读取当前打开的书和文件。设置页改为服务端口、复制配置,以及固定宽度的导出和安装按钮。 Co-authored-by: Cursor <cursoragent@cursor.com>
外部 Agent 可以用 stop_writing 中断正在进行的写作。Skill 改为按对话记录汇报进度,写章指令只保留「编写第 N 章」。 Co-authored-by: Cursor <cursoragent@cursor.com>
该常量只供测试核对工具名,正式编译不再包含它。 Co-authored-by: Cursor <cursoragent@cursor.com>
新增后台写作、进度查询及原子快照,区分完成、失败、取消、中断和待补充信息。 保留同步调用,修复后台收尾覆盖切换项目或并行会话的问题,更新 qmai-mcp Skill 至 1.5.0。 包含此前的界面模式与模型参数继承、正文和工作流模型区分及相关回归测试。 显式标注 OutlineSegmentKind,修复大纲索引分段时的类型不匹配。 验证:应用类型检查、104 项相关测试及 diff 检查通过;Rust MCP 11 项串行测试及 Skill 校验通过。 测试类型检查仍受 antigravity-cli-transport.test.ts:116 的既有错误影响。
darknessomi
marked this pull request as ready for review
October 20, 2026 10:35
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.
概要
青幕写作可以作为本机 MCP 服务,让外部 Agent 调用写作对话、保存文档、修改标题、提取记忆和章节排版。应用需要保持打开,设置里的 MCP 开关默认关闭。
writing_conversation可以传入这一次的写作模式、写作模型和思考深度。不传则用当前界面值,不改写界面选择。save_document只原子保存,不排版、不摄取。编辑器有未保存修改时拒绝,除非overwrite为 true。extract_memory不排版正文。非正式章节默认拒绝,只有allowDraft: true才提取草稿。format_chapter与编辑器「一键排版」共用同一套规则,只接受章节。qmai-mcpskill 的一键复制。skill 使用独立版本号1.0.0,启动、打开开关和保存 Agent skills 目录时自检更新,只覆盖qmai-mcp。连接方式是当前程序加
--mcp-stdio,只监听127.0.0.1。应用未启动或开关关闭时返回中文错误。验证
npx vitest run src/lib/mcp/mcp.spec.ts src/components/settings/web-search-section.spec.tscargo test --lib mcp::npx tsc --noEmit