From 53d53c87c6135f4ee8d57da989cbc9c545597db8 Mon Sep 17 00:00:00 2001 From: Helian Nuits Date: Wed, 25 Nov 2026 02:51:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(mcp):=20=E5=8C=BA=E5=88=86=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E5=AF=BC=E5=87=BA=E4=B8=8E=E9=99=84=E4=BB=B6=E4=BA=A4?= =?UTF-8?q?=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 复现:真实 stdio 导出只返回服务器本地路径、页数与检查状态,无交付确认。下载链接任务中,基线 Luna 一次把路径包装成未经验证的链接,独立重跑又一次称本地路径是下载文件。不要把本地路径当成用户可见下载;有宿主附件回执时仍能交付。 仅调整 export_handwriting 的工具说明与更新记录。12 次精确构建对照的四页 PDF 均为相同 121930 字节,既有检查数 4→4。模拟附件通道正对照两臂各 2/2 确认,缺通道的候选精确构建 0/4 错误称已交付。真实 stdio 全套本地通过;无 GitHub CI。 --- CHANGELOG.md | 1 + crates/panache-mcp/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ea1959c..aa4dd169 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - MCP 新检查单记录首次入档时的稿件版本,历史查单会说明单据能证明的先后关系。 - MCP 调参兼容直接指定控件或按控件组提交。 +- MCP 导出提示区分服务器本地文件和用户可下载附件,不把本地路径当作已交付链接。 - 可用 `PANACHE_MCP_PRESERVE_REVIEWS=1` 在改稿和打印期间保留原有检查记录。 - MCP 在多节稿件的逐页复盘中提示节号和节内页码,方便从中断处继续核对。 - MCP 可按稿件版本、节号和页码只读找回已存的整页复盘;缺少记录时明确返回空结果。 diff --git a/crates/panache-mcp/src/main.rs b/crates/panache-mcp/src/main.rs index fe797d7b..11487f7a 100644 --- a/crates/panache-mcp/src/main.rs +++ b/crates/panache-mcp/src/main.rs @@ -572,7 +572,7 @@ impl Panache { } #[tool( - description = "Export the complete saved revision, in section order, to a local PDF (default) or ZIP of page PNGs. Returns the path, page count and review.unreviewed_pages in print order. For a print-and-report request return the file and missing pages. Only if a new check is requested, use preview_handwriting(view=review) at the exported revision. For ink-only PNG pages, set transparent_background=true with tune_handwriting (ink group) and export ZIP. PDF always includes paper. Text-only clients can give the user the PDF path for visual inspection. Use view=image to inspect the intended appearance without filing a check." + description = "Export the complete saved revision, in section order, to a local PDF (default) or ZIP of page PNGs. Returns the path, page count and review.unreviewed_pages in print order. For a print-and-report request report the file and missing pages. The returned path is local to the server, not an attachment or a link available to the user. Do not turn the path into a download link. Claim delivery only after a separate user-visible attachment is confirmed; otherwise say it was exported locally and give the path as a local path. Only if a new check is requested, use preview_handwriting(view=review) at the exported revision. For ink-only PNG pages, set transparent_background=true with tune_handwriting (ink group) and export ZIP. PDF always includes paper. Use view=image to inspect the intended appearance without filing a check." )] async fn export_handwriting( &self,