feat(office): Office 操作改为常驻的原生 office 工具

- 新包 @deepseek-ai/dsh-tool-office 提供常驻的 office 工具(render / convert / recalculate),由 office-kit 在 Host 中直接调用 Kit 的 JS API;标准模式与 PTC 通过同一个工具调用
- render 的页面图片直接进入工具结果(有数量、像素与字节上限);convert / recalculate 的结果写入 office-kit 按 Session 划分的私有输出目录,由模型用 shell 复制到工作区,fs 与 Host 代码不写用户工作区
- 删除为 shell 执行 Kit CLI 而存在的代码:skill-office 的 node / cli / kitRoot、resolveKitCli、DSH_BUNDLED_OFFICE_CLI / DSH_BUNDLED_OFFICE_NODE / DSH_BUNDLED_RUNTIME_ROOT 与 Electron 下的独立 Node 检查;打包 smoke 改为经 office-kit 真实渲染、转换与重算
- office 由 web-app 的 standard / ptc 预设与 sdk-app 挂载,minimal 不挂载;操作技能正文与目录描述指向 office 工具
- 新增 Agent Note,部分取代 progressive-office-skills 的 shell 执行决定;同步 README、子系统页、catalog 与升级指南(含已保存预设的迁移步骤)

本 PR 的 snapshot 统一在这个提交里重新生成,前 4 个提交中的 snapshot 不一定和那一步的代码对应。
This commit is contained in:
yudshj committed 2026-11-04 18:17:58 +08:00
1 parent a220e017b5
commit 50ba635949
222 files changed
+6038 -1655

No files matched your search

+3 -2
View File
@@ -93,6 +93,7 @@ LEGACY_CUSTOM_DISABLED_ROWS = (
"tool-fs",
"tool-fs-search",
"tool-goal",
"tool-office",
"tool-plugin-manager",
"tool-schedule",
"tool-skill",
@@ -997,7 +998,7 @@ def _smoke_sdk_authoring_cached(base_url: str, executable: Path, update_snapshot
assert ("- `office`:" in prompt) == (mode != "disabled"), mode
for name in ("office-docx", "office-pptx", "office-xlsx", "office-render", "office-recalculate", "office-export-pdf"):
assert (name in prompt) == (mode != "disabled"), (mode, name)
assert "render --input" not in prompt and "libreofficeKit" not in prompt, mode
assert "Render the saved deliverable" not in prompt, mode
assert ("CUSTOM_OFFICE_DOCX" in prompt) == (mode == "replacement"), mode
tool_result = next(block for message in requests[1]["messages"]
for block in message.get("content", [])
@@ -1155,7 +1156,7 @@ def smoke_sdk_office(executable: Path) -> None:
patch = root / f"{mode}.patch.yml"
patch.write_text(json.dumps([{"insert": [{
"id": "python-sdk-office-smoke",
"inject": ["skills"],
"inject": ["officeKit"],
"name": plugin.as_uri(),
"config": {"input": str(document), "output": str(output), "result": str(result_path),
"imageInput": str(documents["pptx"]), "imageOutput": str(root / "node-pptx")},