Repository navigation
feat: 默认不导出 PDF、不新建文件,改图落在现有图纸上 - #12
Merged
Merged
Conversation
- workbench_export_pdf 须传 explicit_request=true,否则返回 EXPLICIT_PDF_REQUEST_REQUIRED,不写文件 - workbench_project 新增 export_pdf(默认 false),默认只出 DXF;已有图册目录默认原地修订:暂存生成并校核,通过后替换,失败时原目录不变;旧 PDF 不删除,列入 stale_files - workbench_patch_opening 默认写回 source_job 原图:暂存核对范围外实体和 QA,通过后才替换;new_copy=true 才另建副本 - cad_save_as 须传 explicit_request=true,普通修改用 cad_mutate save 原路径保存 - build_project.py 新增 --export-pdf - SKILL.md 新增默认规则一节,参考文档、README、能力清单与更新记录同步;测试和验证脚本按新默认更新 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
本地全量 pytest(Windows,Python 3.11):1012 passed, 18 skipped;改完 README/能力清单/更新记录后,读取这些文件的 33 个测试重跑通过。 |
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.
背景
画完图默认会导出 PDF,每次修改又会另建一份新文件。改成:除非用户在指令里明确要求,否则不导出 PDF、不新建文件,修改直接落在现有图纸上。
改动
不自动导出 PDF
workbench_export_pdf新增explicit_request,不传true时返回EXPLICIT_PDF_REQUEST_REQUIRED,不写任何文件。workbench_project新增export_pdf(默认false):默认只输出各图 DXF 和 DXF 目录;export_pdf=true才生成单页 PDF 与atlas.pdf。CLI 对应--export-pdf。回读按 manifest 的pdf_exported判断要不要查 PDF;旧 manifest 没有这个字段时仍按含 PDF 处理。在现有图纸上修改
workbench_patch_opening默认写回source_job的原图。先在_staging/<job_id>生成,核对范围外实体哈希和 QA,都通过才用os.replace替换原目录里的 spec/qa/preview,plan.dxf 最后替换;任何一项不通过都不碰原图。返回的job_id仍是source_job,edit_job_id是本次操作标识,下次修改用返回的revision。重放同一次修改直接返回已提交结果。new_copy=true保留旧的另建副本行为。workbench_project对已有图册目录默认原地修订:先验证当前版本,再在_revision-staging生成并校核,通过后替换,失败时原目录不变。之前导出过、本次没重新生成的 PDF 不删除,在结果stale_files里列出。另建修订目录要显式给新output和previous。cad_save_as新增explicit_request,不传true时返回EXPLICIT_NEW_FILE_REQUEST_REQUIRED;普通修改用cad_mutate的save原路径保存。cad_new_document原本就要求explicit_request。文档
不兼容变化
以前依赖默认行为的调用方需要改参数:要 PDF 传
explicit_request=true/export_pdf=true;要另存副本传new_copy=true,或给cad_save_as传explicit_request=true。验证
new_copy=true另建副本;范围外实体变化或 QA 不通过时原图不变;图册默认无 PDF、原地修订、旧 PDF 保留并上报、暂存校核失败时原目录不变;未授权导出 / 另存被拒且不落盘;stdio MCP 端到端。verify_native.py,只改了它的调用参数。🤖 Generated with Claude Code