From 82bb5961ee042384e77a1ac9a014dab46a8288d5 Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 1 Oct 2026 02:25:45 +0000 Subject: [PATCH 1/4] Record the task card for feature-deliverable-docx-r1 --- .task/feature-deliverable-docx-r1.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .task/feature-deliverable-docx-r1.md diff --git a/.task/feature-deliverable-docx-r1.md b/.task/feature-deliverable-docx-r1.md new file mode 100644 index 00000000..35407fbb --- /dev/null +++ b/.task/feature-deliverable-docx-r1.md @@ -0,0 +1,25 @@ +# feature/deliverable-docx-r1 任务卡 + +任务主记录:;状态:进行中;owner:weichen + +## 基线与授权 + +- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 388d01cc3afe0d426d0cb166168cfc34565cb5ce +- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-deliverable-docx-r1(worktree);分支:feature/deliverable-docx-r1 +- 授权与交付终点:<本次允许的动作与终点;未授权事项写明> + +## 目标与非目标 + +<预期结果、受影响入口/模块/契约;明确不做什么。> + +## 同步记录 + +| 节点 | sync_base_sha | tested_head_sha | checked_at | +|---|---|---|---| +| 启动 | 388d01cc3afe0d426d0cb166168cfc34565cb5ce | 388d01cc3afe0d426d0cb166168cfc34565cb5ce | 2026-10-01T02:25:45Z | + +## 结果与验证(完成后填写) + +- 结果: +- 验证: +- 影响与剩余项: -- 2.54.0 From d53e8e7c427a87681a76e6fc572438a6d0942720 Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 1 Oct 2026 02:51:49 +0000 Subject: [PATCH 2/4] Land styled docx generation and in-chat deliverable cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Why: users received plain-text .docx files and had to dig through the process collapse or workspace panel to find deliverables; deliverables must appear directly in the conversation and open with real formatting. Evidence: module PRs merged — Agent-System-Backend#31 (docgen Markdown to styled OOXML, write_docx tool, artifact_ref pinned as content after final text, prompt routing, mock #doc dogfood) and Agent-System-Frontend#25 (deliverable card renderer, live projection pinned tail). Combination `make test` green in this worktree: backend go test 19 pkgs, frontend vitest 40/40 + tsc clean, ui tsc + vitest 68/68 incl design-guard, agent-command ok. Task card records scope, sync nodes and leftovers. Impact: gitlinks backend -> 8550bb0, frontend -> b048d90; core/ui unchanged. Refs: task feature/deliverable-docx-r1 --- .task/feature-deliverable-docx-r1.md | 17 +++++++++++++++-- modules/backend | 2 +- modules/frontend | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.task/feature-deliverable-docx-r1.md b/.task/feature-deliverable-docx-r1.md index 35407fbb..b87afa47 100644 --- a/.task/feature-deliverable-docx-r1.md +++ b/.task/feature-deliverable-docx-r1.md @@ -6,20 +6,33 @@ - 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 388d01cc3afe0d426d0cb166168cfc34565cb5ce - 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-deliverable-docx-r1(worktree);分支:feature/deliverable-docx-r1 -- 授权与交付终点:<本次允许的动作与终点;未授权事项写明> +- 授权与交付终点:用户反馈两项缺陷后授权修复——(1) 生成的 docx 必须带真实排版(标题层级/表格/样式),不得是纯文本;(2) 交付物(文档/图/PPT/pdf 等)必须在对话内直接以可打开预览的卡片给出(参照 ZCode 右栏预览与 Kimi 卡片形态,截图六张)。交付终点:模块 PR + Dev gitlink 合入。 ## 目标与非目标 -<预期结果、受影响入口/模块/契约;明确不做什么。> +- 后端:新增 docgen(Markdown→带样式 OOXML,零三方依赖)+ write_docx 内置工具 + 提示词路由(write_artifact 不再承接 Word 文档);artifact_ref 部件从「过程件」改为「内容件」并钉在最终正文之后(Kimi 式回复完给卡)。 +- 前端:artifact_ref 渲染升级为交付物卡片(整卡点击=右栏预览唯一落位 + 单下载按钮,令牌化样式 + mk-rise-in);live.ts 投影与落库序同构(交付物钉尾、流式期间即可见)。 +- 非目标:xlsx/pptx/pdf 生成器、文档可检索索引(生成路径暂跳过二进制索引,见剩余项)、预览器改动(mammoth 已能还原 Heading1-4 样式)。 ## 同步记录 | 节点 | sync_base_sha | tested_head_sha | checked_at | |---|---|---|---| | 启动 | 388d01cc3afe0d426d0cb166168cfc34565cb5ce | 388d01cc3afe0d426d0cb166168cfc34565cb5ce | 2026-10-01T02:25:45Z | +| 合入前 task-sync | 388d01cc3afe0d426d0cb166168cfc34565cb5ce(Dev 无前进;frontend 分支保护拦 head-behind 后实并入 origin/main 再合) | backend 8550bb0 + frontend b048d90 + ui 不变 | 2026-10-01T02:51:XXZ | ## 结果与验证(完成后填写) - 结果: + - Backend PR #31(merge 8550bb0):internal/docgen(Title/Heading1-4、numbering.xml 真编号列表含任务项 ☐/☑、GFM 表格表头底纹、引用左线、代码底纹、粗斜/删除线/真超链接 rels;A4 中文页边距、等线/Calibri 字族);write_docx 工具(name 自动补 .docx,docx MIME 工件);ingest 回读测试(生成→parseDocx 块结构闭合);llm.go 交付物钉尾;mock #doc 改为真 docx 全链路演示;runmgr 二进制 mime 跳过字符串索引;提示词 tool.write_docx 新增、tool.write_artifact 分工改写、task.doc-minutes 输出契约要求 write_docx 交付。 + - Frontend PR #25(merge b048d90):Conversation.tsx deliverable-card(图标+文件名+类型/大小 meta+预览示意+单下载;整卡点击=右栏预览,全屏仍从右栏标题进);live.ts artifact 投影钉尾同构;styles.css 令牌化卡片样式;测试更新。 - 验证: + - backend `go test ./...` 19 包 ok(含新 e2e:API 取回工件为合法 zip 且 document.xml 含 `` 与标题文本); + - frontend `npx vitest run` 40/40、`tsc --noEmit` 干净; + - 组合 `make test`(core+backend+frontend+ui+agentcmd)全绿——ui 含 design-guard 8 项(无裸色/无私有 keyframes/无行内字号); + - 提交前 precheck verdict=READY(R0=388d01c)。 - 影响与剩余项: + - docx 生成路径未进全文索引(二进制 mime 跳过;上传路径 ingest 不受影响)——后续可用 ingest 块解析接通; + - xlsx/pptx 生成器未做(卡片与预览对它们已就绪); + - 超过 50 个列表序列的文档回落共享编号(编号延续,Word 容忍); + - mimosa 扫描钩子在本次 commit/push 时 scanner_no_output(兼容放行),未获得完整安全扫描结论,不据此宣称安全。 diff --git a/modules/backend b/modules/backend index d8497a1e..8550bb0b 160000 --- a/modules/backend +++ b/modules/backend @@ -1 +1 @@ -Subproject commit d8497a1e60ca92b34783b8595fac3ae314a525c6 +Subproject commit 8550bb0bd2fe7c4714d0e1b9062091a59cb96ccb diff --git a/modules/frontend b/modules/frontend index 1fc1d2f9..b048d90d 160000 --- a/modules/frontend +++ b/modules/frontend @@ -1 +1 @@ -Subproject commit 1fc1d2f9b4df6f50b6c20fd7bce98fa1bf2e11fd +Subproject commit b048d90de46280ef5e82ba0ff1421d34c5745bd8 -- 2.54.0 From 40abe120c085a2937a3da049e231900c8e31f946 Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 1 Oct 2026 02:51:50 +0000 Subject: [PATCH 3/4] Record the sync checkpoint --- .task/feature-deliverable-docx-r1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.task/feature-deliverable-docx-r1.md b/.task/feature-deliverable-docx-r1.md index b87afa47..f5eacc1c 100644 --- a/.task/feature-deliverable-docx-r1.md +++ b/.task/feature-deliverable-docx-r1.md @@ -36,3 +36,4 @@ - xlsx/pptx 生成器未做(卡片与预览对它们已就绪); - 超过 50 个列表序列的文档回落共享编号(编号延续,Word 容忍); - mimosa 扫描钩子在本次 commit/push 时 scanner_no_output(兼容放行),未获得完整安全扫描结论,不据此宣称安全。 +| 同步前验收 | 388d01cc3afe0d426d0cb166168cfc34565cb5ce | d53e8e7c427a87681a76e6fc572438a6d0942720 | 2026-10-01T02:51:50Z | -- 2.54.0 From 946963ab8f7690ae1f78846496da9b3178febdcb Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 1 Oct 2026 02:52:53 +0000 Subject: [PATCH 4/4] Record PR #109 as the task master record --- .task/feature-deliverable-docx-r1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.task/feature-deliverable-docx-r1.md b/.task/feature-deliverable-docx-r1.md index f5eacc1c..e42a86bd 100644 --- a/.task/feature-deliverable-docx-r1.md +++ b/.task/feature-deliverable-docx-r1.md @@ -1,6 +1,6 @@ # feature/deliverable-docx-r1 任务卡 -任务主记录:;状态:进行中;owner:weichen +任务主记录:https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/109;状态:已完成(随 PR #109 合入);owner:weichen ## 基线与授权 -- 2.54.0